Running simulations¶
This page summarises the CLI and scripted entry points. Every command accepts
--help for the full option list.
Model capabilities¶
Each model ships with several backends and input modes. The table below shows what each supports — use it to pick the right entry point for your task.
Model |
|
|
|
Fleet |
|---|---|---|---|---|
✓ |
✓ |
✓ |
✓ (via |
|
✓ |
✓ |
✓ (tendon / links / cable) |
✓ (via |
|
— |
— |
✓ |
— |
|
— |
— |
✓ |
— |
See Controllers for the controllers shipped with each model and how to swap them.
Input and force types¶
QuadrotorBase and QuadrotorCsPayloadBase accept several input
repackagings, chosen at construction time via the input=... kwarg:
Input type |
Controller produces |
Integrator consumes |
Use when |
|---|---|---|---|
|
3-vec desired thrust force |
wrench via geometric attitude controller |
high-level trajectory tracking |
|
4-vec |
wrench directly |
custom attitude laws, SysID |
|
4-vec per-rotor forces |
allocated wrench |
motor-level experiments |
Cable models (payload only)¶
|
MuJoCo backend |
Captures slack? |
Notes |
|---|---|---|---|
|
spatial tendon constraint |
— |
fast, less realistic under slack |
|
rigid N-link chain |
✓ |
most stable, recommended default |
|
MuJoCo composite cable |
✓ |
experimental; see ../theory/dynamics/quadrotor-cspayload caveats |
Quadrotor¶
udaan run quadrotor # MuJoCo viewer, hover
udaan run quadrotor -m base # pure dynamics, no rendering
udaan run quadrotor --traj spiral -p 0,0,2 # helical spiral trajectory
udaan run quadrotor --traj lissajous -p 0,0,2 # 3D Lissajous
Quadrotor with cable-suspended payload¶
udaan run quad-payload -c tendon # spatial-tendon cable model
udaan run quad-payload -c links # N-link rigid cable model
The controller used is derived in ../theory/controllers/quadrotor-payload; the underlying dynamics are covered in ../theory/dynamics/quadrotor-cspayload.
Side-by-side fleets¶
Two fleet commands exist for comparing controllers or gains:
udaan run fleet --demo l1-comparison # N quadrotors, L1 vs PD
udaan run cspayload-fleet --demo gain-sweep # N quad+payload, gain sweep
Scripted (Python)¶
from udaan.models.quadrotor_cspayload import QuadrotorCsPayloadMujoco
mdl = QuadrotorCsPayloadMujoco(render=True, cable_model="links")
mdl._payload_controller.setpoint = lambda t: ([0, 0, 1], [0, 0, 0], [0, 0, 0])
mdl.simulate(tf=8.0, payload_position=[1, 1, 0.5])