< >
Home » NX入门教程软件篇 » NX入门教程软件篇-安装ORB_SLAM v2

NX入门教程软件篇-安装ORB_SLAM v2

文章说明

  • 本文章主要介绍如何在nx上安装orbslamv2

  • 测试环境:NVIDIA Jetson Xavier NX + Ubuntu 20.04 + ROS2 Galactic + OpenCV4.5.4

  • 测试所用镜像:JP502-xnx-sd-card-image-b231

安装步骤

  • 安装Pangolin
$ mkdir ~/tools/
$ cd ~/tools/
$ git clone https://ghproxy.com/https://github.com/stevenlovegrove/Pangolin
$ cd ~/tools/Pangolin
$ git checkout 25159034e62011b3527228e476cec51f08e87602
$ sed -i '33a\#include <limits>' ~/tools/Pangolin/include/pangolin/gl/colour.h
$ mkdir build
$ cd build
$ cmake -DCPP11_NO_BOOST=1 ..
$ make
  • 安装orbslam2
$ cd ~/tools/
$ git clone https://ghproxy.com/https://github.com/EndlessLoops/ORB_SLAM2
$ cd ORB_SLAM2
$ sudo chmod +x build.sh
$ ./build.sh
$ echo 'export LD_LIBRARY_PATH=~/tools/Pangolin/build/src/:~/tools/ORB_SLAM2/Thirdparty/DBoW2/lib:~/tools/ORB_SLAM2/Thirdparty/g2o/lib:~/tools/ORB_SLAM2/lib:$LD_LIBRARY_PATH' >> ~/.bashrc
$ echo 'export ORB_SLAM2_ROOT_DIR=~/tools/ORB_SLAM2' >> ~/.bashrc
  • 安装orbslam2 ros2包
$ mkdir -p ~/ros2_orb_slamv2_ws/src
$ cd ~/ros2_orb_slamv2_ws/src
$ git clone https://ghproxy.com/https://github.com/EndlessLoops/ros2-ORB_SLAM2
$ cd ~/ros2_orb_slamv2_ws/
$ colcon build
$ echo 'source ~/ros2_orb_slamv2_ws/install/setup.bash' >> ~/.bashrc

测试步骤

1.数据集测试

$ cd 
$ wget https://cvg.cit.tum.de/rgbd/dataset/freiburg1/rgbd_dataset_freiburg1_xyz.tgz
$ tar -xvzf rgbd_dataset_freiburg1_xyz.tgz
  • 测试
$ cd ~/tools/ORB_SLAM2
$ ./Examples/RGB-D/rgbd_tum Vocabulary/ORBvoc.txt Examples/RGB-D/TUM1.yaml ~/rgbd_dataset_freiburg1_xyz/ Examples/RGB-D/associations/fr1_xyz.txt

请输入图片描述

2.ROS2包测试

  • 本次测试使用的是D435i相机

  • 启动相机

# 安装相机驱动
$ sudo apt install ros-humble-realsense2-camera 
# 启动相机
$ ros2 launch realsense2_camera rs_launch.py
  • 启动ROS2节点
# Mono例程
$ ros2 run ros2_orbslam mono ~/tools/ORB_SLAM2/Vocabulary/ORBvoc.txt ~/ros2_orb_slamv2_ws/src/ros2-ORB_SLAM2/src/monocular/TUM1.yaml

# RGBD例程
$ ros2 run ros2_orbslam rgbd ~/tools/ORB_SLAM2/Vocabulary/ORBvoc.txt ~/ros2_orb_slamv2_ws/src/ros2-ORB_SLAM2/src/rgbd/TUM1.yaml

请输入图片描述

FAQ

Q1
  • 测试ros2例程时,出现打开orb_slam的窗口后就会快速关闭,期间没有报错,但不能正常使用例程
A1
  • 经检查,nx默认装有opencv4.5.4,但装ros2 galactic时安装了opencv4.2
