【RK3399Pro学习笔记】三、Debian 9 安装 ROS (Thinker Edge R)
目錄
- 配置源
- 設置 Key
- 安裝
- 初始化rosdep
- 環境配置
- 測試
- 安裝rosinstall
- 卸載
平臺:華碩 Thinker Edge R 瑞芯微 RK3399Pro
固件版本:Tinker_Edge_R-Debian-Stretch-V1.0.4-20200615
參考資料:
RK3399(Debian9 - stretch) 安裝 ROS Lunar —— WB8933
Debian 9 strech 安裝 ROS lunar —— 白菜菜白
更新linux時候提示無法“由于沒有公鑰,無法驗證下列簽名 ***”的解決方案 —— sanbo_xyz
rosdep update一定能通過簡單方法 —— 不加辣先生
配置源
更換國內源:
sudo sh -c 'echo "deb http://mirrors.ustc.edu.cn/ros/ubuntu/ $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'設置 Key
sudo apt-cache search -n dirmngr sudo apt-get install dirmngr sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 421C365BD9FF1F717815A3895523BAEEB01FA116安裝
sudo apt update若出現如下報錯,
則導入其公鑰即可
再次
sudo apt update后不再報錯:
初始化rosdep
(20220317補充:使用國內源的方法:樹莓派Raspbian Buster/Debian 10 安裝ROS)
將下面倉庫的內容clone到本地
記錄rosdistro存放地址,例如/home/linaro/rosdistro,linaro為用戶名
修改如下文件,其中python2.7視系統默認python版本而定,可通過如下命令查閱,下同
將REP3_TARGETS_URL = ‘https://raw.githubusercontent.com/ros/rosdistro/master/releases/targets.yaml’ 替換成 REP3_TARGETS_URL = ‘file:///home/linaro/rosdistro/releases/targets.yaml’
替換后的/home/linaro 即為第一步clone內容的存放地址
修改如下文件
將原來文件中的 DEFAULT_INDEX_URL = ‘https://raw.githubusercontent.com/ros/rosdistro/master/index-v4.yaml’ 替換成 DEFAULT_INDEX_URL = ‘file:///home/linaro/rosdistro/index-v4.yaml’
替換后的/home/linaro 即為第一步clone內容的存放地址
到/etc/ros/rosdep/sources.list.d下創建20-default.list文件
創建ros文件夾
sudo mkdir ros && cd ros創建rosdep文件夾
sudo mkdir rosdep && cd rosdep創建sources.list.d文件夾
sudo mkdir sources.list.d && cd sources.list.d創建20-default.list文檔
sudo nano /etc/ros/rosdep/sources.list.d/20-default.list其內容為
# os-specific listings first yaml file:///home/linaro/rosdistro/rosdep/osx-homebrew.yaml osx# generic yaml file:///home/linaro/rosdistro/rosdep/base.yaml yaml file:///home/linaro/rosdistro/rosdep/python.yaml yaml file:///home/linaro/rosdistro/rosdep/ruby.yaml gbpdistro file:///home/linaro/rosdistro/releases/fuerte.yaml fuerte# newer distributions (Groovy, Hydro, ...) must not be listed anymore, they are being fetched from the rosdistro index.yaml instead
注意的是yaml file://表示固定格式/home…表示文件目錄,所以是yaml file:///
在終端中執行
環境配置
echo "source /opt/ros/lunar/setup.bash" >> ~/.bashrc source ~/.bashrc測試
參考ROS安裝并運行小烏龜
在終端中運行以下命令:
新開一個終端,運行以下命令,打開小烏龜窗口:
新開一個終端,運行以下命令,打開烏龜控制窗口,可使用方向鍵控制烏龜運動:
選中控制窗口,按方向鍵,可看到小烏龜窗口中烏龜在運動
新開一個終端,運行以下命令,可以看到ROS的圖形化界面,展示結點的關系:
至此,測試完成,說明ROS安裝沒有問題。
安裝rosinstall
sudo apt install python-rosinstall python-rosinstall-generator python-wstool build-essential卸載
sudo apt remove ros-*總結
以上是生活随笔為你收集整理的【RK3399Pro学习笔记】三、Debian 9 安装 ROS (Thinker Edge R)的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: iOS:关于加载GIF图片的思考
- 下一篇: 自然语言处理简明教程——序言、第一章