ROS 2 Workspace
When you initialize ROS 2 on the agent, a workspace is created at~/ados_ws/ inside the Docker container. This is a standard ROS 2 colcon workspace where you can create packages, write nodes, and build everything with a single command.
Workspace layout
/opt/ados/ros-ws/, so your code persists across container restarts.
Creating a new node
The fastest way to start is with a template:| Template | What it creates | Good for |
|---|---|---|
basic | Publisher + subscriber node | Learning ROS 2, simple data processing |
planner | Subscribes to /odom, publishes /cmd_vel | Trajectory planning, autonomous flight |
perception | Subscribes to /camera/image_raw, publishes detections | Computer vision, object detection |
package.xml, setup.py, a Python node, and a launch file. You can start editing immediately.
Building
Build all packages in the workspace:src/.
Launching your node
After building:Echoing topics
See what a topic is publishing:Example: trajectory planner
Here is a minimal node that reads odometry and publishes velocity commands:/cmd_vel messages into MAVLink velocity setpoints and sends them to the flight controller. The ENU-to-NED conversion is handled automatically.
Interactive shell
For full access to the ROS 2 container:ros2 topic list, ros2 node info, colcon build, etc.).
VS Code integration
For a comfortable development experience, use VS Code with the Remote-SSH extension:- Connect to your companion computer over SSH
- Open the workspace folder at
/opt/ados/ros-ws/ - Install the ROS and Python extensions inside the container