Skip to content

ppaa1135/ORB_SLAM2-D435

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 

Repository files navigation

ORB_SLAM2-D435

1. Pangolin install

  • install grew

    sudo apt-get install libglew-dev
    
  • Pangolin download

    git clone https://github.com/stevenlovegrove/Pangolin.git
    cd Pangolin
    mkdir build
    cd build
    cmake ..
    sudo make install
    

2. Opencv(3.2.0) install

  • prev package update

    sudo apt-get update
    sudo apt-get upgrede
    
  • package install

    sudo apt-get install build-essential cmake pkg-config libjpeg-dev libtiff5-dev libjasper-dev libpng12-dev libavcodec-dev libavformat-dev libswscale-dev libxvidcore-dev libx264-dev libxine2-dev libv4l-dev v4l-utils libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev libqt4-dev mesa-utils libgl1-mesa-dri libqt4-opengl-dev libatlas-base-dev gfortran libeigen3-dev python2.7-dev python3-dev python-numpy python3-numpy
    
  • opencv install

    mkdir opencv
    cd opencv
    wget -O opencv.zip https://github.com/Itseez/opencv/archive/3.2.0.zip
    unzip opencv.zip
    wget -O opencv_contrib.zip https://github.com/Itseez/opencv_contrib/archive/3.2.0.zip
    unzip opencv_contrib.zip
    
  • opencv build (만약 에러나면 아래 참고)

    cd opencv-3.2.0/
    mkdir build
    cd build
    cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local -D WITH_TBB=OFF -D WITH_IPP=OFF -D WITH_1394=OFF -D BUILD_WITH_DEBUG_INFO=OFF -D BUILD_DOCS=OFF -D INSTALL_C_EXAMPLES=ON -D INSTALL_PYTHON_EXAMPLES=ON -D BUILD_EXAMPLES=OFF -D BUILD_TESTS=OFF -D BUILD_PERF_TESTS=OFF -D ENABLE_NEON=ON -D WITH_QT=ON -D WITH_OPENGL=ON -D OPENCV_EXTRA_MODULES_PATH=../../opencv_contrib-3.2.0/modules -D WITH_V4L=ON -D WITH_FFMPEG=ON -D WITH_XINE=ON -D BUILD_NEW_PYTHON_SUPPORT=ON -D PYTHON_INCLUDE_DIR=/usr/include/python2.7 -D PYTHON_INCLUDE_DIR2=/usr/include/x86_64-linux-gnu/python2.7 -D PYTHON_LIBRARY=/usr/lib/x86_64-linux-gnu/libpython2.7.so ../
    make -j
    sudo make install
    
  • check install

    pkg-config --modversion opencv
    pkg-config --libs --cflags opencv
    
  • build error due to [CUDA 9.0]

    https://stackoverflow.com/questions/46584000/cmake-error-variables-are-set-to-notfound

3. eigen 3.1.0

4. ORB-SLAM install

  git clone https://github.com/raulmur/ORB_SLAM2.git ORB_SLAM2
  cd ORB_SLAM2
  chmod +x build.sh
  ./build.sh
  • [usleep(3000);] error ./build.sh

    Find file and add the following codes.

    (LocalMapping.cc / LoopClosing.cc / Tracking.cc / System.cc / Viewer.cc System.cc / mono_euroc.cc / mono_kitti.cc / mono_tum.cc / rgbd_tum.cc stereo_kitti.cc / stereo_euroc.cc)

    #include <unistd.h>
    #include <stdio.h>
    #include <stdlib.h>
    

5. ORB_SLAM ROS

Move ORB_SLAM file to catkin_ws/src/ and Remove build file

./build.sh
./build_ros.sh

6. Realsense setting

Install the latest Intel® RealSense™ SDK 2.0

  • https://github.com/IntelRealSense/realsense-ros#installation-instructions

  • Register the server's public key:

    sudo apt-key adv --keyserver keys.gnupg.net --recv-key F6E65AC044F831AC80A06380C8B3A55A6F3EFCDE || sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-key F6E65AC044F831AC80A06380C8B3A55A6F3EFCDE
    
  • Add the server to the list of repositories (Ubuntu 16 LTS):

    sudo add-apt-repository "deb http://realsense-hw-public.s3.amazonaws.com/Debian/apt-repo xenial main" -u
    
  • Install the libraries

    sudo apt-get install librealsense2-dkms
    sudo apt-get install librealsense2-utils
    sudo apt-get install librealsense2-dev
    sudo apt-get install librealsense2-dbg
    
  • check install

    realsense-viewer
    

Install Intel® RealSense™ ROS from Sources

  • create_workspace

    mkdir -p ~/catkin_ws/src
    cd ~/catkin_ws/src/
    
  • Clone the latest Intel® RealSense™ ROS from here into 'catkin_ws/src/'

    git clone https://github.com/IntelRealSense/realsense-ros.git
    cd realsense-ros/
    git checkout `git tag | sort -V | grep -P "^\d+\.\d+\.\d+" | tail -1`
    cd ..
    
  • install ddynamic_reconfigure

    git clone https://github.com/pal-robotics/ddynamic_reconfigure.git
    
  • catkin_make

    catkin_init_workspace
    cd ..
    catkin_make clean
    catkin_make -DCATKIN_ENABLE_TESTING=False -DCMAKE_BUILD_TYPE=Release
    catkin_make install
    echo "source ~/catkin_ws/devel/setup.bash" >> ~/.bashrc
    source ~/.bashrc
    

7. Realsense D435 ROS

launch file

  • http://www.programmersought.com/article/485956353/

  • Add two lines at [rs_rgbd.launch]:110 lines

    <remap from="/camera/aligned_depth_to_color/image_raw" to="/camera/depth_registered/image_view>
    <remap from="/camera/color/image_raw" to="/camera/rgb/image_raw>
    

rs_rgbd.launch fails

8. ORB_SLAM & D435

roslaunch realsense2_camera rs_rgbd.launch 

rosrun ORB_SLAM2 RGBD ~/catkin_ws/src/ORB_SLAM2/Vocabulary/ORBvoc.txt ~/catkin_ws/src/ORB_SLAM2/Examples/ROS/ORB_SLAM2/Asus.yaml 

About

connect orb_slam2 & realsense d435 with ROS

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published