Open main menu

Wiki-Orange Pi β

Changes

Orange Pi CM4

424 bytes added, 11:33, 19 September 2023
How to install ROS 2 Galactic on Ubuntu 20.04
# The current active version of ROS 2 is as follows, and the recommended version is '''Galactic Geochelone'''
::[[File:cm4-img358.png]]
::[[File:cm4-img359.png]]
::{| class="wikitable" style="width:800px;"
|-
|
[http://docs.ros.org/ '''http://docs.ros.org''']
'''http://docs.ros.org/en/galactic/Releases.html'''
|}
<ol start="2" style="list-style-type: decimal;">
<li>The link to the official ROS 2 '''Galactic Geochelone''' installation documentation is as follows:</li></ol>{| class="wikitable" style="width:800px;" |-|
'''docs.ros.org/en/galactic/Installation.html'''
'''http://docs.ros.org/en/galactic/Installation/Ubuntu-Install-Debians.html'''
|}</ol>
<ol start="3" style="list-style-type: decimal;">
<li><p>In the official ROS 2 '''Galactic Geochelone''' installation document, Ubuntu Linux recommends using Ubuntu 20.04, so please make sure that the system used by the development board is the '''<span style="color:#FF0000">Ubuntu 20.04 desktop system</span>'''. There are several ways to install ROS 2. The following demonstrates how to install it through '''Debian packages''' ROS 2 '''Galactic Geochelone'''</p></li><li><p>Use the '''install_ros.sh''' script to install ros2</p></li></ol>{| class="wikitable" style="width:800px;" |-|
orangepi@orangepi:~$ '''install_ros.sh ros2'''
|}</ol>
<ol start="5" style="list-style-type: decimal;">
<li>The '''install_ros.sh''' script will automatically run the '''ros2 -h'''command after installing ros2. If you can see the following print, it means that the ros2 installation is complete</li></ol>{| class="wikitable" style="width:800px;" |-| usage: ros2 [-h] Call `ros2 &lt;command&gt; -h` for more detailed usage. ...
usage: ros2 [-h] Call `ros2 &lt;command&gt; -h` for more detailed usage. ...
ros2 is an extensible command-line tool for ROS 2.
 
optional arguments:
:-h, --help show this help message and exit 
Commands:
:action Various action related sub-commands
:bag Various rosbag related sub-commands
:component Various component related sub-commands
:daemon Various daemon related sub-commands
:doctor Check ROS setup and other potential issues
:interface Show information about ROS interfaces
:launch Run a launch file
:lifecycle Various lifecycle related sub-commands
:multicast Various multicast related sub-commands
:node Various node related sub-commands
:param Various param related sub-commands
:pkg Various package related sub-commands
:run Run a package specific executable
:security Various security related sub-commands
:service Various service related sub-commands
:topic Various topic related sub-commands
:wtf Use `wtf` as alias to `doctor`
Call `ros2 &lt;command&gt; -h` for more detailed usage.
:Call `ros2 &lt;command&gt; -h` for more detailed usage.
|}
</ol>
<ol start="6" style="list-style-type: decimal;">
<li>Then you can use the '''test_ros.sh''' script to test whether ROS 2 is installed successfully. If you can see the following print, it means that ROS 2 can run normally</li></ol>{| class="wikitable" style="width:800px;" |-|
orangepi@orangepicm4:~$ '''test_ros.sh'''
[INFO] [1671174103.204019965] [listener]: I heard: [Hello World: 3]
|}</ol>
<ol start="7" style="list-style-type: decimal;">
<li>Run the following command to open rviz2</li></ol>{| class="wikitable" style="width:800px;" |-|
orangepi@orangepi:~$ '''source /opt/ros/galactic/setup.bash'''
orangepi@orangepi:~$ '''ros2 run rviz2 rviz2'''
|}
<div class="figure">
[[File:cm4-img360.png]]
</div></ol>
<ol start="8" style="list-style-type: decimal;">
<li>For how to use ROS, please refer to the documentation of ROS 2</li></ol>{| class="wikitable" style="width:800px;" |-|
[http://docs.ros.org/en/galactic/Tutorials.html '''http://docs.ros.org/en/galactic/Tutorials.html''']
|}
</ol>
<span id="how-to-install-ros-2-humble-on-ubuntu-22.04"></span>
<span id="how-to-install-ros-2-humble-on-ubuntu-22.04"></span>
=== How to install ROS 2 Humble on Ubuntu 22.04 ===