11---
2- title : ROS2
2+ title : ROS - Robot Operating System
33author : Odin Shen
44minutes_to_complete : 30
55official_docs : https://www.ros.org/blog/getting-started/
@@ -12,7 +12,6 @@ test_maintenance: true
1212
1313additional_search_terms :
1414- linux
15- - cloud
1615
1716layout : installtoolsall
1817multi_install : false
@@ -21,14 +20,14 @@ tool_install: true
2120weight : 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.
2524ROS 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
3332Confirm you are using an Arm machine by running:
3433
@@ -44,51 +43,89 @@ aarch64
4443
4544If 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
5351sudo 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
5562sudo curl -sSL https://raw.githubusercontent.com/ros/rosdistro/master/ros.key -o /usr/share/keyrings/ros-archive-keyring.gpg
5663echo " 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
82120printenv ROS_DISTRO
83121```
84122The 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
89126In one terminal run a ` talker ` :
90127
91- ``` bash
128+ ``` console
92129ros2 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 )
0 commit comments