Current workflow for Pegasus Simulator 5.1, PX4 1.16, ROS 2 Humble, and the mpcc conda environment.
- Isaac Sim 5.1 with Pegasus Simulator
- PX4 1.16 configured in the Pegasus extension
- ROS 2 Humble on Ubuntu 22.04
px4-ros_wsoverlay built and sourced bytools/simdrone_env.shcondaenvironmentmpcc- ROS 2 package:
px4_msgs
Load the project environment with:
cd /home/shaw/DroneSimulator/PegasusSimulator/examples/drone_racing
source ./tools/simdrone_env.shRuntime options are loaded from YAML through DRONE_RACING_CONFIG.
export DRONE_RACING_CONFIG=config_0.yaml
export DRONE_RACING_CONFIG=config_1.yaml
export DRONE_RACING_CONFIG=cfg_visual.yaml
export DRONE_RACING_CONFIG=cfg_lidar.yamlRelative config names are resolved under yamls/; absolute paths also work. If unset, config_0.yaml is used.
Current built-in configs:
config_0.yaml: default single-vehicle configconfig_1.yaml: namespaced/px4_1/*configcfg_visual.yaml: visual pipeline configcfg_lidar.yaml: lidar pipeline config
Recommended launcher:
cd /home/shaw/DroneSimulator/PegasusSimulator/examples/drone_racing
./tools/simdrone_single.shIt starts Isaac Sim, MicroXRCEAgent, and QGroundControl.
Manual startup:
cd /home/shaw/DroneSimulator/PegasusSimulator/examples/drone_racing
isaac_run ./isaacsim/sim_single.py
MicroXRCEAgent udp4 -p 8888
~/DroneSimulator/QGroundControl-x86_64.AppImageTask and scene selection:
isaac_run ./isaacsim/sim_single.py --list-tasks
isaac_run ./isaacsim/sim_single.py --list-scenes
isaac_run ./isaacsim/sim_single.py --task-index 0 --scene-index 0Recommended launcher:
cd /home/shaw/DroneSimulator/PegasusSimulator/examples/drone_racing
./tools/run_code.sh
./tools/run_code.sh mysession cfg_visual.yamlIt starts:
python plan2track/plan2track.pypython fsm/fsm_node.pypython fsm/fsm_app.py
Manual startup:
cd /home/shaw/DroneSimulator/PegasusSimulator/examples/drone_racing
source ./tools/simdrone_env.sh
export DRONE_RACING_CONFIG=cfg_visual.yaml
python plan2track/plan2track.py
python fsm/fsm_node.py
python fsm/fsm_app.pyfsm/fsm_node.py reads controller and solver settings from the selected YAML.
Use fsm/fsm_app.py for interactive commands:
preparetakeoffexecutereturnlandaborthelpstatequit
The config loader is yamls/config.py.
runtime: controller and solver selectionfsm: FSM topics, logging, takeoff speed, and optional auto-land thresholdsplan2track: path topics, waypoint loading mode, loop mode, fixed yaw, andinit_yawtracking_ros: PX4 ROS topics, target system, andpub_offboardtracking.tasks: waypoint file selectiontracking.mpc: horizon, timestep, and reference speedtracking.control: controller timer periodtracking.yaw: yaw gain and yaw-rate limittracking.ctbr: body-rate/thrust conversion parameterstracking.accel_fusion: acceleration smoothingtracking.constraints: MPC state/input boundstracking.mpc_cost: MPC cost weightstracking.mpcc_cost: MPCC cost weights
Notes:
- Isaac Sim uses an ENU world frame. Waypoint text files are loaded as NED and converted to ENU by the planner/simulation utilities.
origin_mode: fixedkeeps the waypoint file origin fixed;origin_mode: first_xyshifts the path so the first waypoint has localx/y = 0/0.fixed_yaw: truepublishesinit_yawas the yaw command.fixed_yaw: falsepublishes path-tangent yaw.pub_offboard: falseprevents publishing the OFFBOARDVehicleCommand; rate setpoints and offboard mode messages are still controlled by the FSM behavior state.
fsm/fsm_node.py: FSM ROS node and transition coordinatorfsm/behaviors.py: per-state behavior and tracker command publicationfsm/fsm_app.py: interactive FSM terminalplan2track/plan2track.py: waypoint/path bridge for MPC/MPCC trackingtracking/tracking_cnt.py: controller step and yaw-rate logictracking/tracking_ros.py: PX4 ROS message bridgeisaacsim/sim_single.py: single-vehicle Isaac Sim appyamls/config.py: YAML config loaderyamls/*.yaml: runtime configs