Asimov 1 MuJoCo simulation for LeRobot

Asimov 1 in the sim

Menlo's Asimov 1 in MuJoCo, built like lerobot/unitree-g1-mujoco: the same simulator loop, elastic band, viewer, ZMQ camera publisher and make_env() entry point, with the Asimov model in place of the G1.

Where the G1 sim speaks Unitree's DDS, this one speaks the robot's own protocol: it emulates Asimov Edge, the onboard service the Menlo SDK talks to. LeRobot's Asimov driver therefore connects to the sim exactly as to the real robot, with host=127.0.0.1.

Run it

pip install -r requirements.txt
python run_sim.py

The robot starts in STAND, held up by the elastic band with its feet just off the floor. In the viewer, 9 releases the band, 7 / 8 lower and raise it.

Then, from a LeRobot checkout with the Asimov driver, walk it with LeRobot's locomotion controller:

python run_locomotion.py

which is

from lerobot.robots.asimov import Asimov, AsimovConfig

robot = Asimov(AsimovConfig(host="127.0.0.1", control_mode="whole_body", robot_supported=True))
robot.connect()
robot.send_action({"x.vel": 0.3, "y.vel": 0.0, "theta.vel": 0.0})  # m/s, m/s, deg/s

Release the band once the policy has taken over (about 2 s after connecting). On a Wayland desktop, start the sim with MUJOCO_GL=egl so its camera renderers do not share the viewer's GLFW context.

Asimov Edge emulation

Commands asimov.io.RobotCommand on UDP 127.0.0.1:8850
State asimov.io.RobotState pushed to UDP 127.0.0.1:8851, every physics step (200 Hz)
Target facts GET http://127.0.0.1:3000/api/version → {"robot_model": "asimov_1", "robot_os_version": "0.2.0"}
Modes starts in STAND holding the stance; a trajectory switches to MOVE; DAMP 2 s after the last trajectory, as Edge does; STAND and DAMP mode requests

Joint vectors use the firmware's 25 slots. Trajectories carry ankles as pitch/roll; state reports them as the A/B motors, through the same coupling as the firmware. The IMU (gyro, projected gravity, quaternion) is the pelvis site. Velocity commands are accepted but do not move the robot: the sim has no onboard walking policy, so use LeRobot's control_mode=whole_body, which runs the policy itself and streams trajectories. Ports and timings are in config.yaml.

Cameras

Like the G1 sim, three streams on tcp://127.0.0.1:5555, 640 × 480 at about 30 Hz:

Stream name Mount
head_camera head (neck_pitch_link), 90° vertical field of view
left_wrist_cam left wrist (left_wrist_yaw_link), 95°
right_wrist_cam right wrist (right_wrist_yaw_link), 95°

The message format is the G1 sim's, so view_cameras_live.py and LeRobot's ZMQ cameras work unchanged; lerobot_cameras.json holds the client configuration. make_env(cameras=["head_camera"]) selects a subset, publish_images=False disables publishing and onscreen=False the viewer.

The model

The robot is not bundled. On startup sim/robot_model.py downloads it from the lerobot/robot-urdfs dataset, at the revision pinned in config.yaml: Menlo's MJCF and meshes in Menlo's black and orange livery. It then removes the standalone world, adds one torque motor per joint (limited to the joint's actuatorfrcrange) and the three cameras, and loads it into assets/scene_25dof.xml, the world (floor, sky, lights, global_view).

Physics are Menlo's: 200 Hz, the policy's training timestep. Joint PD runs in the sim from the gains each trajectory carries.

Checks

MUJOCO_GL=egl python -m unittest discover -s tests -v   # model, Edge protocol, band
MUJOCO_GL=egl python tests/smoke_live.py                # LeRobot's driver walks it

smoke_live.py needs a LeRobot checkout with the Asimov driver.

TODO

  • Unify with the G1 sim. This repository is the G1 sim with the robot swapped: sim/base_sim.py, the band, viewer, image publisher, env.py and run_sim.py are shared code. What differs per robot is the model, config.yaml and the protocol bridge (sim/asimov_edge_bridge.py here, sim/unitree_sdk2py_bridge.py there). One humanoid sim with a robot profile (model, config, bridge) per robot would replace both, the way the G1 sim already selects end effectors.

Licenses

Downloads last month
35
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support