Skip to content

Getting started with ROS and ArduPilot

This page will help you understand how to operate ROS 2 and ArduPilot

Disclaimer

This project uses ROS 2 and not ROS 1. I use Iron for the demo and Ubuntu 22.04 Jammy

Installing ROS 2

Steps

1. Updating your package index

Terminal window
sudo apt update && sudo apt upgrade -y

2. Installing ROS 2 dependencies

Terminal window
sudo apt install -y python3-colcon-common-extensions python3-vcstool

3. Adding ROS 2

Terminal window
sudo sh -c 'echo "deb [arch=amd64,arm64] http://packages.ros.org/ros2/ubuntu $(lsb_release -cs) main" > /etc/apt/sources.list.d/ros2.list'

4.Setting up your environment

Terminal window
sudo apt install -y curl
curl -s https://raw.githubusercontent.com/ros/rosdistro/master/ros.asc | sudo apt-key add -
sudo apt update

5.Installing ROS 2

Please install any of the following options, I prefer desktop

Terminal window
sudo apt install -y ros-iron-desktop
Possible options
  • ros-humble-ros-base
  • ros-dev-tools

6. Initializing

Terminal window
source /opt/ros/iron/setup.bash

Alternatively you can add it to your .bashrc/.zshrc