unitree-go2 efficiency review - #3272
Merged
Merged
Conversation
…couting Sessions relied purely on multicast scouting to find the robot, and many APs filter multicast between WiFi clients: the Go2's go2web bridge sat reachable on tcp/7447 while every scout went unanswered. go2web listens on 0.0.0.0:7447 exactly for this case — dimos just never dialed in. ZenohConfig.connect now defaults to tcp/<robot_ip>:7447 (plus any --robot-ips) when the transport is zenoh. Scouting stays on for everything else, an explicit connect override still wins, and an IP carrying its own :port is used as given. (cherry picked from commit 735adcb)
cv2/open3d/rerun are now imported inside the functions that use them (or under TYPE_CHECKING for annotations only) across all 63 grandfathered files, so importing all_blueprints no longer drags 400+ MB of native extensions into every forked worker. Three cases needed more than moving the statement: - apriltag: _FAMILIES held cv2.aruco constants at module level, now a functools.cache'd _families() - rerun bridge: pydantic evaluates Config's annotations at runtime, so BlueprintFactory/VisualOverride resolve to bare Callable off the type checker and the explicit model_rebuild() is gone - relocalize: the _reg = o3d.pipelines.registration alias moved into its four callers Tests that monkeypatched a module-level rr/o3d now patch rerun.log and sys.modules["open3d"] instead.
leshy
requested review from
Dreamsorcerer,
mustafab0,
paul-nechifor and
spomichter
as code owners
July 29, 2026 16:02
# Conflicts: # dimos/cli/apriltag3d.py # dimos/mapping/cli/replay.py # dimos/mapping/cli/replay_marker.py
Codecov Report❌ Patch coverage is @@ Coverage Diff @@
## main #3272 +/- ##
==========================================
- Coverage 75.69% 74.85% -0.84%
==========================================
Files 1131 1137 +6
Lines 108747 108994 +247
Branches 9807 9834 +27
==========================================
- Hits 82313 81591 -722
- Misses 23630 24611 +981
+ Partials 2804 2792 -12
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 38 files with indirect coverage changes 🚀 New features to boost your workflow:
|
Contributor
|
Too many files changed for review. ( Bypass the limit by tagging |
Contributor
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Workflows to automatically generate PRs for you. |
Co-authored-by: Paul Nechifor <paul@nechifor.net>
leshy
enabled auto-merge
July 30, 2026 07:20
# Conflicts: # dimos/perception/test_object_scene_registration_temporal.py
spomichter
previously approved these changes
Jul 30, 2026
github-merge-queue
Bot
removed this pull request from the merge queue due to failed status checks
Jul 30, 2026
The wavefront exploration feature is being replaced; its tests were too flaky to keep gating CI.
paul-nechifor
approved these changes
Jul 30, 2026
paul-nechifor
enabled auto-merge
July 30, 2026 10:22
github-merge-queue
Bot
removed this pull request from the merge queue due to failed status checks
Jul 30, 2026
leshy
added a commit
that referenced
this pull request
Jul 30, 2026
Conflicts, all from main's inline-heavy-imports sweep (#3272) landing on files this branch moved or deleted: - dimos/perception/common/utils.py: kept the branch's deletion (dead code, nothing imports it) over main's cv2 inlining. - test_object_scene_registration_temporal.py: took main's sys.modules patch, since open3d is now imported inside get_full_scene_pointcloud(). - tool_localize.py: new on this branch, so it never got the sweep - moved the rerun render into a function so the imports are inline.
leshy
added a commit
that referenced
this pull request
Jul 30, 2026
main's inline-heavy-imports sweep (#3272) dropped the module-level cv2 that this method, added on this branch, was still using.
TomCC7
pushed a commit
that referenced
this pull request
Jul 30, 2026
main's inline-heavy-imports sweep (#3272) dropped the module-level cv2 that this method, added on this branch, was still using.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Main go2 is not amazing, my laptop thermally throttles eventually and then this explodes to load 50
This branch fixes it:
reconfigured a bunch of libs to limit number of threads (they normally enumerate cpu N to create a pool, but their imports leaked and would create a pool before forking, which quickly oversubscribes the system, number of total threads in dimos was 1k+
added a test to forbid non-inline imports of o3d, opencv, rerun (random rerun import alone before forking was 800 threads)
fixed zenoh autodiscovery blockage, by default running local only
added zenoh system configurator for (previusly failing) implicit SHM transport
not important but added a more efficient cpu only voxelizer (4x worse, not 20x worse then cuda, like previously)