-
Notifications
You must be signed in to change notification settings - Fork 153
Booster K1 intergation #1434
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
Kaweees
wants to merge
4
commits into
dev
Choose a base branch
from
miguel/booster
base: dev
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Booster K1 intergation #1434
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
8bb54ea
Add Booster RPC
Kaweees 22d4317
feat(blueprints): add new booster K1 blueprints and modules
Kaweees 8d4c768
feat(blueprints): introduce new Booster K1 modules and blueprints for…
Kaweees 106528b
feat(connection): add Booster K1 connection and skill modules
Kaweees File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| #!/usr/bin/env python3 | ||
| # Copyright 2025-2026 Dimensional Inc. | ||
| # | ||
| # Licensed under the Apache License, Version 2.0 (the "License"); | ||
| # you may not use this file except in compliance with the License. | ||
| # You may obtain a copy of the License at | ||
| # | ||
| # http://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # Unless required by applicable law or agreed to in writing, software | ||
| # distributed under the License is distributed on an "AS IS" BASIS, | ||
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| # See the License for the specific language governing permissions and | ||
| # limitations under the License. | ||
|
|
||
| """Cascaded Booster K1 blueprints split into focused modules.""" | ||
|
|
||
| import lazy_loader as lazy | ||
|
|
||
| __getattr__, __dir__, __all__ = lazy.attach( | ||
| __name__, | ||
| submod_attrs={ | ||
| "agentic._common_agentic": ["_common_agentic"], | ||
| "agentic.booster_k1_agentic": ["booster_k1_agentic"], | ||
| "basic.booster_k1_basic": ["booster_k1_basic"], | ||
| "smart.booster_k1_spatial": ["booster_k1_spatial"], | ||
| }, | ||
| ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| #!/usr/bin/env python3 | ||
| # Copyright 2025-2026 Dimensional Inc. | ||
| # | ||
| # Licensed under the Apache License, Version 2.0 (the "License"); | ||
| # you may not use this file except in compliance with the License. | ||
| # You may obtain a copy of the License at | ||
| # | ||
| # http://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # Unless required by applicable law or agreed to in writing, software | ||
| # distributed under the License is distributed on an "AS IS" BASIS, | ||
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| # See the License for the specific language governing permissions and | ||
| # limitations under the License. | ||
|
|
||
| """Agentic blueprints for Booster K1.""" |
31 changes: 31 additions & 0 deletions
31
dimos/robot/booster/k1/blueprints/agentic/_common_agentic.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| #!/usr/bin/env python3 | ||
| # Copyright 2025-2026 Dimensional Inc. | ||
| # | ||
| # Licensed under the Apache License, Version 2.0 (the "License"); | ||
| # you may not use this file except in compliance with the License. | ||
| # You may obtain a copy of the License at | ||
| # | ||
| # http://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # Unless required by applicable law or agreed to in writing, software | ||
| # distributed under the License is distributed on an "AS IS" BASIS, | ||
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| # See the License for the specific language governing permissions and | ||
| # limitations under the License. | ||
|
|
||
| """Shared agentic skills for Booster K1 blueprints.""" | ||
|
|
||
| from dimos.agents.skills.navigation import navigation_skill | ||
| from dimos.agents.skills.speak_skill import speak_skill | ||
| from dimos.agents.web_human_input import web_input | ||
| from dimos.core.blueprints import autoconnect | ||
| from dimos.robot.booster.k1.skill_container import booster_k1_skills | ||
|
|
||
| _common_agentic = autoconnect( | ||
| navigation_skill(), | ||
| booster_k1_skills(), | ||
| web_input(), | ||
| speak_skill(), | ||
| ) | ||
|
|
||
| __all__ = ["_common_agentic"] |
29 changes: 29 additions & 0 deletions
29
dimos/robot/booster/k1/blueprints/agentic/booster_k1_agentic.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| #!/usr/bin/env python3 | ||
| # Copyright 2025-2026 Dimensional Inc. | ||
| # | ||
| # Licensed under the Apache License, Version 2.0 (the "License"); | ||
| # you may not use this file except in compliance with the License. | ||
| # You may obtain a copy of the License at | ||
| # | ||
| # http://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # Unless required by applicable law or agreed to in writing, software | ||
| # distributed under the License is distributed on an "AS IS" BASIS, | ||
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| # See the License for the specific language governing permissions and | ||
| # limitations under the License. | ||
|
|
||
| """Booster K1 agentic blueprint: spatial + agent + skills.""" | ||
|
|
||
| from dimos.agents.agent import agent | ||
| from dimos.core.blueprints import autoconnect | ||
| from dimos.robot.booster.k1.blueprints.agentic._common_agentic import _common_agentic | ||
| from dimos.robot.booster.k1.blueprints.smart.booster_k1_spatial import booster_k1_spatial | ||
|
|
||
| booster_k1_agentic = autoconnect( | ||
| booster_k1_spatial, | ||
| agent(), | ||
| _common_agentic, | ||
| ) | ||
|
|
||
| __all__ = ["booster_k1_agentic"] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| #!/usr/bin/env python3 | ||
| # Copyright 2025-2026 Dimensional Inc. | ||
| # | ||
| # Licensed under the Apache License, Version 2.0 (the "License"); | ||
| # you may not use this file except in compliance with the License. | ||
| # You may obtain a copy of the License at | ||
| # | ||
| # http://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # Unless required by applicable law or agreed to in writing, software | ||
| # distributed under the License is distributed on an "AS IS" BASIS, | ||
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| # See the License for the specific language governing permissions and | ||
| # limitations under the License. | ||
|
|
||
| """Basic blueprints for Booster K1.""" |
90 changes: 90 additions & 0 deletions
90
dimos/robot/booster/k1/blueprints/basic/booster_k1_basic.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,90 @@ | ||
| #!/usr/bin/env python3 | ||
| # Copyright 2025-2026 Dimensional Inc. | ||
| # | ||
| # Licensed under the Apache License, Version 2.0 (the "License"); | ||
| # you may not use this file except in compliance with the License. | ||
| # You may obtain a copy of the License at | ||
| # | ||
| # http://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # Unless required by applicable law or agreed to in writing, software | ||
| # distributed under the License is distributed on an "AS IS" BASIS, | ||
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| # See the License for the specific language governing permissions and | ||
| # limitations under the License. | ||
|
|
||
| """Basic Booster K1 blueprint: connection + visualization.""" | ||
|
|
||
| import platform | ||
|
|
||
| from dimos.constants import DEFAULT_CAPACITY_COLOR_IMAGE | ||
| from dimos.core.blueprints import autoconnect | ||
| from dimos.core.global_config import global_config | ||
| from dimos.core.transport import pSHMTransport | ||
| from dimos.msgs.sensor_msgs import Image | ||
| from dimos.protocol.pubsub.impl.lcmpubsub import LCM | ||
| from dimos.robot.booster.k1.connection import k1_connection | ||
| from dimos.web.websocket_vis.websocket_vis_module import websocket_vis | ||
|
|
||
| _mac_transports: dict[tuple[str, type], pSHMTransport[Image]] = { | ||
| ("color_image", Image): pSHMTransport( | ||
| "color_image", default_capacity=DEFAULT_CAPACITY_COLOR_IMAGE | ||
| ), | ||
| } | ||
|
|
||
| _transports_base = ( | ||
| autoconnect() if platform.system() == "Linux" else autoconnect().transports(_mac_transports) | ||
| ) | ||
|
|
||
|
|
||
| def _k1_blueprint(): | ||
| import rerun as rr | ||
| import rerun.blueprint as rrb | ||
|
|
||
| return rrb.Blueprint( | ||
| rrb.Horizontal( | ||
| rrb.Spatial3DView( | ||
| origin="world", | ||
| background=rrb.Background(kind="SolidColor", color=[0, 0, 0]), | ||
| line_grid=rrb.LineGrid3D( | ||
| plane=rr.components.Plane3D.XY.with_distance(0.2), | ||
| ), | ||
| ), | ||
| rrb.Spatial2DView( | ||
| name="Camera", | ||
| origin="world/color_image", | ||
| ), | ||
| ), | ||
| ) | ||
|
|
||
|
|
||
| rerun_config = { | ||
| "pubsubs": [LCM(autoconf=True)], | ||
| "blueprint": _k1_blueprint, | ||
| "visual_override": { | ||
| "world/camera_info": lambda camera_info: camera_info.to_rerun( | ||
| image_topic="/world/color_image", | ||
| optical_frame="camera_optical", | ||
| ), | ||
| }, | ||
| } | ||
|
|
||
| match global_config.viewer_backend: | ||
| case "rerun": | ||
| from dimos.visualization.rerun.bridge import rerun_bridge | ||
|
|
||
| with_vis = autoconnect(_transports_base, rerun_bridge(**rerun_config)) | ||
| case "rerun-web": | ||
| from dimos.visualization.rerun.bridge import rerun_bridge | ||
|
|
||
| with_vis = autoconnect(_transports_base, rerun_bridge(viewer_mode="web", **rerun_config)) | ||
| case _: | ||
| with_vis = autoconnect(_transports_base) | ||
|
|
||
| booster_k1_basic = autoconnect( | ||
| with_vis, | ||
| k1_connection(), | ||
| websocket_vis(), | ||
| ).global_config(n_dask_workers=4, robot_model="booster_k1") | ||
|
|
||
| __all__ = ["booster_k1_basic"] | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| #!/usr/bin/env python3 | ||
| # Copyright 2025-2026 Dimensional Inc. | ||
| # | ||
| # Licensed under the Apache License, Version 2.0 (the "License"); | ||
| # you may not use this file except in compliance with the License. | ||
| # You may obtain a copy of the License at | ||
| # | ||
| # http://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # Unless required by applicable law or agreed to in writing, software | ||
| # distributed under the License is distributed on an "AS IS" BASIS, | ||
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| # See the License for the specific language governing permissions and | ||
| # limitations under the License. | ||
|
|
||
| """Smart blueprints for Booster K1.""" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| #!/usr/bin/env python3 | ||
| # Copyright 2025-2026 Dimensional Inc. | ||
| # | ||
| # Licensed under the Apache License, Version 2.0 (the "License"); | ||
| # you may not use this file except in compliance with the License. | ||
| # You may obtain a copy of the License at | ||
| # | ||
| # http://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # Unless required by applicable law or agreed to in writing, software | ||
| # distributed under the License is distributed on an "AS IS" BASIS, | ||
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| # See the License for the specific language governing permissions and | ||
| # limitations under the License. | ||
|
|
||
| from dimos.core.blueprints import autoconnect | ||
| from dimos.robot.booster.k1.blueprints.basic.booster_k1_basic import booster_k1_basic | ||
|
|
||
| booster_k1 = autoconnect( | ||
| booster_k1_basic, | ||
| ).global_config(n_dask_workers=6, robot_model="booster_k1") | ||
|
|
||
| __all__ = ["booster_k1"] |
27 changes: 27 additions & 0 deletions
27
dimos/robot/booster/k1/blueprints/smart/booster_k1_spatial.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| #!/usr/bin/env python3 | ||
| # Copyright 2025-2026 Dimensional Inc. | ||
| # | ||
| # Licensed under the Apache License, Version 2.0 (the "License"); | ||
| # you may not use this file except in compliance with the License. | ||
| # You may obtain a copy of the License at | ||
| # | ||
| # http://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # Unless required by applicable law or agreed to in writing, software | ||
| # distributed under the License is distributed on an "AS IS" BASIS, | ||
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| # See the License for the specific language governing permissions and | ||
| # limitations under the License. | ||
|
|
||
| from dimos.core.blueprints import autoconnect | ||
| from dimos.perception.spatial_perception import spatial_memory | ||
| from dimos.robot.booster.k1.blueprints.smart.booster_k1 import booster_k1 | ||
| from dimos.utils.monitoring import utilization | ||
|
|
||
| booster_k1_spatial = autoconnect( | ||
| booster_k1, | ||
| spatial_memory(), | ||
| utilization(), | ||
| ).global_config(n_dask_workers=8) | ||
|
|
||
| __all__ = ["booster_k1_spatial"] |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Module-level
matchblock executes at import time with no isolationThe
match global_config.viewer_backend:block (and the conditionalfrom ... import rerun_bridgecalls) run at module import time. This means the blueprint value is baked in at the moment the module is first imported, regardless of when or howbooster_k1_basicis actually used.If
global_config.viewer_backendis set after this module is imported (e.g. lazily via another subsystem), or if the module is imported during a test with a different backend, the wrongwith_visbranch will be chosen and the result is silently incorrect.This is the same pattern used in some existing blueprints, but it is worth flagging here as it could cause subtle bugs when unit-testing or when the viewer backend is configured late in the startup sequence.