以下操作请连接显示器进行
创建ROS工作空间
# create the catkin workspace$ mkdir -p ~/workspace/catkin_ws/src$ cd ~/workspace/catkin_ws$ catkin_make# add catkin_ws path to bashrc$ sudo sh -c 'echo "source ~/workspace/catkin_ws/devel/setup.bash" >> ~/.bashrc'
查看是否成功 ####很重要!
$ echo $ROS_PACKAGE_PATH /home/nvidia/workspace/catkin_ws/src:/opt/ros/melodic/share
3.构建jetson-inference
# git and cmake should be installedsudo apt-get install git cmake# clone the repo and submodulescd ~/workspacegit clone /dusty-nv/jetson-inferencecd jetson-inferencegit submodule update --init# build from sourcemkdir buildcd buildcmake ../make# install librariessudo make install
构建ros_deep_learning
# install dependenciessudo apt-get install ros-melodic-vision-msgs ros-melodic-image-transport ros-melodic-image-publisher# clone the repocd ~/workspace/catkin_ws/srcgit clone /dusty-nv/ros_deep_learning# make ros_deep_learningcd ../ # cd ~/workspace/catkin_wscatkin_make# confirm that the package can be found$ rospack find ros_deep_learning/home/nvidia/workspace/catkin_ws/src/ros_deep_learning
创建测试项目
# clone the repo$ cd ~/workspace/catkin_ws/src$ git clone /dusty-nv/jetbot_ros# build the package$ cd ../ # cd ~/workspace/catkin_ws$ catkin_make# confirm that jetbot_ros package can be found$ rospack find jetbot_ros/home/nvidia/workspace/catkin_ws/src/jetbot_ros
一,开一个终端
$ roscore
二、开第二个终端##若显示打开失败,请重启设备
$ rosrun jetbot_ros jetbot_camera
三、开第三个终端
# first open a new terminal$ sudo apt-get install ros-melodic-image-view$ rosrun image_view image_view image:=/jetbot_camera/raw