Jetson AGX Xavier Ubuntu18.04安装 ros

 

通过ROSXavier脚本安装:

      https://github.com/jetsonhacks/installROSXavier。

git clone https://github.com/jetsonhacks/installROSXavier.git
cd installROSXavier
./installROSXavier 
./installROS.sh -p ros-melodic-desktop -p ros-melodic-rgbd-launch 

 出现:https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/sources.list.d/20-default.list website may be down:

1  下载(XXX为本地主机名):

git clone https://github.com/ros/rosdistro.git 到 /home/XXX/git/

2  备份

sudo cp /usr/lib/python2.7/dist-packages/rosdep2/main.py /usr/lib/python2.7/dist-packages/rosdep2/main.py.bak
sudo cp /usr/lib/python2.7/dist-packages/rosdep2/rep3.py /usr/lib/python2.7/dist-packages/rosdep2/rep3.py.bak
sudo cp /usr/lib/python2.7/dist-packages/rosdistro/__init__.py /usr/lib/python2.7/dist-packages/rosdistro/__init__.py.bak
sudo cp /usr/lib/python2.7/dist-packages/rosdep2/sources_list.py /usr/lib/python2.7/dist-packages/rosdep2/sources_list.py.bak

3 更改

sudo gedit /usr/lib/python2.7/dist-packages/rosdep2/main.py
sudo gedit /usr/lib/python2.7/dist-packages/rosdep2/rep3.py
sudo gedit /usr/lib/python2.7/dist-packages/rosdistro/__init__.py
sudo gedit /usr/lib/python2.7/dist-packages/rosdep2/sources_list.py
并全部做替换
将 https://raw.githubusercontent.com/ros/rosdistro/master 全部替换为 file:///home/XXX/git/rosdistro

4 运行:

sudo rosdep init

                                       

5 修改 

sudo cp /etc/ros/rosdep/sources.list.d/20-default.list /etc/ros/rosdep/sources.list.d/20-default.list.bak
sudo gedit /etc/ros/rosdep/sources.list.d/20-default.list
并全部做替换
将 https://raw.githubusercontent.com/ros/rosdistro/master 全部替换为 file:///home/XXX/git/rosdistro

6 运行

rosdep update

 Jetson AGX Xavier Ubuntu18.04安装 ros_第1张图片

 7  运行

grep -q -F 'source /opt/ros/melodic/setup.bash' ~/.bashrc || echo "source /opt/ros/melodic/setup.bash" >> ~/.bashrc
source ~/.bashrc

8 检验是否成功

roscore

然后打开新终端:
rosrun turtlesim turtlesim_node
rosrun turtlesim turtle_teleop_key

rosrun rviz rviz

                                                       Jetson AGX Xavier Ubuntu18.04安装 ros_第2张图片     

Jetson AGX Xavier Ubuntu18.04安装 ros_第3张图片 参考:https://blog.csdn.net/weixin_43159148/article/details/100702341?utm_medium=distribute.pc_relevant.none-task-blog-BlogCommendFromMachineLearnPai2-1.nonecase&depth_1-utm_source=distribute.pc_relevant.none-task-blog-BlogCommendFromMachineLearnPai2-1.nonecase

https://blog.csdn.net/qq_17685565/article/details/105741864

你可能感兴趣的:(Jetson AGX Xavier Ubuntu18.04安装 ros)