Skip to main content

Installing ROS 2

This guide walks you through installing ROS 2 and setting up a ROS 2 workspace.

ROS 2 (Robot Operating System 2) is a modern, open-source framework for building robotic software: https://www.ros.org/

Prerequisites

Choose your ROS 2

Select a ROS 2 distribution to install (Humble is recommended).

Install

Click on your chosen ROS 2 distro name and follow the install guide on the website.

Quick Link

Replace humble with your chosen ROS 2 distro: https://docs.ros.org/en/humble/Installation/Ubuntu-Install-Debs.html

The packages you need to install vary based on the tools you use, but OpenArm recommends installing ros-humble-desktop.

sudo apt install -y ros-humble-desktop # or ros-humble-ros-base - Minimal setup (no GUI tools)

To use the openarm_ros2 repository, you'll also need the following packages, so install them.

sudo apt install -y \
ros-humble-controller-manager \
ros-humble-gripper-controllers \
ros-humble-hardware-interface \
ros-humble-joint-state-broadcaster \
ros-humble-joint-trajectory-controller

# You must also install the following packages when using MoveIt2.
sudo apt install -y \
ros-humble-moveit-configs-utils \
ros-humble-moveit-planners \
ros-humble-moveit-ros-move-group \
ros-humble-moveit-ros-visualization

Source ROS 2 Environment:

echo "source /opt/ros/humble/setup.bash" >> ~/.bashrc
source ~/.bashrc

Install Development Tools (Optional but Recommended): https://docs.ros.org/en/humble/Installation/Alternatives/Ubuntu-Development-Setup.html#install-development-tools-and-ros-tools

Verify Installation

Try running:

ros2 -h
ros2 topic list