# Visual-inertial odometry (VIO) The VIO sample is a SLAM algorithm fusing camera and IMU data using an Extended Kalman Filter (EKF). It tracks 6DOF pose fusing camera, accelerometer and gyroscope, and estimates the gravity orientation and pose continuously. The figure shows the pipeline of VIO. IMU and image information are tightly coupled when the pose is finally output after EKF.  **Figure : VIO pipeline** For information on the ROS nodes and topics used in the pipeline flow, see [Pipeline flow for VIO](https://docs.qualcomm.com/doc/80-70017-265/topic/vio_5_3_6.html#pipeline-vio). ## Use cases **Prerequisites:** - The QIRP SDK and dependencies are installed, see [Build the software](https://docs.qualcomm.com/doc/80-70017-265/topic/build-the-software_4_1.html#build-the-software-4-1) and [Flash and install](https://docs.qualcomm.com/doc/80-70017-265/topic/flash-and-install_4_3.html#flash-and-install-4-3). - `SSH` is enabled in ‘Permissive’ mode with the steps mentioned in [Log in using SSH](https://docs.qualcomm.com/bundle/publicresource/topics/80-70017-254/how_to.html#use-ssh). - The camera ROS node is enabled. - The IMU ROS node is enabled. - Relative positions between the camera and IMU are configured. For example, use E-Calib. **Case 1: Run out-of-the-box VIO** **Steps:** 1. Start two terminals, and run the following commands in each terminal to set up QIRP SDK and ROS2 environment on the device. Value range of `ROS_DOMAIN_ID`: [0, 232]. ssh root@[ip-addr] (ssh) mount -o remount,rw /usr (ssh) export HOME=/home (ssh) source /usr/share/qirp-setup.sh (ssh) source /usr/bin/ros_setup.bash (ssh) export ROS_DOMAIN_ID=xx Copy to clipboard 2. In terminal 1, launch the VIO node. (ssh) cd /usr/share/mono-vslam/Configuration (ssh) ros2 launch qrb_ros_vio vio.launch.py Copy to clipboard **Result** The following log shows that the VIO node initialization is complete.  3. In terminal 2, you can observe the output result by executing this command: (ssh) ros2 topic echo /vslam_odom_raw Copy to clipboard The topic information is updated continuously on the screen. 4. To show the result in Rviz2 on your Ubuntu PC, perform the following configurations. 1. Install Rviz2 according to [Install Rviz2](https://docs.qualcomm.com/doc/80-70017-265/topic/install-rviz2_5_1_3.html#install-rviz2-5-1-3). 2. Add `TF`, `Grid` by display type. 3. Add `vslam/labeled_img` by topic.  5. To stop running VIO, press Ctrl + C in terminal 1 to stop the process. Then, the `/usr/share/mono-vslam/Configuration/warmStart.txt` file is generated on the device. > > > Table : Default configuration and output files and paths for VIO > > > | Files | Default path | Description | > | --- | --- | --- | > | Configuration files and path |
/usr/share/mono-vslam/Configuration/vislam.cfg
/usr/share/mono-vslam/Configuration/Configuration.SF.xml
/usr/share/mono-vslam/Configuration/ov9282_Camera.yaml
/usr/share/mono-vslam/Configuration/icm42688_IMU.yaml
The .cfg file configures the input paths of the VIO algorithm.
The .xml file is the configuration file of the VIO algorithm.
The ov9282_Camera.yaml file configures the parameters of the ov9282 camera.
The icm42688_IMU.yaml file configures the parameters of ICM42688.
/usr/share/mono-vslam/Configuration/warmStart.txt
/usr/share/mono-vslam/vwslam/vio_output.csv
The .txt file indicates some state values for fast filter initialization in VIO.
The .csv file contains the poses of the base link.