以下操作请连接显示器进行
- 创建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 installed
sudo apt-get install git cmake
# clone the repo and submodules
cd ~/workspace
git clone https://github.com/dusty-nv/jetson-inference
cd jetson-inference
git submodule update --init
# build from source
mkdir build
cd build
cmake ../
make
# install libraries
sudo make install
- 构建ros_deep_learning
# install dependencies
sudo apt-get install ros-melodic-vision-msgs ros-melodic-image-transport ros-melodic-image-publisher
# clone the repo
cd ~/workspace/catkin_ws/src
git clone https://github.com/dusty-nv/ros_deep_learning
# make ros_deep_learning
cd ../ # cd ~/workspace/catkin_ws
catkin_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 https://github.com/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