Skip to content

Commit ba985ac

Browse files
Merge pull request #1807 from jasonrandrews/review
Update ROS 2 install guide
2 parents 81e57d1 + 0aa16fb commit ba985ac

File tree

2 files changed

+81
-39
lines changed

2 files changed

+81
-39
lines changed

content/install-guides/ros2.md

Lines changed: 77 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: ROS2
2+
title: ROS - Robot Operating System
33
author: Odin Shen
44
minutes_to_complete: 30
55
official_docs: https://www.ros.org/blog/getting-started/
@@ -12,7 +12,6 @@ test_maintenance: true
1212

1313
additional_search_terms:
1414
- linux
15-
- cloud
1615

1716
layout: installtoolsall
1817
multi_install: false
@@ -21,14 +20,14 @@ tool_install: true
2120
weight: 1
2221
---
2322

24-
The Robot Operating System [ROS](https://www.ros.org/) is a set of software libraries and tools for building robot applications.
23+
The Robot Operating System ([ROS](https://www.ros.org/)) is a set of software libraries and tools for building robot applications.
2524
ROS 2 is the latest version, designed to enhance security, improve distributed system communication, and support real-time performance, addressing some of the limitations of ROS 1.
2625

2726
## Before you begin
2827

29-
ROS2 is available for Ubuntu Linux 22.04, 24.04 and Windows 11.
28+
ROS 2 is available for Ubuntu Linux 22.04, 24.04, and Windows.
3029

31-
This article provides a quick solution to install ROS2 for Ubuntu on Arm.
30+
This article provides a quick solution to install ROS 2 for Ubuntu on Arm. You can use Ubuntu 22.04 LTS or Ubuntu 24.04 LTS.
3231

3332
Confirm you are using an Arm machine by running:
3433

@@ -44,51 +43,89 @@ aarch64
4443

4544
If you see a different result, you are not using an Arm computer running 64-bit Linux.
4645

47-
## How do I Install ROS2 for Ubuntu on Arm?
46+
## What are the ROS 2 dependencies?
4847

49-
We will install ROS 2 using APT.
50-
By default, the Ubuntu package lists do not include ROS 2, so you need to manually execute the setup first.
48+
First, install the general dependencies:
5149

5250
```bash
5351
sudo apt update
54-
sudo apt install curl -y
52+
sudo apt install curl software-properties-common build-essential -y
53+
```
54+
55+
## How do I Install ROS 2 for Ubuntu on Arm?
56+
57+
You can install ROS 2 using the APT package manager.
58+
59+
The Ubuntu package lists do not include ROS 2, so you need to add the repository.
60+
61+
```bash
5562
sudo curl -sSL https://raw.githubusercontent.com/ros/rosdistro/master/ros.key -o /usr/share/keyrings/ros-archive-keyring.gpg
5663
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/ros-archive-keyring.gpg] http://packages.ros.org/ros2/ubuntu $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/ros2.list > /dev/null
64+
sudo apt update
5765
```
5866

59-
There are two of distros (Jazzy Jalisco and Humble Hawksbill) can be installed depended on your Ubuntu version.
60-
For Ubuntu Linux 24.04, you should use Jazzy Jalisco.
61-
For Ubuntu Linux 22.04, you should use Humble Hawksbill.
67+
Install the ROS 2 dependencies:
68+
69+
```bash
70+
sudo apt install -y \
71+
python3-pip \
72+
python3-rosdep \
73+
python3-colcon-common-extensions
74+
```
75+
76+
There are two releases of ROS 2, Jazzy Jalisco and Humble Hawksbill, which you can install based on your Ubuntu version.
77+
78+
- For Ubuntu Linux 24.04, you should install Jazzy Jalisco.
79+
- For Ubuntu Linux 22.04, you should install Humble Hawksbill.
80+
81+
## How can I install ROS 2?
82+
83+
Install ROS 2 based on your Ubuntu version:
6284

6385
{{< tabpane code=true >}}
6486
{{< tab header="Ubuntu 24.04" language="bash">}}
65-
sudo apt update
66-
sudo apt install ros-jazzy-desktop
67-
sudo apt install ros-jazzy-ros-base
68-
source /opt/ros/jazzy/setup.bash
87+
# Install ROS2 packages
88+
sudo apt install -y ros-jazzy-desktop
89+
# Initialize rosdep
90+
sudo rosdep init
91+
rosdep update
6992
{{< /tab >}}
7093
{{< tab header="Ubuntu 22.04" language="bash">}}
71-
sudo apt update
72-
sudo apt install ros-humble-desktop
73-
sudo apt install ros-humble-ros-base
74-
sudo apt install ros-dev-tools
75-
source /opt/ros/humble/setup.bash
94+
# Install ROS2 packages
95+
sudo apt install -y ros-humble-desktop
96+
# Initialize rosdep
97+
sudo rosdep init
98+
rosdep update
7699
{{< /tab >}}
77100
{{< /tabpane >}}
78101

79-
Confirm the version `ros2` is installed by using printenv:
102+
## How do I configure the environment?
80103

81-
```bash
104+
Add ROS 2 setup to your shell startup script:
105+
106+
{{< tabpane code=true >}}
107+
{{< tab header="Ubuntu 24.04" language="bash">}}
108+
echo "source /opt/ros/jazzy/setup.bash" >> ~/.bashrc
109+
source ~/.bashrc
110+
{{< /tab >}}
111+
{{< tab header="Ubuntu 22.04" language="bash">}}
112+
echo "source /opt/ros/humble/setup.bash" >> ~/.bashrc
113+
source ~/.bashrc
114+
{{< /tab >}}
115+
{{< /tabpane >}}
116+
117+
Confirm ROS 2 is installed by using printenv:
118+
119+
```console
82120
printenv ROS_DISTRO
83121
```
84122
The output should print either `jazzy` or `humble`, depending on your Ubuntu version.
85123

86-
87-
## Quick test on ROS2
124+
## How can I test the ROS 2 installation?
88125

89126
In one terminal run a `talker`:
90127

91-
```bash
128+
```console
92129
ros2 run demo_nodes_cpp talker
93130
```
94131

@@ -107,20 +144,14 @@ The output will continue to be similar to the one shown below, indicating that R
107144
...
108145
```
109146

110-
Then, open another terminal source the setup file and then run `listener`:
111-
{{< tabpane code=true >}}
112-
{{< tab header="Ubuntu 24.04" language="bash">}}
113-
source /opt/ros/jazzy/setup.bash
114-
ros2 run demo_nodes_cpp listener
115-
{{< /tab >}}
116-
{{< tab header="Ubuntu 22.04" language="bash">}}
117-
source /opt/ros/humble/setup.bash
118-
ros2 run demo_nodes_cpp listener
119-
{{< /tab >}}
120-
{{< /tabpane >}}
121147

122-
If you see "I heard [Hello World: ]" in second terminal shown below, it's mean your ROS2 has been successfully installed.
123-
You are now ready to use ROS2.
148+
Then, open another terminal and run the `listener`:
149+
150+
```console
151+
ros2 run demo_nodes_cpp listener
152+
```
153+
154+
If you see "I heard [Hello World: ]" in the second terminal as shown below, it means ROS 2 has been successfully installed.
124155

125156
```output
126157
[INFO] [1741389927.137762134] [listener]: I heard: [Hello World: 1]
@@ -134,3 +165,10 @@ You are now ready to use ROS2.
134165
[INFO] [1741389935.125036222] [listener]: I heard: [Hello World: 9]
135166
...
136167
```
168+
169+
You are now ready to use ROS 2.
170+
171+
## Where can I learn more about ROS 2?
172+
173+
- Explore the [ROS 2 Tutorials](https://docs.ros.org/en/jazzy/Tutorials.html)
174+
- Learn about [ROS 2 Command Line Tools](https://docs.ros.org/en/jazzy/Concepts/About-Command-Line-Tools.html)

data/stats_current_test_info.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,10 @@ sw_categories:
146146
rust_embedded:
147147
readable_title: Rust for Embedded Applications
148148
tests_and_status: []
149+
ros2:
150+
readable_title: ROS2
151+
tests_and_status:
152+
- ubuntu:latest: passed
149153
ssh:
150154
readable_title: SSH
151155
tests_and_status: []

0 commit comments

Comments
 (0)