|
Download examples/control_with_mujoco/README.md from zhicao/i2rt: direct link, hf CLI and curl.
- Browser
- Download file 2.19 kB
-
https://huggingface.co/zhicao/i2rt/resolve/main/examples/control_with_mujoco/README.md
- Command line
-
hf download hf://zhicao/i2rt/examples/control_with_mujoco/README.md
-
curl -L -o README.md https://huggingface.co/zhicao/i2rt/resolve/main/examples/control_with_mujoco/README.md
2.19 kB
MuJoCo Control Interface
Interactive MuJoCo viewer for i2rt robots. Starts in gravity-comp visualisation mode and can toggle into IK-based mocap control.
Modes
| Mode | Description |
|---|---|
| VIS (default) | Mirrors the robot's live joint positions. Gravity-comp is active on real hardware. |
| CONTROL | Moves the robot by dragging a target marker in the viewer via inverse kinematics. |
Press SPACE in the viewer to toggle between modes.
Usage
Simulation (no hardware required)
# YAM arm with linear_4310 gripper (default)
python examples/control_with_mujoco/control_with_mujoco.py --sim
# big_yam arm with linear_4310 gripper
python examples/control_with_mujoco/control_with_mujoco.py --arm big_yam --gripper linear_4310 --sim
# Arm-only (no gripper)
python examples/control_with_mujoco/control_with_mujoco.py --arm yam --gripper no_gripper --sim
Real hardware
python examples/control_with_mujoco/control_with_mujoco.py --channel can0
python examples/control_with_mujoco/control_with_mujoco.py --arm big_yam --gripper linear_4310 --channel can0
Arguments
| Argument | Default | Description |
|---|---|---|
--arm |
yam |
Arm type: yam, yam_pro, yam_ultra, big_yam, no_arm (gripper-only; cannot combine with --gripper no_gripper) |
--gripper |
linear_4310 |
Gripper type: linear_4310, linear_3507, crank_4310, flexible_4310, yam_teaching_handle, no_gripper |
--channel |
can0 |
CAN interface name (real hardware only) |
--sim |
off | Use simulation instead of real hardware |
--dt |
0.02 |
Control loop timestep in seconds |
--site |
auto | MuJoCo site used as end-effector (auto-detected from gripper: tcp_site for yam_teaching_handle, else grasp_site) |
--log |
off | Log joint state and torques to terminal each iteration |
Viewer Controls (CONTROL mode)
- Press SPACE to enter CONTROL mode (marker turns red)
- Double-click the target sphere to select it
- Ctrl + right-drag — translate the target
- Ctrl + left-drag — rotate the target
- Press SPACE again to return to VIS mode