-
Notifications
You must be signed in to change notification settings - Fork 0
Download ROS
Thâmara Lins edited this page Dec 1, 2023
·
2 revisions
This tutorial will guide you through the process of installing ROS2 Humble on the Linux operating system (Ubuntu 22). ROS (Robot Operating System) is an open source framework that helps developers build and reuse code across robotic applications.
- Open a terminal window.
- Make sure the Ubuntu Universe repository is enabled.
$ sudo apt install software-properties-common $ sudo add-apt-repository universe
- Now add the ROS 2 GPG key.
$ sudo apt update && sudo apt install curl -y $ sudo curl -sSL https://raw.githubusercontent.com/ros/rosdistro/master/ros.key -o /usr/share/keyrings/ros-archive-keyring.gpg
- Add the repository to your sources list.
$ echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/ros-archive-keyring.gpg] http://packages.ros.org/ros2/ubuntu $(. /etc/os-release && echo $UBUNTU_CODENAME) main" | sudo tee /etc/apt/sources.list.d/ros2.list > /dev/null
- Upate and Upgrade the repository caches after configuring the respository.
$ sudo apt update && sudo apt upgrade
- Desktop Install ROS2 Humble.
$ sudo apt install ros-humble-desktop
After the installation is complete, you can perform the following test to verify that everything is proceeding as expected.
- Open a terminal window.
- Source the setup file.
$ source /opt/ros/humble/setup.bash
- After then run a C++ talker.
$ ros2 run demo_nodes_cpp talker
- Open a new terminal window.
- Source the setup file.
$ source /opt/ros/humble/setup.bash
- After then run a Python listener.
$ ros2 run demo_nodes_py listener
After completing the process mentioned above, you should see the speaker announcing the publication of messages and the listener confirming receipt of these messages. This is to verify the correct functionality of the APIs in C++ and Python.
Congratulations! You have successfully installed ROS2 Humble on Linux operating system.