Skip to content

feat(g1): added rerun visualization for G1#1334

Merged
spomichter merged 2 commits intodevfrom
feat/g1-rerun-viz
Feb 21, 2026
Merged

feat(g1): added rerun visualization for G1#1334
spomichter merged 2 commits intodevfrom
feat/g1-rerun-viz

Conversation

@ruthwikdasyam
Copy link
Contributor

@ruthwikdasyam ruthwikdasyam commented Feb 21, 2026

Summary

  • Add viewer_backend support to the G1 primitive blueprint, matching the existing Go2 pattern
  • G1 blueprints now include RerunBridgeModule when viewer_backend is rerun or rerun-web (the default), enabling browser-based 3D visualization
  • Includes G1-shaped wireframe box
image

@ruthwikdasyam ruthwikdasyam changed the base branch from main to dev February 21, 2026 11:02
@ruthwikdasyam ruthwikdasyam changed the title feat(g1): add Rerun visualization feat(g1): added rerun visualization for G1 Feb 21, 2026
@greptile-apps
Copy link
Contributor

greptile-apps bot commented Feb 21, 2026

Greptile Summary

This PR adds Rerun visualization support to the G1 primitive blueprint, enabling browser-based 3D visualization when viewer_backend is set to rerun or rerun-web.

Key changes:

  • Added conditional visualization backend selection matching the existing Go2 pattern
  • Configured rerun_config with visual overrides for camera info, global map, and navigation costmap
  • Added G1-specific wireframe box with dimensions [0.2, 0.15, 0.75] (vs Go2's [0.35, 0.155, 0.2])
  • Removed hardcoded foxglove_bridge() call, replaced with dynamic _with_vis based on global_config.viewer_backend
  • Maintained backward compatibility with Foxglove and allows no-visualization mode

Confidence Score: 5/5

  • This PR is safe to merge with minimal risk
  • The implementation follows the established Go2 pattern exactly, uses proper match/case syntax for backend selection, includes appropriate G1-specific dimensions for the wireframe, and maintains backward compatibility with all existing visualization backends
  • No files require special attention

Important Files Changed

Filename Overview
dimos/robot/unitree/g1/blueprints/primitive/uintree_g1_primitive_no_nav.py Added Rerun visualization support with G1-specific wireframe dimensions following the Go2 pattern

Last reviewed commit: 3c719b3

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

1 file reviewed, no comments

Edit Code Review Agent Settings | Greptile

@spomichter spomichter merged commit 002e456 into dev Feb 21, 2026
14 of 16 checks passed
spomichter added a commit that referenced this pull request Feb 21, 2026
* fix(g1): add video stream and camera_info to G1SimConnection

G1SimConnection was missing color_image and camera_info outputs,
so MuJoCo-rendered frames never reached the rerun bridge. Mirrors
the Go2 connection pattern: subscribes to video_stream(), publishes
camera_info in a background thread, and adds camera_optical TF frame.

* fix(g1): remove /g1/ topic prefix to match Go2 and rerun overrides

The rerun visual_overrides from #1334 used world/camera_info and
world/color_image (matching Go2), but the G1 transports used /g1/
prefixed topics. This mismatch meant the rerun bridge never applied
the camera_info pinhole overlay.

Remove the /g1/ prefix from color_image and camera_info transports
in the primitive blueprint and the SHM blueprint. Now matches Go2
convention and the rerun overrides work correctly.

* fix(g1): skip webcam camera_module in simulation mode

In sim, G1SimConnection now provides video from MuJoCo. The webcam
camera_module in the primitive was also publishing to color_image,
causing interleaved webcam + MuJoCo frames. Conditionally skip
camera_module when global_config.simulation is True.

* fix(g1): use correct MuJoCo camera intrinsics and add thread exit condition

- Replace hardcoded 1280x720 Go2 intrinsics with computed values from
  MuJoCo constants (320x240, FOV=45°) matching MujocoConnection pattern
- Add _stop_event to camera_info loop for clean shutdown

* fix(sim): increase MuJoCo video render resolution to 1280x720

* fix(g1): revert MuJoCo resolution, use Go2 camera intrinsics for rerun

MuJoCo framebuffer can't exceed 640 width without XML config. Reverted
render resolution to 320x240. Use the same 1280x720 camera intrinsics
as Go2 for rerun display scaling (matches Go2 sim behavior exactly).

* fix(sim): increase MuJoCo render resolution to 1280x720

Set offscreen framebuffer size in model XML to support the higher
resolution. Previously failed because MuJoCo's default offscreen
buffer is only 640 wide.

* Revert "fix(sim): increase MuJoCo render resolution to 1280x720"

This reverts commit f21d37b.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants