Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 17 additions & 16 deletions dimos/robot/unitree_webrtc/unitree_go2_blueprints.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,10 @@

import platform

from dimos_lcm.foxglove_msgs.ImageAnnotations import ( # type: ignore[import-untyped]
ImageAnnotations,
from dimos_lcm.foxglove_msgs.ImageAnnotations import (
ImageAnnotations, # type: ignore[import-untyped]
)
from dimos_lcm.foxglove_msgs.SceneUpdate import SceneUpdate # type: ignore[import-untyped]

from dimos.agents.agent import llm_agent
from dimos.agents.cli.human import human_input
Expand All @@ -43,7 +44,7 @@
from dimos.navigation.replanning_a_star.module import (
replanning_a_star_planner,
)
from dimos.perception.detection.moduleDB import ObjectDBModule, detectionDB_module
from dimos.perception.detection.module3D import Detection3DModule, detection3d_module
from dimos.perception.spatial_perception import spatial_memory
from dimos.protocol.mcp.mcp import MCPModule
from dimos.robot.foxglove_bridge import foxglove_bridge
Expand Down Expand Up @@ -91,39 +92,39 @@
detection = (
autoconnect(
nav,
detectionDB_module(
detection3d_module(
camera_info=GO2Connection.camera_info_static,
),
)
.remappings(
[
(ObjectDBModule, "pointcloud", "global_map"),
(Detection3DModule, "pointcloud", "global_map"),
]
)
.transports(
{
# Detection 3D module outputs
("detections", ObjectDBModule): LCMTransport(
("detections", Detection3DModule): LCMTransport(
"/detector3d/detections", Detection2DArray
),
("annotations", ObjectDBModule): LCMTransport(
("annotations", Detection3DModule): LCMTransport(
"/detector3d/annotations", ImageAnnotations
),
# ("scene_update", ObjectDBModule): LCMTransport(
# "/detector3d/scene_update", SceneUpdate
# ),
("detected_pointcloud_0", ObjectDBModule): LCMTransport(
("scene_update", Detection3DModule): LCMTransport(
"/detector3d/scene_update", SceneUpdate
),
("detected_pointcloud_0", Detection3DModule): LCMTransport(
"/detector3d/pointcloud/0", PointCloud2
),
("detected_pointcloud_1", ObjectDBModule): LCMTransport(
("detected_pointcloud_1", Detection3DModule): LCMTransport(
"/detector3d/pointcloud/1", PointCloud2
),
("detected_pointcloud_2", ObjectDBModule): LCMTransport(
("detected_pointcloud_2", Detection3DModule): LCMTransport(
"/detector3d/pointcloud/2", PointCloud2
),
("detected_image_0", ObjectDBModule): LCMTransport("/detector3d/image/0", Image),
("detected_image_1", ObjectDBModule): LCMTransport("/detector3d/image/1", Image),
("detected_image_2", ObjectDBModule): LCMTransport("/detector3d/image/2", Image),
("detected_image_0", Detection3DModule): LCMTransport("/detector3d/image/0", Image),
("detected_image_1", Detection3DModule): LCMTransport("/detector3d/image/1", Image),
("detected_image_2", Detection3DModule): LCMTransport("/detector3d/image/2", Image),
}
)
)
Comment on lines 92 to 130
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The G1 blueprints (unitree_g1_blueprints.py) still use ObjectDBModule and may experience the same memory accumulation crashes mentioned in the PR description. Consider applying the same fix to the G1 detection blueprint for consistency.

The G1 detection blueprint (lines 185-261 in unitree_g1_blueprints.py) uses both detection3d_module AND detectionDB_module together, which means it will still accumulate detections in memory indefinitely.

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!

Expand Down