MIT-SPARK / Kimera-VIO-ROS

ROS wrapper for Kimera-VIO
BSD 2-Clause "Simplified" License
377 stars 157 forks source link

[TIP] A successful installation of Kimera-VIO-ROS Guide #180

Open jaku-jaku opened 2 years ago

jaku-jaku commented 2 years ago

Description:

It has been a bit rabbit hole to get it working. I have just get it compiled properly in Ubuntu 18.04 - Melodic .

Guide

Step 1:

Follow the main guide https://github.com/MIT-SPARK/Kimera-VIO-ROS:

  1. Pre-req: https://github.com/MIT-SPARK/Kimera-VIO-ROS#a-prerequisities
  2. Actual Installation: https://github.com/MIT-SPARK/Kimera-VIO-ROS#b-kimeravio-ros-wrapper-installation

⚠️ Stop before catkin build, or catkin clean if you tried to built but in vain

Step 2: (GTSAM)

As mentioned in https://github.com/MIT-SPARK/Kimera-VIO/issues/194, GTSAM has removed identity under Pose3 and Rot3 Option 1: A quick fix is to checkout the older version

$ cd catkin_ws/src/gtsam
$ git checkout c4184e192b4605303cc0b0d51129e470eb4b4ed1

Option 2: modify Kimera-VIO to match latest GTSAM [TODO]

Step 3: (Kimera-VIO)

  1. checkout the branch hydra support:
    $ cd catkin_ws/src/Kimera-VIO
    $ git checkout feature/hydra

Step 4:

  1. Download http://robotics.ethz.ch/~asl-datasets/ijrr_euroc_mav_dataset/vicon_room1/V1_01_easy/V1_01_easy.bag
  2. in different terminals:
    
    # Terminal 1:
    $ roscore

Terminal 2:

$ rviz -d $(rospack find kimera_vio_ros)/rviz/kimera_vio_euroc.rviz

Terminal 3:

$ roslaunch kimera_vio_ros kimera_vio_ros_euroc.launch online:=true

Terminal 4:

$ rosbag play --clock /PATH/TO/EUROC_ROSBAG



🥂 Good luck, folks!

Hopefully, this get maintained. 
jaku-jaku commented 2 years ago

According to https://github.com/MIT-SPARK/Kimera-VIO/pull/187, gtsam version commit: e5866799dff48239573cdd84964180867e50edd2

keiro23 commented 2 years ago

Hi, can you elaborate on what exactly I need to do in step 2.2(modify Kimera-VIO to match latest GTSAM [TODO])?

jaku-jaku commented 2 years ago

Hi, can you elaborate on what exactly I need to do in step 2.2(modify Kimera-VIO to match latest GTSAM [TODO])?

just replace functions whatever the compiler has thrown error on.

   46 |   isam_param->setCacheLinearizedFactors(true);
      |               ^~~~~~~~~~~~~~~~~~~~~~~~~
      |               cacheLinearizedFactors
{ws}/Kimera-VIO/src/backend/VioBackendParams.cpp:51:15: error: ‘struct gtsam::ISAM2Params’ has no member named ‘setEvaluateNonlinearError’; did you mean ‘evaluateNonlinearError’?
   51 |   isam_param->setEvaluateNonlinearError(false);  // only for debugging
      |               ^~~~~~~~~~~~~~~~~~~~~~~~~
      |               evaluateNonlinearError

(for example) as


  isam_param->cacheLinearizedFactors = True;
SonginCV commented 1 year ago

Thank you for a helpful guide. I have found that the guide makes Kimera-VIO-ROS w/ ros bag and realsense work successfully in my Ubuntu desktop. However, Kimera-VIO w/o ROS is not working this guide and I think that depends on OpenCV version. In here, the author has recommend OpenCV 3.4.2 for the Kimera w/o ROS. In addition, for the Jetson boards, that seem to be not working so I have been struggling with it.