🎮 Robot Control¶
OrcaGym provides a rich set of robot control interfaces, from low-level joint control to high-level inverse kinematics.
For complete runnable code, see OrcaPlayground examples/euler/ (Lessons 4-9).
Control Hierarchy¶
High-Level API
├── Damped Least Squares IK ── end-effector pose → joint positions (with limit clamping)
├── PD Controller ── target position → control torque
├── ONNX Walking Policy ── observation → target joint angles (G1 walking)
└── Mocap Control ── directly set mocap pose + WELD constraint driving
Low-Level API
├── do_simulation() ── set ctrl + step + auto-sync (recommended)
├── set_joint_qpos() ── set joint positions
├── apply_body_force() ── apply external force
└── mj_forward() ── refresh derived quantities
Chapter Navigation¶
- 📡 State Query API — Complete API for joints, bodies, sensors, and contact queries
- 🎯 Action Space — Action space definition and types
- 👁️ Observation Space — Observation construction and normalization
- 🦿 Joint Control — set_ctrl, PD controller, low-pass filtering
- 🦾 Inverse Kinematics — Damped least squares IK + joint limits
- 🎭 Mocap Control — Mocap body + WELD constraint = object dragging
- 🔄 External Force Application and IK — External force application + Jacobian + IK complete workflow