Skip to content

Tools

Run toolkit commands from the repository root. In Docker, run Docker commands on the host and toolkit/ROS commands inside the container.

Choose a terminal

Terminal Open it Use it for
Ubuntu shell Repository root ./tools/…, ROS 2 launches, recording and analysis
PX4 in SITL px4 tmux window Native PX4 commands, including se3_control
PX4 on hardware QGroundControl MAVLink Console Native commands on the flight controller
Ground control SITL MAVProxy/QGC; hardware GCS Pilot inputs, status and mode changes

PX4 uses pxh> in SITL and typically nsh> on hardware. Ubuntu and PX4 commands are not interchangeable. The hardware session contains only the mocap and optional DDS panels; use a separate shell for manual ROS commands.

Start and inspect services

Choose the environment installed on this machine:

./tools/sitl start headless

or, on the physical companion:

./tools/hardware start

SITL starts Gazebo with a GUI unless headless is selected. Repeating start attaches to the running session. Use ./tools/sitl status or ./tools/hardware status in another shell; use the matching stop after landing and disarming.

The SITL and companion guides list the services and configuration for each runtime.

Communication paths

MAVLink remains the aircraft's ground-control transport, not a toolkit service. SITL provides its configured MAVProxy or QGroundControl frontend through PX4's GCS stream; native PX4 commands use the px4 terminal. On hardware, QGroundControl connects independently over the aircraft's telemetry link, with its MAVLink Console providing native commands.

uXRCE-DDS transports PX4 state and ROS 2 controller setpoints through the agent (UDP in SITL, serial in the hardware profile). Source the ROS runtime in each manual ROS shell:

source ros2/runtime_env.sh
./tools/topic_rates vehicle_local_position vehicle_status_v1 --duration 5

topic_rates measures host callback arrivals after a 1-second warmup; these are not controller update rates. The hardware mocap bridge provides estimator observations.

SITL's default MAVProxy loads a software joystick used by the repeatable Position-mode takeoff/staging demonstrations. QGroundControl is an optional SITL frontend; choosing it does not provide that software joystick. Physical aircraft use their configured pilot controls and independent GCS as required.

Command and tool reference

The Ubuntu repository shell provides the following toolkit commands. ROS state and controller traffic use DDS; the removed MAVLink router is not required.

Tool Purpose Procedure
./tools/px4_record Independently record PX4 DDS telemetry to a ROS bag Onboard logging
./tools/px4_analyze Analyze a finalized ROS bag or PX4 ULog Analysis
./tools/px4_compare Compare supported recorded ROS flights Comparison
./tools/run_sequence Run a configured series of controller launches Sequences

Configure native SE3_* and TRJ_* parameters directly in PX4. See Onboard control for the flight procedure.

In the PX4 shell, use native se3_control commands. See Onboard and Offboard operation.

Recording and analysis tools

./tools/px4_record onboard_se3 starts independent ROS recording in the foreground; the recorder does not arm, select a mode or start motion. ./tools/px4_record status and stop can be used from another repository shell. A supported ROS launch can instead own recording with record:=true. PX4 ULog is a separate on-aircraft log, transferred after finalization.

px4_analyze reads ROS bags or .ulg files. px4_compare compares finalized ROS bags and requires --output for standalone runs outside a recognized study. ULog comparison uses a separate command. See Data formats, Recording, and Analysis. run_sequence launches controllers and requires prepared SITL.