ROS/ROS2¶

ArduPilot capabilities can be extended with ROS (aka Robot Operating System).
ROS provides libraries, tools, hardware abstraction, device drivers, visualizers, message-passing, package management, and more to help software developers create robot applications. In the future, we expect ROS will be replaced by ROS2

MAVROS is a ROS package that can convert between ROS topics and MAVLink messages allowing ArduPilot vehicles to communicate with ROS. The MAVROS code can be found here.
These pages will show you how to:
- Installing ROS
- Installing MAVROS
- Install ROS2
- Connecting to ArduPilot from ROS
- Hector SLAM for non-GPS navigation
- Google Cartographer SLAM for non-GPS navigation
- VIO tracking camera for non-GPS navigation
- Sending Commands from rviz
- Object Avoidance
- Clock/Time syncronisation
- Send data from AP to ROS/mavros
- ROS with SITL
- ROS 2 with SITL
- ROS with SITL in Gazebo
- ROS 2 with SITL in Gazebo
- Cartographer SLAM with ROS 2 in SITL
- ROS with distance sensors
- ROS with Aruco Boards detection
- ROS with Apriltag Boards detection
Prerequisites¶
Learn on to use ArduPilot first by following the relevant wiki for Rover, Copter or Plane. In particular, make sure the vehicle works well in Manual and Autonomous modes like Guided and Auto before trying to use ROS.
Learn how to use ROS by reading the beginner tutorials. In the case of a problem with ROS, it is best to ask on ROS community forums first (or google your error). You will find many other tutorials about ROS like Emlid.
Here is ArduPilot Rover performing path planning around objects using ROS navigation.