Skip to content

xVIO ROS

Jeff Delaune edited this page Mar 31, 2023 · 7 revisions

x_vio_ros builds a ROS executable for the xVIO module of the X library.

Installation instructions

Clone the source code

Go to the source directory of your catkin workspace

cd $YOUR_CATKIN_WS/src

Clone the X library, which contains all the technical code

git clone [email protected]:jpl-x/x.git

Clone the xVIO ROS repo, which is a ROS wrapper for VIO with the X library.

git clone [email protected]:jpl-x/x_vio_ros.git

Build

Note: The build command assumes you are using catkin commands line tools, but xVIO ROS should equally compile with 'catkin_make'.

catkin build x_vio_ros

Source your workspace after building

source devel/setup.bash

Note for ARM processors: x_vio_ros and x can automatically detect if they are being compiled on an aaarch64 processor architecture and apply the correct compiler flags to optimize performance (tested on Nvidia Jetson TX2). Otherwise, they will use the compiler flags for x86 processors. We will add more boards as we test. If you want to set the compiler flags for other processor architectures, you need to modify the CMakelists.txt in the x_vio_ros and x catkin packages.

Run instructions

Run xVIO on the example dataset.

Download the example dataset.

Launch xVIO

roslaunch x_vio_ros vio.launch

In another terminal, start the xVIO GUI

roscd x_vio_ros/scripts/

./load_gui.sh

In dynamic reconfigure pane at the bottom right of the GUI, click on x_vio in the left menu, then on INITIALIZE_FILTER.

Note: More details on xVIO GUI here.

This will load the parameters from params.yaml and get the filter ready to go.

Start the bag

rosbag play circle_high_vel_restamped.bag --clock

The GUI outputs should look like the video below.

Example output

Run xVIO on a custom dataset or live sensor streams

  1. Modify the initial state, calibration and IMU noise in params.yaml

Note: More information calibration here.

  1. Modify the input topics in launch/vio.launch

  2. Launch xVIO and its GUI like described in the previous subsection

Test (optional)

If you have completed the xVIO ROS installation successfully, you can test if xVIO is working properly on the example dataset.

Create a new environment variable pointing to the folder where you the dataset was downloaded.

export XVIO_DATASET_DIR=$PATH_TO_DATASET

Note: This line can be added in your ~/.bashrc file to make that environment variable persistent.

From your workspace folder, run the tests with

catkin build x_vio_ros --no-deps --catkin-make-args run_tests

Test results can be retrieved with

catkin_test_results build/x_vio_ros

Clone this wiki locally