$ ls -lh /usr/lib/aarch64-linux-gnu/ | grep opencv
lrwxrwxrwx  1 root root    28 Mar  2  2022 libgstopencv-1.0.so -> libgstopencv-1.0.so.0.1603.0
lrwxrwxrwx  1 root root    28 Mar  2  2022 libgstopencv-1.0.so.0 -> libgstopencv-1.0.so.0.1603.0
-rw-r--r--  1 root root   19K Mar  2  2022 libgstopencv-1.0.so.0.1603.0
lrwxrwxrwx  1 root root    24 Feb 18  2020 libopencv_aruco.so.4.2 -> libopencv_aruco.so.4.2.0
-rw-r--r--  1 root root  374K Feb 18  2020 libopencv_aruco.so.4.2.0
lrwxrwxrwx  1 root root    25 Feb 18  2020 libopencv_bgsegm.so.4.2 -> libopencv_bgsegm.so.4.2.0
-rw-r--r--  1 root root  115K Feb 18  2020 libopencv_bgsegm.so.4.2.0
lrwxrwxrwx  1 root root    30 Feb 18  2020 libopencv_bioinspired.so.4.2 -> libopencv_bioinspired.so.4.2.0
-rw-r--r--  1 root root  207K Feb 18  2020 libopencv_bioinspired.so.4.2.0
lrwxrwxrwx  1 root root    24 Jan 18  2022 libopencv_calib3d.so -> libopencv_calib3d.so.4.5
lrwxrwxrwx  1 root root    26 Feb 18  2020 libopencv_calib3d.so.4.2 -> libopencv_calib3d.so.4.2.0
-rw-r--r--  1 root root  1.3M Feb 18  2020 libopencv_calib3d.so.4.2.0
lrwxrwxrwx  1 root root    26 Jan 18  2022 libopencv_calib3d.so.4.5 -> libopencv_calib3d.so.4.5.4
-rw-r--r--  1 root root  2.1M Jan 18  2022 libopencv_calib3d.so.4.5.4
lrwxrwxrwx  1 root root    25 Feb 18  2020 libopencv_ccalib.so.4.2 -> libopencv_ccalib.so.4.2.0
-rw-r--r--  1 root root  303K Feb 18  2020 libopencv_ccalib.so.4.2.0
lrwxrwxrwx  1 root root    21 Jan 18  2022 libopencv_core.so -> libopencv_core.so.4.5
lrwxrwxrwx  1 root root    23 Feb 18  2020 libopencv_core.so.4.2 -> libopencv_core.so.4.2.0
-rw-r--r--  1 root root  2.6M Feb 18  2020 libopencv_core.so.4.2.0
lrwxrwxrwx  1 root root    23 Jan 18  2022 libopencv_core.so.4.5 -> libopencv_core.so.4.5.4
-rw-r--r--  1 root root  3.6M Jan 18  2022 libopencv_core.so.4.5.4
lrwxrwxrwx  1 root root    27 Feb 18  2020 libopencv_datasets.so.4.2 -> libopencv_datasets.so.4.2.0
-rw-r--r--  1 root root  431K Feb 18  2020 libopencv_datasets.so.4.2.0
lrwxrwxrwx  1 root root    32 Feb 18  2020 libopencv_dnn_objdetect.so.4.2 -> libopencv_dnn_objdetect.so.4.2.0
-rw-r--r--  1 root root   31K Feb 18  2020 libopencv_dnn_objdetect.so.4.2.0
lrwxrwxrwx  1 root root    20 Jan 18  2022 libopencv_dnn.so -> libopencv_dnn.so.4.5
lrwxrwxrwx  1 root root    22 Feb 18  2020 libopencv_dnn.so.4.2 -> libopencv_dnn.so.4.2.0
-rw-r--r--  1 root root  2.8M Feb 18  2020 libopencv_dnn.so.4.2.0
lrwxrwxrwx  1 root root    22 Jan 18  2022 libopencv_dnn.so.4.5 -> libopencv_dnn.so.4.5.4
-rw-r--r--  1 root root  5.5M Jan 18  2022 libopencv_dnn.so.4.5.4
lrwxrwxrwx  1 root root    31 Feb 18  2020 libopencv_dnn_superres.so.4.2 -> libopencv_dnn_superres.so.4.2.0
-rw-r--r--  1 root root   51K Feb 18  2020 libopencv_dnn_superres.so.4.2.0
lrwxrwxrwx  1 root root    22 Feb 18  2020 libopencv_dpm.so.4.2 -> libopencv_dpm.so.4.2.0
-rw-r--r--  1 root root   87K Feb 18  2020 libopencv_dpm.so.4.2.0
lrwxrwxrwx  1 root root    23 Feb 18  2020 libopencv_face.so.4.2 -> libopencv_face.so.4.2.0
-rw-r--r--  1 root root  475K Feb 18  2020 libopencv_face.so.4.2.0
lrwxrwxrwx  1 root root    27 Jan 18  2022 libopencv_features2d.so -> libopencv_features2d.so.4.5
lrwxrwxrwx  1 root root    29 Feb 18  2020 libopencv_features2d.so.4.2 -> libopencv_features2d.so.4.2.0
-rw-r--r--  1 root root  627K Feb 18  2020 libopencv_features2d.so.4.2.0
lrwxrwxrwx  1 root root    29 Jan 18  2022 libopencv_features2d.so.4.5 -> libopencv_features2d.so.4.5.4
-rw-r--r--  1 root root  737K Jan 18  2022 libopencv_features2d.so.4.5.4
lrwxrwxrwx  1 root root    22 Jan 18  2022 libopencv_flann.so -> libopencv_flann.so.4.5
lrwxrwxrwx  1 root root    24 Feb 18  2020 libopencv_flann.so.4.2 -> libopencv_flann.so.4.2.0
-rw-r--r--  1 root root  331K Feb 18  2020 libopencv_flann.so.4.2.0
lrwxrwxrwx  1 root root    24 Jan 18  2022 libopencv_flann.so.4.5 -> libopencv_flann.so.4.5.4
-rw-r--r--  1 root root  625K Jan 18  2022 libopencv_flann.so.4.5.4
lrwxrwxrwx  1 root root    27 Feb 18  2020 libopencv_freetype.so.4.2 -> libopencv_freetype.so.4.2.0
-rw-r--r--  1 root root   31K Feb 18  2020 libopencv_freetype.so.4.2.0
lrwxrwxrwx  1 root root    24 Feb 18  2020 libopencv_fuzzy.so.4.2 -> libopencv_fuzzy.so.4.2.0
-rw-r--r--  1 root root   79K Feb 18  2020 libopencv_fuzzy.so.4.2.0
lrwxrwxrwx  1 root root    21 Jan 18  2022 libopencv_gapi.so -> libopencv_gapi.so.4.5
lrwxrwxrwx  1 root root    23 Jan 18  2022 libopencv_gapi.so.4.5 -> libopencv_gapi.so.4.5.4
-rw-r--r--  1 root root  4.3M Jan 18  2022 libopencv_gapi.so.4.5.4
lrwxrwxrwx  1 root root    22 Feb 18  2020 libopencv_hdf.so.4.2 -> libopencv_hdf.so.4.2.0
-rw-r--r--  1 root root   43K Feb 18  2020 libopencv_hdf.so.4.2.0
lrwxrwxrwx  1 root root    22 Feb 18  2020 libopencv_hfs.so.4.2 -> libopencv_hfs.so.4.2.0
-rw-r--r--  1 root root   59K Feb 18  2020 libopencv_hfs.so.4.2.0
lrwxrwxrwx  1 root root    24 Jan 18  2022 libopencv_highgui.so -> libopencv_highgui.so.4.5
lrwxrwxrwx  1 root root    26 Feb 18  2020 libopencv_highgui.so.4.2 -> libopencv_highgui.so.4.2.0
-rw-r--r--  1 root root   82K Feb 18  2020 libopencv_highgui.so.4.2.0
lrwxrwxrwx  1 root root    26 Jan 18  2022 libopencv_highgui.so.4.5 -> libopencv_highgui.so.4.5.4
-rw-r--r--  1 root root  309K Jan 18  2022 libopencv_highgui.so.4.5.4
lrwxrwxrwx  1 root root    26 Jan 18  2022 libopencv_imgcodecs.so -> libopencv_imgcodecs.so.4.5
lrwxrwxrwx  1 root root    28 Feb 18  2020 libopencv_imgcodecs.so.4.2 -> libopencv_imgcodecs.so.4.2.0
-rw-r--r--  1 root root  295K Feb 18  2020 libopencv_imgcodecs.so.4.2.0
lrwxrwxrwx  1 root root    28 Jan 18  2022 libopencv_imgcodecs.so.4.5 -> libopencv_imgcodecs.so.4.5.4
-rw-r--r--  1 root root  1.3M Jan 18  2022 libopencv_imgcodecs.so.4.5.4
lrwxrwxrwx  1 root root    27 Feb 18  2020 libopencv_img_hash.so.4.2 -> libopencv_img_hash.so.4.2.0
-rw-r--r--  1 root root   87K Feb 18  2020 libopencv_img_hash.so.4.2.0
lrwxrwxrwx  1 root root    24 Jan 18  2022 libopencv_imgproc.so -> libopencv_imgproc.so.4.5
lrwxrwxrwx  1 root root    26 Feb 18  2020 libopencv_imgproc.so.4.2 -> libopencv_imgproc.so.4.2.0
-rw-r--r--  1 root root  2.9M Feb 18  2020 libopencv_imgproc.so.4.2.0
lrwxrwxrwx  1 root root    26 Jan 18  2022 libopencv_imgproc.so.4.5 -> libopencv_imgproc.so.4.5.4
-rw-r--r--  1 root root  3.8M Jan 18  2022 libopencv_imgproc.so.4.5.4
lrwxrwxrwx  1 root root    34 Feb 18  2020 libopencv_line_descriptor.so.4.2 -> libopencv_line_descriptor.so.4.2.0
-rw-r--r--  1 root root  147K Feb 18  2020 libopencv_line_descriptor.so.4.2.0
lrwxrwxrwx  1 root root    19 Jan 18  2022 libopencv_ml.so -> libopencv_ml.so.4.5
lrwxrwxrwx  1 root root    21 Feb 18  2020 libopencv_ml.so.4.2 -> libopencv_ml.so.4.2.0
-rw-r--r--  1 root root  598K Feb 18  2020 libopencv_ml.so.4.2.0
lrwxrwxrwx  1 root root    21 Jan 18  2022 libopencv_ml.so.4.5 -> libopencv_ml.so.4.5.4
-rw-r--r--  1 root root  625K Jan 18  2022 libopencv_ml.so.4.5.4
lrwxrwxrwx  1 root root    26 Jan 18  2022 libopencv_objdetect.so -> libopencv_objdetect.so.4.5
lrwxrwxrwx  1 root root    28 Feb 18  2020 libopencv_objdetect.so.4.2 -> libopencv_objdetect.so.4.2.0
-rw-r--r--  1 root root  343K Feb 18  2020 libopencv_objdetect.so.4.2.0
lrwxrwxrwx  1 root root    28 Jan 18  2022 libopencv_objdetect.so.4.5 -> libopencv_objdetect.so.4.5.4
-rw-r--r--  1 root root  520K Jan 18  2022 libopencv_objdetect.so.4.5.4
lrwxrwxrwx  1 root root    26 Feb 18  2020 libopencv_optflow.so.4.2 -> libopencv_optflow.so.4.2.0
-rw-r--r--  1 root root  395K Feb 18  2020 libopencv_optflow.so.4.2.0
lrwxrwxrwx  1 root root    35 Feb 18  2020 libopencv_phase_unwrapping.so.4.2 -> libopencv_phase_unwrapping.so.4.2.0
-rw-r--r--  1 root root   35K Feb 18  2020 libopencv_phase_unwrapping.so.4.2.0
lrwxrwxrwx  1 root root    22 Jan 18  2022 libopencv_photo.so -> libopencv_photo.so.4.5
lrwxrwxrwx  1 root root    24 Feb 18  2020 libopencv_photo.so.4.2 -> libopencv_photo.so.4.2.0
-rw-r--r--  1 root root  630K Feb 18  2020 libopencv_photo.so.4.2.0
lrwxrwxrwx  1 root root    24 Jan 18  2022 libopencv_photo.so.4.5 -> libopencv_photo.so.4.5.4
-rw-r--r--  1 root root  615K Jan 18  2022 libopencv_photo.so.4.5.4
lrwxrwxrwx  1 root root    23 Feb 18  2020 libopencv_plot.so.4.2 -> libopencv_plot.so.4.2.0
-rw-r--r--  1 root root   39K Feb 18  2020 libopencv_plot.so.4.2.0
lrwxrwxrwx  1 root root    26 Feb 18  2020 libopencv_quality.so.4.2 -> libopencv_quality.so.4.2.0
-rw-r--r--  1 root root   75K Feb 18  2020 libopencv_quality.so.4.2.0
lrwxrwxrwx  1 root root    22 Feb 18  2020 libopencv_reg.so.4.2 -> libopencv_reg.so.4.2.0
-rw-r--r--  1 root root  119K Feb 18  2020 libopencv_reg.so.4.2.0
lrwxrwxrwx  1 root root    23 Feb 18  2020 libopencv_rgbd.so.4.2 -> libopencv_rgbd.so.4.2.0
-rw-r--r--  1 root root  591K Feb 18  2020 libopencv_rgbd.so.4.2.0
lrwxrwxrwx  1 root root    27 Feb 18  2020 libopencv_saliency.so.4.2 -> libopencv_saliency.so.4.2.0
-rw-r--r--  1 root root  139K Feb 18  2020 libopencv_saliency.so.4.2.0
lrwxrwxrwx  1 root root    24 Feb 18  2020 libopencv_shape.so.4.2 -> libopencv_shape.so.4.2.0
-rw-r--r--  1 root root  150K Feb 18  2020 libopencv_shape.so.4.2.0
lrwxrwxrwx  1 root root    25 Feb 18  2020 libopencv_stereo.so.4.2 -> libopencv_stereo.so.4.2.0
-rw-r--r--  1 root root  143K Feb 18  2020 libopencv_stereo.so.4.2.0
lrwxrwxrwx  1 root root    26 Jan 18  2022 libopencv_stitching.so -> libopencv_stitching.so.4.5
lrwxrwxrwx  1 root root    28 Feb 18  2020 libopencv_stitching.so.4.2 -> libopencv_stitching.so.4.2.0
-rw-r--r--  1 root root  631K Feb 18  2020 libopencv_stitching.so.4.2.0
lrwxrwxrwx  1 root root    28 Jan 18  2022 libopencv_stitching.so.4.5 -> libopencv_stitching.so.4.5.4
-rw-r--r--  1 root root  747K Jan 18  2022 libopencv_stitching.so.4.5.4
lrwxrwxrwx  1 root root    35 Feb 18  2020 libopencv_structured_light.so.4.2 -> libopencv_structured_light.so.4.2.0
-rw-r--r--  1 root root   79K Feb 18  2020 libopencv_structured_light.so.4.2.0
lrwxrwxrwx  1 root root    27 Feb 18  2020 libopencv_superres.so.4.2 -> libopencv_superres.so.4.2.0
-rw-r--r--  1 root root  142K Feb 18  2020 libopencv_superres.so.4.2.0
lrwxrwxrwx  1 root root    35 Feb 18  2020 libopencv_surface_matching.so.4.2 -> libopencv_surface_matching.so.4.2.0
-rw-r--r--  1 root root  271K Feb 18  2020 libopencv_surface_matching.so.4.2.0
lrwxrwxrwx  1 root root    23 Feb 18  2020 libopencv_text.so.4.2 -> libopencv_text.so.4.2.0
-rw-r--r--  1 root root  343K Feb 18  2020 libopencv_text.so.4.2.0
lrwxrwxrwx  1 root root    27 Feb 18  2020 libopencv_tracking.so.4.2 -> libopencv_tracking.so.4.2.0
-rw-r--r--  1 root root  2.1M Feb 18  2020 libopencv_tracking.so.4.2.0
lrwxrwxrwx  1 root root    24 Jan 18  2022 libopencv_videoio.so -> libopencv_videoio.so.4.5
lrwxrwxrwx  1 root root    26 Feb 18  2020 libopencv_videoio.so.4.2 -> libopencv_videoio.so.4.2.0
-rw-r--r--  1 root root  407K Feb 18  2020 libopencv_videoio.so.4.2.0
lrwxrwxrwx  1 root root    26 Jan 18  2022 libopencv_videoio.so.4.5 -> libopencv_videoio.so.4.5.4
-rw-r--r--  1 root root  657K Jan 18  2022 libopencv_videoio.so.4.5.4
lrwxrwxrwx  1 root root    22 Jan 18  2022 libopencv_video.so -> libopencv_video.so.4.5
lrwxrwxrwx  1 root root    24 Feb 18  2020 libopencv_video.so.4.2 -> libopencv_video.so.4.2.0
-rw-r--r--  1 root root  379K Feb 18  2020 libopencv_video.so.4.2.0
lrwxrwxrwx  1 root root    24 Jan 18  2022 libopencv_video.so.4.5 -> libopencv_video.so.4.5.4
-rw-r--r--  1 root root  485K Jan 18  2022 libopencv_video.so.4.5.4
lrwxrwxrwx  1 root root    28 Feb 18  2020 libopencv_videostab.so.4.2 -> libopencv_videostab.so.4.2.0
-rw-r--r--  1 root root  286K Feb 18  2020 libopencv_videostab.so.4.2.0
lrwxrwxrwx  1 root root    22 Feb 18  2020 libopencv_viz.so.4.2 -> libopencv_viz.so.4.2.0
-rw-r--r--  1 root root  370K Feb 18  2020 libopencv_viz.so.4.2.0
lrwxrwxrwx  1 root root    27 Feb 18  2020 libopencv_ximgproc.so.4.2 -> libopencv_ximgproc.so.4.2.0
-rw-r--r--  1 root root  1.1M Feb 18  2020 libopencv_ximgproc.so.4.2.0
lrwxrwxrwx  1 root root    29 Feb 18  2020 libopencv_xobjdetect.so.4.2 -> libopencv_xobjdetect.so.4.2.0
-rw-r--r--  1 root root   79K Feb 18  2020 libopencv_xobjdetect.so.4.2.0
lrwxrwxrwx  1 root root    25 Feb 18  2020 libopencv_xphoto.so.4.2 -> libopencv_xphoto.so.4.2.0
-rw-r--r--  1 root root  232K Feb 18  2020 libopencv_xphoto.so.4.2.0
  • 其中orbslamv2的ros2包是用到ros2下的cv_bridge,其对应的版本是opencv4.2

  • 但当前的opencv的默认版本为4.5.4,orbslamv2同样是使用opencv4.5.4

  • 故现在需要重新单独编译一个适配opencv4.5.4版本的cv_bridge给orbslamv2的ros2包使用

