Skip to content
 
 

Latest commit

 

History

17 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

vins_fusion_ros2

This repository is a ROS 2 adaptation of the original VINS-Fusion project. It supports visual-inertial odometry for both monocular and stereo camera setups, with optional GNSS/IMU fusion for global localization.

Features

  • Ported to ROS 2 (Humble and later)
  • Compatible with stereo or monocular cameras
  • Integration with IMU
  • Supports tightly coupled sensor fusion
  • Output of odometry and pose

Prerequisites

  • System
    • Ubuntu 22.04
    • ROS2 humble
  • Libraries

Install Dependencies

sudo apt-get install libgoogle-glog-dev libeigen3-dev libceres-dev libopencv-dev 

Build Instructions

cd $(PATH_TO_YOUR_ROS2_WS)/src
git clone git@github.com:yangfuyuan/vins_fusion_ros2.git
cd ..
colcon build --symlink-install && source ./install/setup.bash && source ./install/local_setup.bash

run

# vins
ros2 launch vins_fusion_ros2 vins_fusion_ros2.launch.py

Converting ROS 1 Bag Files to ROS 2 Format

ROS 2 cannot play ROS 1 .bag files directly

Unfortunately, you cannot directly play a .bag file recorded in ROS 1 using ROS 2 tools like ros2 bag play.

This is because:

  • ROS 1 .bag files are stored as a single binary file.
  • ROS 2 .bag files use a folder-based structure containing:
    • a .db3 SQLite3 database,
    • metadata YAML files.

Convert ROS 1 .bag to ROS 2 .db3

You can convert ROS 1 .bag files to ROS 2 .db3 format using rosbags.

1. Install rosbags

pip install rosbags

If you're using ~/.local/bin (default for user-level installs), you may need to add it to your shell PATH:

export PATH=$PATH:~/.local/bin

You may also consider putting the above line in your .bashrc or .zshrc.


2. Convert the .bag file

rosbags-convert --src foo.bag --dst /path/to/output_folder
  • foo.bag: your original ROS 1 bag file
  • /path/to/output_folder: target folder where converted ROS 2 .db3 bag will be saved

3. Play the converted bag file

Once conversion is complete, you can play it back using ROS 2 tools:

ros2 bag play /path/to/output_folder

License

The source code is released under GPLv3 license.

We are still working on improving the code reliability. For any technical issues, please contact Tong Qin <qintonguavATgmail.com>.

For commercial inquiries, please contact Shaojie Shen <eeshaojieATust.hk>.

About

ROS 2 adaptation of VINS-Fusion

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages