WIP: feat: blueprint namespaces#2725
Conversation
|
Preview deployment for your docs. Learn more about Mintlify Previews.
|
Greptile SummaryThis PR adds namespaces for running multiple blueprint instances side by side. The main changes are:
Confidence Score: 4/5The namespace flow needs fixes for duplicate local lookup and empty multi-Go2 configuration before merging.
dimos/porcelain/local_module_source.py; dimos/robot/unitree/go2/blueprints/basic/unitree_go2_multi.py Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
BP[Blueprint atoms] --> NS[namespace prefix]
NS --> IN[instance name]
NS --> ST[stream remappings]
NS --> TF[frame_id_prefix]
IN --> CFG[escaped config key]
IN --> RPC[RPC topic prefix]
ST --> COORD[ModuleCoordinator wiring]
RPC --> LOCAL[Local/remote module lookup]
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
flowchart TD
BP[Blueprint atoms] --> NS[namespace prefix]
NS --> IN[instance name]
NS --> ST[stream remappings]
NS --> TF[frame_id_prefix]
IN --> CFG[escaped config key]
IN --> RPC[RPC topic prefix]
ST --> COORD[ModuleCoordinator wiring]
RPC --> LOCAL[Local/remote module lookup]
Reviews (1): Last reviewed commit: "feat: blueprint namespaces" | Re-trigger Greptile |
| if cls.__name__ == name: | ||
| for instance_key, proxy in self._coordinator._deployed_modules.items(): | ||
| cls = self._coordinator._instance_classes[instance_key] | ||
| if name in (instance_key, cls.__name__): |
There was a problem hiding this comment.
Class Lookup Picks Arbitrary Instance
When two namespaced instances share a class, get_module("NamedModule") matches both entries through cls.__name__ and returns the first match in coordinator dict order. Local porcelain callers can receive the wrong robot's proxy instead of the same ambiguity error the coordinator raises for class-based lookup.
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
|
|
||
| unitree_go2_multi = autoconnect( | ||
| *[namespace(f"robot{i}", GO2Connection.blueprint(ip=ip)) for i, ip in enumerate(_ips)], |
There was a problem hiding this comment.
❌ 2 Tests Failed:
View the top 1 failed test(s) by shortest run time
View the full list of 1 ❄️ flaky test(s)
To view more test analytics, go to the Test Analytics Dashboard |
66a32c0 to
613b4f4
Compare
613b4f4 to
184dac8
Compare
Problem
Closes DIM-XXX
Solution
How to Test
Contributor License Agreement