$ cd 
$ git clone -b galactic https://ghproxy.com/https://github.com/ros-perception/vision_opencv
$ cd  ~/vision_opencv
$ cp cv_bridge ~/ros2_orb_slamv2_ws/src/cv_bridge_orbslam2

  • 此处需要修改一下cv_bridge_orbslam2CMakeLists.txtpackage.xml文件
$ vim ~/ros2_orb_slamv2_ws/src/cv_bridge_orbslam2/CMakeLists.txt

## 修改处1
project(cv_bridge)
# 将原文件第2行的cv_bridge改为cv_bridge_orbslam2
project(cv_bridge_orbslam2)

## 修改处2
    PACKAGE_DIR python/${PROJECT_NAME}
# 将原文件第65行的${PROJECT_NAME}改为cv_bridge_orbslam2
    PACKAGE_DIR python/cv_bridge

## 修改处3

install(DIRECTORY include/${PROJECT_NAME}
DESTINATION include/${PROJECT_NAME}
# 将原文件第89和90行的${PROJECT_NAME}改为cv_bridge_orbslam2
install(DIRECTORY include/cv_bridge
DESTINATION include/cv_bridge
$ vim ~/ros2_orb_slamv2_ws/src/cv_bridge_orbslam2/package.xml

## 修改处1
<name>cv_bridge</name>
# 将原文件第2行的cv_bridge改为cv_bridge_orbslam2
<name>cv_bridge_orbslam2</name>
  • 同时需要修改ros2-ORB_SLAM2CMakeLists.txtpackage.xml文件
$ vim ~/ros2_orb_slamv3_ws/src/ros2-ORB_SLAM2/CMakeLists.txt

## 修改处1
find_package(cv_bridge REQUIRED)
# 将原文件第18行的cv_bridge改为cv_bridge_orbslam2
find_package(cv_bridge_orbslam2REQUIRED)

## 修改处2、3、4
ament_target_dependencies(mono rclcpp sensor_msgs cv_bridge ORB_SLAM2 Pangolin)
# 将原文件第28、34、40行的cv_bridge替换为cv_bridge_orbslam2,
ament_target_dependencies(mono rclcpp sensor_msgs cv_bridge_orbslam2 ORB_SLAM2 Pangolin)

$ vim ~/ros2_orb_slamv2_ws/src/ros2-ORB_SLAM2/package.xml

## 修改处1
  <build_depend>cv_bridge</build_depend>
# 将原文件第15行的cv_bridge改为cv_bridge_orbslam2
  <build_depend>cv_bridge_orbslam2</build_depend>

## 修改处2
  <exec_depend>cv_bridge</exec_depend>
# 将原文件第21行的cv_bridge改为cv_bridge_orbslam2
  <exec_depend>cv_bridge_orbslam2</exec_depend>
  • 修改完后编译
$ cd ~/ros2_orb_slamv2_ws
$ colcon build          

纠错,疑问,交流: 请进入讨论区点击加入Q群

获取最新文章: 扫一扫右上角的二维码加入“创客智造”公众号


标签: nx入门教程软件篇