最方便
sudo apt-get install ros-$ROS_DISTRO-realsense2-camera
git clone https://gitee.com/kay2020/realsense-ros.git cd realsense-ros/ git checkout `git tag | sort -V | grep -P "^2.\d+\.\d+" | tail -1` cd .. catkin_init_workspace cd .. catkin_make clean catkin_make -DCATKIN_ENABLE_TESTING=False -DCMAKE_BUILD_TYPE=Release catkin_make install
ROS下使用D435i跑rtabmap和octomap
依赖
sudo apt install ros-melodic-cv-bridge ros-melodic-image-transport ros-melodic-tf ros-melodic-diagnostic-updater ros-melodic-ddynamic-reconfigure
sudo apt-get install ros-kinetic-octomap*
sudo apt install ros-melodic-cartographer-rviz
sudo apt-get install ros-melodic-imu-filter-madgwick sudo apt-get install ros-melodic-rtabmap-ros sudo apt-get install ros-melodic-robot-localization
启动
roslaunch realsense2_camera opensource_tracking.launch
ORB-SLAM2
sudo apt-get install libglew-dev sudo apt-get install cmake sudo apt-get install libpython2.7-dev sudo apt-get install ffmpeg libavcodec-dev libavutil-dev libavformat-dev libswscale-dev sudo apt-get install libdc1394-22-dev libraw1394-dev sudo apt-get install libjpeg-dev libpng12-dev libtiff5-dev libopenexr-dev
安装Pangolin
cd ~ git clone https://gitee.com/kay2020/Pangolin.git cd Pangolin mkdir build cd build cmake .. make -j4
cd ~ git clone https://github.com/raulmur/ORB_SLAM2.git ORB_SLAM2
cd ORB_SLAM2 chmod +x build.sh ./build.sh