< >
Home » Nano入门教程软件篇 » Nano入门教程软件篇-安装rtabmap_ros

Nano入门教程软件篇-安装rtabmap_ros

Nano入门教程软件篇-安装rtabmap_ros

说明:

  • 介绍如何在nano上安装rtabmap_ros

步骤:

$ cd ~
$ git clone https://github.com/introlab/rtabmap.git rtabmap
$ cd rtabmap/build
$ cmake -DCMAKE_INSTALL_PREFIX=~/catkin_ws/devel ..
$ make -j4
$ make install
  • ~/catkin_ws/devel 更改为自己的工作空间

安装rtabmap_ros:

cd /usr/lib/aarch64-linux-gnu/
sudo ln -s /usr/local/lib/libopencv_aruco.so.3.2.0  libopencv_aruco.so.3.2.0            
sudo ln -s /usr/local/lib/libopencv_cudaimgproc.so.3.2.0   libopencv_cudaimgproc.so.3.2.0 
sudo ln -s /usr/local/lib/libopencv_flann.so.3.2.0    libopencv_flann.so.3.2.0         
sudo ln -s /usr/local/lib/libopencv_phase_unwrapping.so.3.2.0  libopencv_phase_unwrapping.so.3.2.0
sudo ln -s /usr/local/lib/libopencv_surface_matching.so.3.2.0 libopencv_surface_matching.so.3.2.0
sudo ln -s /usr/local/lib/libopencv_bgsegm.so.3.2.0  libopencv_bgsegm.so.3.2.0         
sudo ln -s /usr/local/lib/libopencv_cudalegacy.so.3.2.0  libopencv_cudalegacy.so.3.2.0    
sudo ln -s /usr/local/lib/libopencv_freetype.so.3.2.0  libopencv_freetype.so.3.2.0       
sudo ln -s /usr/local/lib/libopencv_photo.so.3.2.0  libopencv_photo.so.3.2.0           
sudo ln -s /usr/local/lib/libopencv_text.so.3.2.0 libopencv_text.so.3.2.0
sudo ln -s /usr/local/lib/libopencv_bioinspired.so.3.2.0  libopencv_bioinspired.so.3.2.0    
sudo ln -s /usr/local/lib/libopencv_cudaobjdetect.so.3.2.0  libopencv_cudaobjdetect.so.3.2.0  
sudo ln -s /usr/local/lib/libopencv_fuzzy.so.3.2.0      libopencv_fuzzy.so.3.2.0       
sudo ln -s /usr/local/lib/libopencv_plot.so.3.2.0     libopencv_plot.so.3.2.0         
sudo ln -s /usr/local/lib/libopencv_videoio.so.3.2.0 libopencv_videoio.so.3.2.0
sudo ln -s /usr/local/lib/libopencv_calib3d.so.3.2.0   libopencv_calib3d.so.3.2.0       
sudo ln -s /usr/local/lib/libopencv_cudaoptflow.so.3.2.0    libopencv_cudaoptflow.so.3.2.0 
sudo ln -s /usr/local/lib/libopencv_hdf.so.3.2.0     libopencv_hdf.so.3.2.0          
sudo ln -s /usr/local/lib/libopencv_reg.so.3.2.0    libopencv_reg.so.3.2.0            
sudo ln -s /usr/local/lib/libopencv_video.so.3.2.0  libopencv_video.so.3.2.0
sudo ln -s /usr/local/lib/libopencv_ccalib.so.3.2.0   libopencv_ccalib.so.3.2.0        
sudo ln -s /usr/local/lib/libopencv_cudastereo.so.3.2.0   libopencv_cudastereo.so.3.2.0   
sudo ln -s /usr/local/lib/libopencv_highgui.so.3.2.0      libopencv_highgui.so.3.2.0     
sudo ln -s /usr/local/lib/libopencv_rgbd.so.3.2.0      libopencv_rgbd.so.3.2.0        
sudo ln -s /usr/local/lib/libopencv_videostab.so.3.2.0   libopencv_videostab.so.3.2.0
sudo ln -s /usr/local/lib/libopencv_core.so.3.2.0    libopencv_core.so.3.2.0         
sudo ln -s /usr/local/lib/libopencv_cudawarping.so.3.2.0  libopencv_cudawarping.so.3.2.0   
sudo ln -s /usr/local/lib/libopencv_imgcodecs.so.3.2.0   libopencv_imgcodecs.so.3.2.0      
sudo ln -s /usr/local/lib/libopencv_saliency.so.3.2.0    libopencv_saliency.so.3.2.0       
sudo ln -s /usr/local/lib/libopencv_viz.so.3.2.0   libopencv_viz.so.3.2.0
sudo ln -s /usr/local/lib/libopencv_cudaarithm.so.3.2.0   libopencv_cudaarithm.so.3.2.0    
sudo ln -s /usr/local/lib/libopencv_cudev.so.3.2.0    libopencv_cudev.so.3.2.0        
sudo ln -s /usr/local/lib/libopencv_imgproc.so.3.2.0   libopencv_imgproc.so.3.2.0        
sudo ln -s /usr/local/lib/libopencv_shape.so.3.2.0    libopencv_shape.so.3.2.0          
sudo ln -s /usr/local/lib/libopencv_xfeatures2d.so.3.2.0  libopencv_xfeatures2d.so.3.2.0
sudo ln -s /usr/local/lib/libopencv_cudabgsegm.so.3.2.0   libopencv_cudabgsegm.so.3.2.0    
sudo ln -s /usr/local/lib/libopencv_datasets.so.3.2.0     libopencv_datasets.so.3.2.0   
sudo ln -s /usr/local/lib/libopencv_line_descriptor.so.3.2.0   libopencv_line_descriptor.so.3.2.0
sudo ln -s /usr/local/lib/libopencv_stereo.so.3.2.0      libopencv_stereo.so.3.2.0       
sudo ln -s /usr/local/lib/libopencv_ximgproc.so.3.2.0    libopencv_ximgproc.so.3.2.0
sudo ln -s /usr/local/lib/libopencv_cudacodec.so.3.2.0    libopencv_cudacodec.so.3.2.0     
sudo ln -s /usr/local/lib/libopencv_dpm.so.3.2.0      libopencv_dpm.so.3.2.0        
sudo ln -s /usr/local/lib/libopencv_ml.so.3.2.0     libopencv_ml.so.3.2.0            
sudo ln -s /usr/local/lib/libopencv_stitching.so.3.2.0  libopencv_stitching.so.3.2.0         
sudo ln -s /usr/local/lib/libopencv_xobjdetect.so.3.2.0 libopencv_xobjdetect.so.3.2.0
sudo ln -s /usr/local/lib/libopencv_cudafeatures2d.so.3.2.0  libopencv_cudafeatures2d.so.3.2.0 
sudo ln -s /usr/local/lib/libopencv_face.so.3.2.0   libopencv_face.so.3.2.0          
sudo ln -s /usr/local/lib/libopencv_objdetect.so.3.2.0    libopencv_objdetect.so.3.2.0     
sudo ln -s /usr/local/lib/libopencv_structured_light.so.3.2.0  libopencv_structured_light.so.3.2.0  
sudo ln -s /usr/local/lib/libopencv_xphoto.so.3.2.0 libopencv_xphoto.so.3.2.0
sudo ln -s /usr/local/lib/libopencv_cudafilters.so.3.2.0    libopencv_cudafilters.so.3.2.0   
sudo ln -s /usr/local/lib/libopencv_features2d.so.3.2.0    libopencv_features2d.so.3.2.0 
sudo ln -s /usr/local/lib/libopencv_optflow.so.3.2.0    libopencv_optflow.so.3.2.0       
sudo ln -s /usr/local/lib/libopencv_superres.so.3.2.0     libopencv_superres.so.3.2.0 
  • 下载编译rtabmap_ros
$ cd ~/catkin_ws
$ git clone https://github.com/introlab/rtabmap_ros.git src/rtabmap_ros
$ rosdep install --from-paths src --ignore-src -r -y
$ catkin_make -j1 
  • 编译最好使用-j1, 防止内存不足导致编译失败。

测试:

  • 使用d435i相机测试
  • 复制rgd_mapping.launch
cp rgbd_mapping.launch d435i_mapping.launch
  • 修改d435i_mapping.launch的如下内容:
<arg name="rgb_topic"               default="/camera/color/image_raw" />
<arg name="depth_registered_topic"  default="/camera/aligned_depth_to_color/image_raw" />
<arg name="camera_info_topic"       default="/camera/color/camera_info" />
  • 运行d435i相机
roslaunch realsense2_camera rs_rgbd.launch 
  • 运行rtabmap
roslaunch rtabmap_ros d435i_mapping.launch rtabmap_args:="--delete_db_on_start"

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

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


标签: nano入门教程软件篇