Skip to content

Latest commit

 

History

History
114 lines (102 loc) · 4.13 KB

README.md

File metadata and controls

114 lines (102 loc) · 4.13 KB

VINS-Fusion (CPU & GPU version)

  • hardware setup
    • jetson TX2 - Jetpack 4.2
    • jetson AGX Xavier
    • jetson Xavier NX - Jetpack 4.4
    • realsense D435i (color, infra1, infra2)
    • pixhawk4 mini

  • software setup
    • Ubuntu: 18.04
    • ROS: Melodic
    • OpenCV 3.4.1

  • CPU ver. github link: HKUST-Aerial-Robotics
  • GPU ver. github link: HKUST-Aerial-Robotics


Index

1. Prerequisites

    ● Eigen

    ● Ceres solver

2. Install

3. Jetson Boards

    ● If you encounter OpenCV related errors like 'cv::XX was not declared~', copy these custom define into the proper C++ files. Actually, there is no installation difference among TX2, Xavier, and NX

4. Run

    ● Uploaded folders for following setup: D435i, pixhawk4 mini

    ● for using your own sensor setup, you have to get a calibration data using kalibr



1. Prerequisites

● Eigen

  • Use below command or manually download eigen-3.3.9.zip from here
$ wget -O eigen-3.3.9.zip https://gitlab.com/libeigen/eigen/-/archive/3.3.9/eigen-3.3.9.zip 
$ unzip eigen-3.3.9.zip
$ cd ~/eigen-3.3.9 && mkdir build && cd build
$ cmake ../ && sudo make install -j $(nproc)

● Ceres solver

  • Ceres solver from here
$ sudo apt-get install -y cmake libgoogle-glog-dev libatlas-base-dev libsuitesparse-dev
$ wget http://ceres-solver.org/ceres-solver-1.14.0.tar.gz
$ tar zxf ceres-solver-1.14.0.tar.gz
$ cd ceres-solver-1.14.0
$ mkdir build && cd build
$ cmake -DEXPORT_BUILD_DIR=ON \
        -DCMAKE_INSTALL_PREFIX=/usr/local \
        ../
$ make -j $(nproc) # number of cores
$ make test -j $(nproc)
$ sudo make install -j $(nproc)

● cv_bridge

  • if you built OpenCV manually (refer here), you should also build 'cv_bridge' manually from source.
  • Download from proper branch in here according to your ROS version. For example,
$ cd ~/catkin_ws/src
$ git clone -b melodic https://github.com/ros-perception/vision_opencv.git



2. Install

  • CPU version: git clone and build from source
$ cd ~/catkin_ws/src
$ git clone https://github.com/HKUST-Aerial-Robotics/VINS-Fusion.git
$ cd ../ && catkin build -DCMAKE_BUILDTYPE=Release -j3
$ source ~/catkin_ws/devel/setup.bash
  • GPU version: for more information, refer engcang

  • download

$ cd ~/catkin_ws/src
$ git clone https://github.com/pjrambo/VINS-Fusion-gpu.git
  • edit following CMakeLists.txt (from engcang)

    1. ~/VINS-Mono/loop_fusion/CMakeLists.txt : line 19
      #find_package(OpenCV)
      => include(/usr/local/share/OpenCV/OpenCVConfig.cmake)

    2. ~/VINS-Mono/vins_estimator/CMakeLists.tx: line 20
      #find_package(OpenCV REQUIRED)
      => include(/usr/local/share/OpenCV/OpenCVConfig.cmake)

  • catkin build

$ cd ~/catkin_ws/
$ catkin build -DCMAKE_BUILDTYPE=Release -j $(nproc)
$ source ~/catkin_ws/devel/setup.bash



3. Jetson Boards

● Actually, no installation difference among TX2, Xavier, and NX



4. Run

● Uploaded folders for following setup: D435i, pixhawk4 mini

● for using your own sensor setup, you have to get a calibration data using kalibr

$ roslaunch realsense2_camera rs_camera.launch
$ roslaunch mavros px4.launch
$ rosrun vins vins_node [path of realsense_stereo_imu_config.yaml]
$ rosrun loop_fusion loop_fusion_node [path of realsense_stereo_imu_config.yaml]
$ roslaunch vins vins_rviz.launch