Kimera-VIO

  • 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

  • github link: MIT-SPARK


Index

1. Prerequisites & install

    ● GTSAM >= 4.0

    ● OpenCV >= 3.3.1

    ● OpenGV

    ● Glog, Gflags

    ● Gtest (installed automagically)

    ● DBoW2

    ● Kimera-RPGO

    ● ANMS

2. Truoble Shooting

3. Jetson Boards

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

4. Run



1. Prerequisites & Install

  • install guide using ROS from here
$ sudo apt install -y ros-melodic-image-geometry ros-melodic-pcl-ros ros-melodic-cv-bridge ros-melodic-image-proc*
$ sudo apt -y install -y --no-install-recommends apt-utils
$ sudo apt-get install -y \
      cmake build-essential unzip pkg-config autoconf \
      libboost-all-dev \
      libjpeg-dev libpng-dev libtiff-dev \
      libvtk6-dev libgtk-3-dev \
      libatlas-base-dev gfortran \
      libparmetis-dev \
      python-wstool python-catkin-tools
  • Kimera VIO ROS wrapper install
# Download #
$ cd ~/catkin_ws
$ catkin config --cmake-args -DCMAKE_BUILD_TYPE=Release && source ~/catkin_ws/devel/setup.bash
$ cd ~/catkin_ws/src && git clone git@github.com:MIT-SPARK/Kimera-VIO-ROS.git

# Install dependencies from rosinstall file using wstool #
$ wstool init
$ wstool merge Kimera-VIO-ROS/install/kimera_vio_ros_ssh.rosinstall
$ wstool update

# Compile #
$ cd ~/catkin_ws && catkin build -j $(nproc)
$ source ~/catkin_ws/devel/setup.bash

2. Trouble Shooting

  • Project 'image_proc' specifies '/usr/include/opencv' as an include dir, which is not found while catkin builds 'disparity_image_proc'
    . This error may occur if you have built OpenCV manually, not using sudo apt install command.
    => In line 96 of /opt/ros/melodic/share/image_proc/cmake/image_procConfig.cmake,
      change:
set(_include_dirs "include;/usr/include;/usr/include/opencv")
to
set(_include_dirs "include;/usr/include;/usr/local/include/opencv")
  • While catkin builds 'opencv3_catkin',
Some (but not all) targets in this export set were already defined.

  Targets Defined: gflags_shared;gflags_nothreads_shared<br>
  Targets not yet defined: gflags_static;gflags_nothreads_static<br>

=> This is because glogs & gflags already installed via sudo apt install invoke crash. So remove those and try to compile the 'opencv3_catkin'

# remove #
$ sudo apt remove -y libgflags*
$ sudo apt remove -y libgoogle-glog*

# build opencv3_catkin #
$ catkin build -j $(nproc) opencv3_catkin
$ source ./devel/setup.bash

# reinstall glog & catkin build #
$ sudo apt install -y libgflags*
$ sudo apt install -y libgoogle-glog*
$ catkin build -j $(nproc)

3. Jetson Boards

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

4. Run

● I failed to run Kimera using EuRoC dataset. However, I succeed in my own dataset recorded using realsense D435i from here.

● RealsenseIR launch file is uploaded, If you want to use your own sensors, get a calibration data using kalibr

● the reference coordinate of extrinsic matrix betweeb cam and imu is same as VINS-Fusion.

$ roslaunch kimera_vio_ros kimera_vio_ros_realsense_IR.launch
$ rviz -d $(rospack find kimera_vio_ros)/rviz/kimera_vio_euroc.rviz
$ rosbag play --clock /PATH/TO/[ROS_BAG_FILE]