MCPcopy Create free account
hub / github.com/MIT-SPARK/Kimera-VIO-ROS

github.com/MIT-SPARK/Kimera-VIO-ROS @v4.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release v4.0 ↗ · + Follow
55 symbols 88 edges 10 files 12 documented · 22% updated 23mo agov4.0 · 2019-09-21★ 43794 open issues

Browse by type

Functions 46 Types & classes 9
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

SparkVIO_ROS

ROS Wrapper for SparkVIO.

<img src="https://github.com/MIT-SPARK/Kimera-VIO-ROS/raw/v4.0/docs/media/SparkVIO_ROS_mesh.gif">

1. Installation

A. Prerequisities

i. ROS

Install ROS by following our reference, or the official ROS website.

ii. SparkVIO's dependencies

Follow installation instructions in SparkVIO. Make sure you install SparkVIO's dependencies: GTSAM, OpenCV, OpenGV.

SparkVIO itself can be installed by cloning SparkVIO in your catkin workspace, so you can spare installing SparkVIO from source (its dependencies must be installed anyway).

B. SparkVIO ROS wrapper Installation

If you have the above prerequisities and SparkVIO installed and built, installation of the SparkVIO ROS wrapper should be:

# Setup catkin workspace
mkdir -p ~/catkin_ws/src
cd ~/catkin_ws/
catkin init

# Add workspace to bashrc.
echo 'source ~/catkin_ws/devel/setup.bash' >> ~/.bashrc

# Clone repo
cd ~/catkin_ws/src
git clone git@github.mit.edu:SPARK/spark_vio_ros.git

# Install dependencies from rosinstall file using wstool
wstool init
wstool merge spark_vio_ros/install/spark_vio.rosinstall
wstool update

