Browse by type
ROS Wrapper for SparkVIO.
<img src="https://github.com/MIT-SPARK/Kimera-VIO-ROS/raw/v4.0/docs/media/SparkVIO_ROS_mesh.gif">
Install ROS by following our reference, or the official ROS website.
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).
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
Download a Euroc rosbag: for example V1_01_easy.
As a general good practice, open a new terminal and run: roscore
In another terminal, launch SparkVIO ROS wrapper:
bash
roslaunch spark_vio_ros spark_vio_ros_euroc.launch
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).
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_wsfor each new terminal unless you added the following lines to your~/.bashrcfile: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.
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"
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
rosbag play --clock /PATH/TO/KITTI_ROSBAG
bash
rviz -d $(rospack find spark_vio_ros)/rviz/spark_vio_kitti.rvizWhy 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.
Download and install the Intel RealSense SDK
Download and install the Intel RealSense ROS wrapper
Adapt the RealSense ROS wrapper to publish a single interpolated IMU message (see nodelet xml)
Make sure to properly cover the infrared projector on the RealSense (this otherwise affects the quality of the infrared image with dots)
Collect calibration bagfiles for camera intrinsics and extrinsics (see instructions)
Calibrate camera intrinsics and extrinsics using Kalibr
Create configuration files for SparkVIO ROS wrapper using Kalibr2SparkVIO-pinhole-radtan
Create/adapt your own specific launch file, similar to example RealSense IR
Launch RealSense camera using roslaunch realsense2_camera [name of your launch file]
Visualize image stream using rosrun image_view image_view image:=[name of camera topic]
Launch SparkVIO ROS wrapper using roslaunch spark_vio_ros [name of your launch file]
Visualize trajectory with RVIZ using rviz, (see example config)
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).
Download and install the MyntEye SDK and ROS wrapper
Collect calibration bagfiles for camera intrinsics and extrinsics (see instructions)
Calibrate camera intrinsics and extrinsics using Kalibr, recommended model is: pinhole-equi (see OpenCV documentation)
Create configuration files for SparkVIO ROS wrapper using Kalibr2SparkVIO-pinhole-equi or [Kalibr2SparkVIO-pinhole-radtan]
Create/adapt your own specific launch file, similar to example MyntEye S
Launch MyntEye camera using roslaunch mynt_eye_ros_wrapper [name of your launch file]
Visualize image stream using rosrun image_view image_view image:=[name of camera topic]
Launch SparkVIO ROS wrapper using roslaunch spark_vio_ros [name of your launch file] (example, see below)
Visualize trajectory with RVIZ using rviz, (see example config)
Visualize state and statistics using rqt_multiplot, (see example config)
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.
SparkVIO ROS wrapper is open source under the BSD license, see the LICENSE.BSD file.
$ claude mcp add Kimera-VIO-ROS \
-- python -m otcore.mcp_server <graph>