flightopsDocumentation
Tutorials

Launch and inspect a ROS 2 system

2 min readdocs/tutorials/launch.md (source repository)

Use this path when you want Flightops to start a launch file and watch the result in the same terminal. The launch runs in the foreground under Flightops ownership.

Prerequisites

Install Flightops and source your ROS underlay and workspace overlay. Check that the launch works in your normal ROS environment. Run flightops doctor if Flightops reports a ROS setup problem.

1. Choose a launch file

For a file installed in a ROS package:

bash
flightops launch my_robot bringup.launch.py use_sim_time:=true

Replace the package and filename with yours. For a local file, run from your project directory:

bash
flightops launch ./launch/robot.launch.py use_sim_time:=true

Flightops passes NAME:=VALUE arguments to ros2 launch. Python, XML, and YAML ROS 2 launch files are accepted. A ROS 1 .launch file is not.

2. Watch startup

Health (1) lists launch and graph problems first and shows launch state and graph counts. Press L for the launch log, then Esc to close the log before quitting. The launch log guide explains its search and filters. Press r to refresh if nodes have not appeared yet. A discovered node alone does not establish readiness. If the project has declared launch checks, Flightops shows their individual results. Otherwise readiness remains unknown.

If launch fails, Flightops prints the retained log path. Keep that log and the session's launch.json when investigating the failure.

For concrete investigations, see the Nav2, Panda, and Go2 troubleshooting examples.

3. Stop and reopen

Press q or Ctrl+C. Flightops stops the launch process tree it started. It sends SIGINT first and allows up to 6 seconds for a clean shutdown before it escalates. Closing the terminal window also stops the launch.

Attach and launch keep separate default sessions, so running flightops again opens a fresh observation session. To reopen the launch's retained session, choose its directory when you launch and pass the same directory to attach:

bash
flightops --session-dir ./robot-session launch my_robot bringup.launch.py
flightops --session-dir ./robot-session attach

Run the second command from the same directory and ROS environment, with the same --project if you used one. It shows the retained launch record and log and does not start that launch again. Run the explicit flightops launch ... command when you want another launch. See reopen a launch session for details.

Next steps

Use attach to observe nodes started elsewhere. For launch arguments and source inspection, see the advanced user guide.