Skip to main content

dim-go2-sim

A simulated Unitree Go2 for dimOS, as one module: cmd_vel in; a rolling Livox Mid-360, a textured front camera, IMU, odometry, tf and contacts out. It drops into a blueprint where a real Go2 would be.

pip install dim-go2-sim
from dimos.core.coordination.blueprints import autoconnect
from dim_go2_sim import Go2Sim

blueprint = autoconnect(
    Go2Sim.blueprint(scene={"package": "supermarket", "start": (18.5, 10.0, -0.17)}),
    MyNavigation.blueprint(),  # anything that reads lidar/odom and writes cmd_vel
)

With no scene it stands on bare ground. A scene is either a cooked dimOS scene package by name (scene.package), or an MJCF of the collision geometry (scene.mjcf) and optionally a textured glTF the camera draws (scene.visual).

Streams

stream type
cmd_vel (in) Twist held for physics.command_timeout, then the robot stands still
lidar PointCloud2 one 0.1 s scan, in mid360_link where each ray fired, with per-point offset_times and lines, as the device reports it
color_image, camera_info Image, CameraInfo the nose camera, RGB
imu Imu body angular velocity, specific force and orientation
odom PoseStamped the true body pose in world
tf TFMessage world → base_link → mid360_link, camera_optical
contacts dim_go2_sim.Contacts (robot part, floor/clutter) pairs touching, whenever they change; ground truth for grading

Config

Go2SimConfig has a section per part, each overridable from a blueprint or the dimOS CLI:

  • scene: package, mjcf, visual, visual_y_up, start (x, y, yaw), floor_z, floor_top_z
  • physics: timestep, fitted, actuator_tau, policy, track_velocity, command_timeout, max_velocity, realtime, cache_dir
  • lidar: enabled, rate_hz, xyz, pitch_deg, point_rate_hz, downsample, min_range, max_range, noise, dropout, self_occlusion, motion_bins_hz, seed
  • camera: enabled, rate_hz, width, height, fovy_deg, xyz, pitch_deg, near, far, ambient, sun, background
  • odom_hz, imu_hz, frame_prefix

See src/dim_go2_sim/config.py for what each means and its default.

How it works

  • Walking. MuJoCo steps the Go2 under the open rl_sar robot_lab policy at 50 Hz, with joint damping, friction, armature, masses, foot friction and a 15 ms motor lag fitted to real Go2 runs under that policy. The policy alone ignores slow commands and drifts when told to stand, so an integral loop on the true body velocity trims its command, as the Go2's sport mode tracks it (physics.track_velocity).
  • Lidar. The Mid-360's four-channel Fourier firing pattern, 200k points a second, cast in 5 ms slices from wherever the head is then, with range noise and grazing-angle dropout. The static scene is cast through Embree; the robot's own body, through MuJoCo. A cooked store of 48k geoms scans at the full 10 Hz.
  • Camera. pygfx draws the scene's textured glTF in a child process, its meshes merged per material (a 47k-node store: 0.6 → 80+ fps on an M-series Mac). It draws the scene only, not the robot. Without a GPU (e.g. Docker), it runs on Mesa's lavapipe: install mesa-vulkan-drivers.
  • The composed world is compiled once and cached (physics.cache_dir, default ~/.cache/dim_go2_sim); a store takes about 2 minutes the first time.

Development

uv venv --python 3.12 && uv pip install -e . pytest
pytest

Licenses

Apache-2.0. Bundled data keeps its own terms: the Go2 model (Unitree, BSD-3, data/go2/LICENSE), the walking policy (rl_sar, Apache-2.0, data/policy/NOTICE), and the Mid-360 pattern (data/mid360/NOTICE.md).

Metadata

Release files for dim-go2-sim 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for dim-go2-sim 0.1.0
File Size Uploaded
dim_go2_sim-0.1.0.tar.gz 5.3 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for dim-go2-sim 0.1.0
File Interpreter ABI Platform
dim_go2_sim-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 10.7 MB

Release files / dim_go2_sim-0.1.0.tar.gz

Download URL dim_go2_sim-0.1.0.tar.gz
Size 5.3 MB
Tags Source
SHA-256 checksum
How to use checksums
f1018e8631e7e610fff340fe7254482c9af76ab12bcb069773f2799a23ad1483
BLAKE2b-256 checksum
How to use checksums
cbe71b68ceab022013d77b399fd2ae2ece9a773439ae728a62fdf6ef4f4432f2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.12

Release files / dim_go2_sim-0.1.0-py3-none-any.whl

Download URL dim_go2_sim-0.1.0-py3-none-any.whl
Size 5.4 MB
Tags Python 3
SHA-256 checksum
How to use checksums
cf535c903278ea470142765f8c5ca0cfb9f78d8ac1e5873d564221b6997f86a0
BLAKE2b-256 checksum
How to use checksums
c195ce47257642a089bf649924d4e33ad5c8459c761b9bd8ef8cd4446ef3d61b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.12

Release history Release notifications | RSS feed

0.1.2

2 release files

0.1.1

2 release files

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page