1. 程式人生 > 其它 >NVIDIA Jetson Nano / TX1 / TX2 / Xavier NX / AGX Xavier 安裝ROS

NVIDIA Jetson Nano / TX1 / TX2 / Xavier NX / AGX Xavier 安裝ROS

技術標籤:8—Use(use)軟體、包、工具等的安裝及使用JetsonROS


環境要求:

  • 版本: ROSMelodic(Ubuntu18.04)
  • 支援JetPack >= 4.2 (Jetson Nano / TX1 / TX2 / Xavier NX / AGX Xavier)

1、安裝依賴

$ sudo apt-add-repository universe
$ sudo apt-add-repository multiverse
$ sudo apt-add-repository restricted

2、新增ros映象源

$ sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'

最好使用國內的映象源,下面是中國科學技術大學的ros映象源,更多國內映象源參考

sudo sh -c '. /etc/lsb-release && echo "deb http://mirrors.ustc.edu.cn/ros/ubuntu/ `lsb_release -cs` main" > /etc/apt/sources.list.d/ros-latest.list'

3、新增金鑰

$ sudo apt-key adv --keyserver 'hkp://keyserver.ubuntu.com:80' --recv-key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654

4、更新下載源

$ sudo apt-get update

5、安裝ros

$ sudo apt-get install ros-melodic-ros-base

6、新增ros環境變數

sudo sh -c 'echo "source /opt/ros/melodic/setup.bash" >> ~/.bashrc'

7、測試ros是否安裝成功

顯示為如下,安裝成功

(base) [email protected]-mint:~$ roscore
... logging to /home/shl/.ros/log/e6a9effe-3dd8-11eb-9388-
e0d55e449b44/roslaunch-zhihui-mint-11387.log Checking log directory for disk usage. This may take a while. Press Ctrl-C to interrupt Done checking log file disk usage. Usage is <1GB. started roslaunch server http://zhihui-mint:46237/ ros_comm version 1.14.9 SUMMARY ======== PARAMETERS * /rosdistro: melodic * /rosversion: 1.14.9 NODES auto-starting new master process[master]: started with pid [11494] ROS_MASTER_URI=http://zhihui-mint:11311/ setting /run_id to e6a9effe-3dd8-11eb-9388-e0d55e449b44 process[rosout-1]: started with pid [11505] started core service [/rosout]

8、安裝ros的python庫包rospy

pip3 install rospkg

歡迎大家關注筆者,你的關注是我持續更博的最大動力


原創文章,轉載告知,盜版必究

微信:suihailiang0816
QQ:931762054
wx公眾號:仰望星空的小隨