打开主菜单

Wiki-Orange Pi β

更改

Orange Pi CM4

添加556字节, 2023年9月13日 (三) 14:17
Ubuntu20.04安装ROS 1 Noetic的方法
# ROS 1当前活跃的版本如下所示,推荐版本为'''Noetic Ninjemys'''
::[[File:media/image352.png|345x235px]]
::[[File:media/image353.png|576x210px]]
::{| class="wikitable" style="width:800px;"
|-
|
[http://docs.ros.org/ '''http://docs.ros.org''']
'''https://wiki.ros.org/Distributions'''
|}
<ol start="2" style="list-style-type: decimal;">
<li><p>ROS 1 '''Noetic Ninjemys'''官方安装文档链接如下所示:</p>
{| class="wikitable" style="width:800px;" |-| <p>[http://wiki.ros.org/noetic/Installation/Ubuntu '''http://wiki.ros.org/noetic/Installation/Ubuntu''']</p>|}</li><li><p>ROS '''Noetic Ninjemys'''官方安装文档中Ubuntu推荐使用Ubuntu20.04,所以请确保开发板使用的系统为'''<span style="color:#FF0000">Ubuntu20.04桌面版系统</span>'''</p>{| class="wikitable" style="width:800px;" |-|
<p>[http://wiki.ros.org/noetic/Installation '''http://wiki.ros.org/noetic/Installation''']</p>
|}
<p>[[File:media/image354.png|312x176px]]</p></li>
<li><p>然后使用下面的脚本安装ros1</p>
{| class="wikitable" style="width:800px;" |-| <p>orangepi@orangepicm4:~$ '''install_ros.sh ros1'''</p>|}</li><li><p>使用ROS工具前,首先需要初始化下rosdep,然后编译源码时就能快速的安装一些系统依赖和一些ROS中的核心组件</p> {| class="wikitable" style="background-color:#ffffdc;width:800px;" |-| <big>'''</lispan style="color:#FF0000">注意,运行下面的命令需要确保开发板能正常访问github,否则会由于网络问题而报错。</olspan>'''
'''注意,运行下面的命令需要确保开发板能正常访问github,否则会由于网络问题而报错。'''
'''install_ros.sh脚本会尝试修改/etc/hosts并自动运行下面的命令。但是这种方法无法保证每次都能正常访问github,如果install_ros.sh安装完ros1后有提示下面的错误,请自己想其它办法让开发板的Linux系统能正常访问github,然后再手动运行下面的命令。'''
 
'''https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/osx-homebrew.yaml'''
'''Hit https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/base.yaml'''
'''<span style="color:#FF0000">ERROR: error loading sources list:''' '''The read operation timed out</span>'''
::'''<span style="color:#FF0000">The read operation timed out</span>'''</big>
|}
{| class="wikitable" style="width:800px;"
|-
|
orangepi@orangepi:~$ '''source /opt/ros/noetic/setup.bash'''
Recommended: please run
 ::rosdep update
orangepi@orangepi:~$ '''rosdep update'''
updated cache in /home/orangepi/.ros/rosdep/sources.cache
|}</li></ol>
<ol start="6" style="list-style-type: decimal;">
<li><p>然后在'''桌面'''中打开一个命令行终端窗口,再使用'''test_ros.sh'''脚本可以启动一个小海龟的例程来测试下ROS是否能正常使用</p>
{| class="wikitable" style="width:800px;" |-| <p>orangepi@orangepi:~$ '''test_ros.sh'''</p>|}</li>
<li><p>运行完'''test_ros.sh'''脚本后,会弹出下图所示的一个小海龟</p>
<p>[[File:media/image355.png|576x276px]]</p></li>
<li><p>然后请保持刚才打开终端窗口在最上面</p></li></ol>
[[File:media/image356.png|576x275px]]
</li></ol>
<ol start="9" style="list-style-type: decimal;">
<li><p>此时按下键盘上的方向按键就可以控制小海龟上下左右移动了</p>
<span id="ubuntu20.04安装ros-2-galactic的方法"></span>
 
=== Ubuntu20.04安装ROS 2 Galactic的方法 ===
8,460
个编辑