Skip to content

Local Simulation

The fastest sanity check for LAV2 remains the local MuJoCo runner.

Quick Start

Install the project first via Installation, then launch the local runner:

uv run lav2

You can also invoke the module directly:

uv run -m lav2.controllers

Runtime Notes

  • The interactive runner loads the selected robot's registered MuJoCo scene. LAV2 remains the default; select ATMO with --robot ATMO.
  • --mode flight (default) runs the rotor stack and --mode ground runs the differential ground stack.
  • Launch ground gamepad driving with uv run lav2 --mode ground --gamepad. Left-stick vertical commands forward speed, right-stick horizontal commands yaw rate, and the A button switches between flight and ground. Stick commands are scaled by the platform ground-speed and yaw-rate limits and return to zero when the axes are released.
  • scripts/isaaclab/run.py and scripts/genesis/run.py accept the same --gamepad, --mode, and --control-mode options as the interactive MuJoCo runner. Their gamepad input uses the same target scaling and A-button flight/ground switch.
  • Flight gamepad bindings depend on --control-mode: cmd_pos uses left vertical for altitude increments, left horizontal for heading increments, and the right stick for horizontal position; cmd_vel and cmd_acc use left vertical for vertical motion, left horizontal for yaw rate, and the right stick for horizontal motion; cmd_ctatt uses the left stick for throttle/yaw rate and the right stick for roll/pitch attitude; cmd_ctbr keeps the same stick layout but commands roll/pitch body rates.
  • Without --gamepad, ground mode tracks position and heading targets: keys 1/2 change the world X target, 3/4 change world Y, and 7/8 change heading.
  • uv run lav2 --robot ATMO --mode ground --gamepad uses the same differential controller for ATMO. Ground mode commands the arm position actuators toward 90 degrees, while flight mode commands 0 degrees. The position target is rate-limited by TiltWheelVehicleParams.arm_tilt_speed; its default completes a full transition in about four seconds. Ground mode immediately drives one velocity actuator per side while the arms transform; MJCF joint equalities synchronize each side's front and rear wheels.
  • If the simulation saturates or diverges, check in order: (1) that lav2/assets/LAV2/mjcf/scene.xml and referenced mesh files are present; (2) that the MuJoCo rendering backend is functional; (3) controller gains in VehicleParams (especially position/velocity P-gains and integration limits); (4) rotor parameters such as max_rpm, thrust coefficient, and motor time constants.