Clone SparkVIO catkin wrapper (only if you haven't installed SparkVIO from source).

# Clone SparkVIO catkin wrapper, useful if you don't want to build spark vio from source.
git clone git@github.mit.edu:SPARK/spark_vio_catkin.git

Finally, compile:

# Compile code
catkin build

# Refresh workspace
source ~/.bashrc

2. Usage

Download a Euroc rosbag: for example V1_01_easy.

Online

  1. As a general good practice, open a new terminal and run: roscore

  2. In another terminal, launch SparkVIO ROS wrapper: bash roslaunch spark_vio_ros spark_vio_ros_euroc.launch

  3. In another terminal, launch rviz for visualization: bash rviz -d $(rospack find spark_vio_ros)/rviz/spark_vio_euroc.rviz

    Note: this rviz configuration makes use of a rviz plugin: mesh_rviz_plugins. To visualize the textured 3D mesh, clone this plugin to your catkin workspace and catkin build it (note that this should be done automatically via wstool).

  4. Finally, in another terminal, launch the downloaded Euroc rosbag: bash rosbag play --clock /PATH/TO/EUROC_ROSBAG

Note that you will need to both source ROS and your catkin_ws for each new terminal unless you added the following lines to your ~/.bashrc file: bash source /opt/ros/melodic/setup.bash # Change `melodic` for your ROS distribution. source ~/catkin_ws/devel/setup.bash # Change `bash` to the shell you use.

Offline

In this mode, the provided rosbag will be first parsed and then sent to the VIO for processing. This is particularly useful when debugging to avoid potential ROS networking issues. - To run, launch the SparkVIO ROS wrapper with the online parameter set to false and specify the rosbag's path: bash roslaunch spark_vio_ros spark_vio_ros_euroc.launch online:=false rosbag_path:="PATH/TO/ROSBAG"

Other datasets

The launch file and parameters can also be configured for other datasets. For example, here we provide a kitti rosbag for testing. To run, in one terminal, launch the spark vio ROS wrapper with the launch file we configured for kitti:

roslaunch spark_vio_ros spark_vio_ros_kitti.launch
  • In another terminal, launch a Kitti rosbag:
rosbag play --clock /PATH/TO/KITTI_ROSBAG 
  • In rviz, you can use the provided config file provided at spark_vio_ros/rviz/sparkvio_kitti.rviz bash rviz -d $(rospack find spark_vio_ros)/rviz/spark_vio_kitti.rviz

Hardware use

RealSense D435i (Infrared)

Why do we use the infrared cameras on the D435i? The infrared cameras offer the option to run the SparkVIO stereo version on monochrome global shutter cameras, which are generally better suited for visual tracking.

Setup

  1. Download and install the Intel RealSense SDK

  2. Download and install the Intel RealSense ROS wrapper

  3. Adapt the RealSense ROS wrapper to publish a single interpolated IMU message (see nodelet xml)

  4. Make sure to properly cover the infrared projector on the RealSense (this otherwise affects the quality of the infrared image with dots)

  5. Collect calibration bagfiles for camera intrinsics and extrinsics (see instructions)

  6. Calibrate camera intrinsics and extrinsics using Kalibr

  7. Create configuration files for SparkVIO ROS wrapper using Kalibr2SparkVIO-pinhole-radtan

  8. Create/adapt your own specific launch file, similar to example RealSense IR

Testing

  1. Launch RealSense camera using roslaunch realsense2_camera [name of your launch file]

  2. Visualize image stream using rosrun image_view image_view image:=[name of camera topic]

  3. Launch SparkVIO ROS wrapper using roslaunch spark_vio_ros [name of your launch file]

  4. Visualize trajectory with RVIZ using rviz, (see example config)

  5. Visualize state and statistics using rqt_multiplot, (see example config)

It is important to remember that when launching the VIO, the camera should be standing still and upward (camera fov forward looking).

MyntEye S

Setup

  1. Download and install the MyntEye SDK and ROS wrapper

  2. Collect calibration bagfiles for camera intrinsics and extrinsics (see instructions)

  3. Calibrate camera intrinsics and extrinsics using Kalibr, recommended model is: pinhole-equi (see OpenCV documentation)

  4. Create configuration files for SparkVIO ROS wrapper using Kalibr2SparkVIO-pinhole-equi or [Kalibr2SparkVIO-pinhole-radtan]

  5. Create/adapt your own specific launch file, similar to example MyntEye S

Testing

  1. Launch MyntEye camera using roslaunch mynt_eye_ros_wrapper [name of your launch file]

  2. Visualize image stream using rosrun image_view image_view image:=[name of camera topic]

  3. Launch SparkVIO ROS wrapper using roslaunch spark_vio_ros [name of your launch file] (example, see below)

  4. Visualize trajectory with RVIZ using rviz, (see example config)

  5. Visualize state and statistics using rqt_multiplot, (see example config)

Example

For the MyntEyes used in SubT: (online)

roslaunch spark_vio_ros spark_vio_ros_mynteye.launch camera:=JPL distortion:=equidistant

Options for camera are MIT and JPL. Options for distortion are equidistant and radtan.

Same goes for use offline, using the spark_vio_ros_mynteye_offline.launch file and an additional data argument with path to bagfile.

BSD License

SparkVIO ROS wrapper is open source under the BSD license, see the LICENSE.BSD file.

Core symbols most depended-on inside this repo

Shape

Method 45
Class 9
Function 1

Languages

C++91%
Python9%

Modules by API surface

src/base-data-source.cpp18 symbols
src/rosbag-data-source.cpp7 symbols
src/ros-data-source.cpp7 symbols
src/stereo-image-buffer.cpp6 symbols
scripts/gt_logger_node.py5 symbols
include/spark-vio-ros/rosbag-data-source.h3 symbols
include/spark-vio-ros/ros-data-source.h3 symbols
include/spark-vio-ros/base-data-source.h3 symbols
include/spark-vio-ros/stereo-image-buffer.h2 symbols
src/stereo-vio-ros.cpp1 symbols

For agents

$ claude mcp add Kimera-VIO-ROS \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page