Skip to content

run

Interactive MuJoCo runner for flight and track controllers.

Functions:

Name Description
key_callback

Handle keyboard target updates.

load_callback

Load the MuJoCo model and data for the viewer.

control_callback

Run the control loop for the active mode.

main

Launch the interactive demo with CLI options.

key_callback

key_callback(keycode: int) -> None

Handle keyboard target updates.

load_callback

load_callback() -> tuple[mujoco.MjModel, mujoco.MjData]

Load the MuJoCo model and data for the viewer.

Returns:

Name Type Description
tuple tuple[MjModel, MjData]

(m, d) MuJoCo model and data objects.

control_callback

control_callback(m: MjModel, d: MjData) -> None

Run the control loop for the active mode.

main

main(argv: list[str] | None = None) -> None

Launch the interactive demo with CLI options.

Parameters:

Name Type Description Default

argv

list[str] | None

Optional argument list to parse.

None
Notes

--mode: 0=flight (default), 1=track. --control: Flight controller: pid|geo (default pid). Track: pid. --control-mode: Flight control mode (cmd_pos|cmd_vel|cmd_ctatt|cmd_ctbr). --gamepad: Enable gamepad input. --trajectory: Enable automatic trajectory tracking for flight cmd_pos/cmd_vel only.