Giter VIP home page Giter VIP logo

larvio's Introduction

LARVIO

LARVIO is short for Lightweight, Accurate and Robust monocular Visual Inertial Odometry, which is based on hybrid EKF VIO. It is featured by augmenting features with long track length into the filter state of MSCKF by 1D IDP to provide accurate positioning results.

The core algorithm of LARVIO depends on Eigen, Boost, Suitesparse, Ceres and OpenCV, making the algorithm of good portability.

A single-thread toyish example as well as a ROS nodelet package for LARVIO is provided in this repo.

Notice that Hamilton quaternion is utilized in LARVIO, which is a little bit different from the JPL quaternion used in traditional MSCKF community. The filter formulation is thus derivated from scratch. Please check our CJA2020 and Senors2019 papers for details.

Results

1) Demo on EuRoC

LARVIO on EuRoC

2) Trajectories RMSEs

This is the results of an earlier version of LARVIO. Due to the changes, the current repo might not reproduce the exact results as below.

RMSE on EuRoC dataset are listed.

Evaluations below are done using PetWorm/sim3_evaluate_tool.

In the newest update, online imu-cam extrinsic and timestamp error calibration in VINS-MONO are turned on to explore its extreme ability. While in this setup, the V102 sequence would somehow fail. The result of VINS-MONO in V102 below is of setup without online calibration.

Results of our algorithm are repeatible in every run of every computer I tested so far.

comparison

3) TUM-VI Dataset

4) UZH-FPV Dataset

Cross Platform Performance

This package has been successfully deployed on ARM (Jetson Nano and Jetson TX2, realtime without GPU refinement). The performances are comparable to the results on PCs.

Below is the exper1ment result in our office. A TX2-based multi-thread CPU-only implementation without ROS was developed here. We used MYNT-EYE-D camera SDK to collect monocular images and IMU data, and estimate the camera poses in realtime. We walk around out the office to the corridor or the neighbor room, and return to the start point (in white circle) for a couple of times.

TX2 implementation

Acknowledgement

This repo is for academic use only.

LARVIO is originally developed based on MSCKF_VIO. Tremendous changes has been made, including the interface, visualization, visual front-end and filter details.

LARVIO also benefits from VINS-MONO and ORB_SLAM2.

We would like to thank the authors of repos above for their great contribution. We kept the copyright announcement of these repos.

Introduction

LARVIO is an EKF-based monocular VIO. Loop closure was not applied in our algorithm.

1) Hybrid EKF with 1D IDP

A hybrid EKF architecture is utilized, which is based on the work of Mingyang Li. It augments features with long track length into the filter state. In LARVIO, One-Dimensional Inverse Depth Parametrization is utilized to parametrize the augmented feature state, which is different from the original 3d solution by Li. This novelty improves the computational efficiency compare to the 3d solution. The positioning precision is also improved thanks to the utilization of complete constraints of features with long track length.

2) Online calibration

It is capable of online imu-cam extrinsic calibration, online timestamp error calibration and online imu intrinsic calibration.

3) Automatic initialization

LARVIO can be automatically initialized in either static or dynamic scenerios.

4) Robust visual front-end

We applied a ORB-descriptor assisted optical flow tracking visual front-end to improve the feature tracking performances.

5) Closed-form ZUPT

A closed-form ZUPT measurement update is proposed to cope with the static scene.

Feasibility

LARVIO is a feasible software.

Users can change the settings in config file to set the VIO as MSCKF-only, 3d hybrid or 1d hybrid solutions. And all the online calibration functions can be turned on or off in each solution by the config file.

Dependencies

LARVIO depends on Eigen, Boost, Suitesparse, Ceres and OpenCV for the core algorithm.

Toyish example

The toyish example depends on OpenCV (4.1.2 on OSX and 3.4.6 on Ubuntu 16.04/18.04), Pangolin is needed for visualization. Notice that extra gcc 7 installation is needed for Ubuntu 16.04.

ROS nodelet

The ROS nodelet package has been tested on Kinetic and Melodic for Ubuntu 16.04/18.04. Following ROS packages are needed: tf, cv_bridge, message_filters and image_transport.

Usage

This part show how to play LARVIO with EuRoC dataset.

Toyish example

The toyish LARVIO example is a CMake based software. After install the dependencies, try commands below to compile the software:

cd LARVIO
mkdir build
cd build
cmake -D CMAKE_BUILD_TYPE=Release ..
make

An example is given in LARVIO/run.sh to show how to run the example.

ROS nodelet

A ROS nodelet package is provided in LARVIO/ros_wrapper. It has been tested on Kinetic and Melodic. Use commands below to compile the nodelet:

cd YOUR_PATH/LARVIO/ros_wrapper
catkin_make

After building it, launch the LARVIO by:

. YOUR_PATH/LARVIO/ros_wrapper/devel/setup.bash
roslaunch larvio larvio_euroc.launch

Open a new terminal, and launch the rviz for visualization by (optional):

. YOUR_PATH/LARVIO/ros_wrapper/devel/setup.bash
roslaunch larvio larvio_rviz.launch

Open a new terminal to play the dataset:

rosbag play MH_01_easy.bag

Docker

A Dockerfile is provided in LARVIO/docker. After building it, you need to load dateset and modify the run.sh in container to run toyish example, or use 'roslaunch' to run the ROS package. Also, GUI is needed in the host to display the Pangolin and rviz view.

There is another VNC docker image which is convinent for monitoring the rviz view. Click petworm/vnc-larvio-playground to directly pull this image, or build it from source with PetWorm/docker-larvio-playground.

Related Works

Please cite our CJA paper if you use LARVIO in your research:

@article{qiu2020lightweight,
  title={Lightweight hybrid Visual-Inertial Odometry with Closed-Form Zero Velocity Update},
  author={Qiu, Xiaochen and Zhang, Hai and Fu, Wenxing},
  journal={Chinese Journal of Aeronautics},
  year={2020},
  publisher={Elsevier}
}

Another earlier work illustrating some parts of LARVIO is as below:

@article{qiu2019monocular,
  title={Monocular Visual-Inertial Odometry with an Unbiased Linear System Model and Robust Feature Tracking Front-End},
  author={Qiu, Xiaochen and Zhang, Hai and Fu, Wenxing and Zhao, Chenxu and Jin, Yanqiong},
  journal={Sensors},
  volume={19},
  number={8},
  pages={1941},
  year={2019},
  publisher={Multidisciplinary Digital Publishing Institute}
}

larvio's People

Contributors

petworm avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

larvio's Issues

ZUPT

in zupt-update. the residual is about "prev - cur", but the jacobian is about " cur - prev", is there a mistake?

License?

What is the license of your code?

Trying to get LARVIO to run in "realtime"

I have been attempting to modify the provided example codes to run "Real-time" with an imu and raspberry pi cam on a NVIDIA Jetson Nano dev board. So far I have managed to fill the imu buffer and gather imaged properly but after some digging in the code it is returning an error at "not enough features; move device around". The imu and camera are attached to the same device so their movement is correlated but it is not able to track features through the frames.

As there are no examples of how to get the algorithm running in "real time" I was wondering if anyone could help with how to structure the information and feed it to the algorithm correctly!

Thank you for any help you can provide, I can provide any information that would be helpful.

Question about measurement update

Hello,

Thanks for your great work!
I saw you update MSCKF feature/SLAM feature/new SLAM feature in one step. Will it perform better if we update these features step by step?

Best,
Oliver

ubuntu16.04 run euroc example error

  1. gcc 7
  2. ubuntu16.04
===========================================
using FEJ...
estimating td... initial td = 0
estimating extrinsic...
not calibrating imu instrinsic online...
Hybrid MSCKF...Maximum number of feature in state is 30
features augmented into state will use 1d idp
===========================================

Images from now on will be utilized...

Inclinometer-initializer completed by using 181 imu data !!!

*** stack smashing detected ***: ./larvio terminated
Aborted (core dumped)

Should I add someting else ?

Running LARVIO on Jetson Nano XS

Hi,

Great work!

Do you by any chance have results regarding running time stats for both the frontend and backend part and CPU consumption for when you run LARVIO on the TX2 or whether it has the same running time as the pc? At the moment I am able to run it on a Jetson Nano XS at 30 Hz.

Also, I just tried to run LARVIO on my pc, but the best I get for the backend it 11ms. What did you do to get it to approx. 8 ms (i.e how many features, and whether you disabled some options on the yaml file)?

I would like to reach the 50 Hz on the Jetson or at least try to optimize as much as possible (I am thinking to offload the frontend to the GPU maybe by using OpenCV with GPU).

If you could give me any hint on which direction I should take that would be very helpful.

Thanks a lot :)

Best,
Ilyass

用自己制作的数据,发现不能正常运行

定位到是这里
buildOpticalFlowPyramid(
img_, curr_pyramid_,
Size(processor_config.patch_size, processor_config.patch_size),
processor_config.pyramid_levels, true, BORDER_REFLECT_101,
BORDER_CONSTANT, false);
出了问题
我的配置文件是按照euroc.yaml改的,但是图像的分辨率比较低(640x400)。
请问有可能是分辨率太低的原因吗,如果不是的话,会是什么原因呢

Using LARVIO with realsense d435i

Hello,

I would like to know if it is possible to run this algorithm with the realsense d435i.
I tried it but the results are far from being good. May be is something wrong with the configuration that I'm using...

Do you have any configuration for this camera like you have for the mynteye?

Best,
Filipe

连续状态转移矩阵的离散化

您好 邱博!请教您一个公式推导问题。在连续的状态转移矩阵Phi中,式38,41,42,46,47是如何推导进行离散化的啊?能对其中某个进行讲解一下吗?十分感谢!
Screenshot from 2021-02-04 14-09-07
Screenshot from 2021-02-04 14-05-28

ZUPT algorithm

Hi,
Are there any reference papers for the ZUPT algorithm applied to MSCKF?

Question

邱博士:
您好!我有一个问题想要请教你,原谅我英文不好,所以选择中文交流。
我看到你在imu和图像的时间戳处理上,选择以imu时间作为基准,然后通过特征点坐标预测的方式得到当前时刻的视觉观测,我看到很多其他工作是选择以图像时间戳为基准,通过插值的方式得到图像时间对应的imu测量。我想问一下这两种方式有什么优缺点或者异同吗?
祝安

Learning materials

Hi! I'm trying to learn LARVIO implementration, but i have poor knowledge in the field of inertial sensors. Could You tell me what books can help in understanding the work?

Hi, when I make the code, there is errors,

/home/liujiang/Code/LARVIO/src/StaticInitializer.cpp: In member function ‘bool larvio::StaticInitializer::tryIncInit(const std::vectorlarvio::ImuData&, larvio::MonoCameraMeasurementPtr)’:
/home/liujiang/Code/LARVIO/src/StaticInitializer.cpp:20:22: error: ISO C++ forbids declaration of ‘feature’ with no type [-fpermissive]
for (const auto& feature : img_msg->features)
^
/home/liujiang/Code/LARVIO/src/StaticInitializer.cpp:20:32: warning: range-based ‘for’ loops only available with -std=c++11 or -std=gnu++11
for (const auto& feature : img_msg->features)
^
/home/liujiang/Code/LARVIO/src/StaticInitializer.cpp:21:29: error: request for member ‘id’ in ‘feature’, which is of non-class type ‘const int’
init_features[feature.id] = Vector2d(feature.u, feature.v);
^
/home/liujiang/Code/LARVIO/src/StaticInitializer.cpp:21:52: error: request for member ‘u’ in ‘feature’, which is of non-class type ‘const int’
init_features[feature.id] = Vector2d(feature.u, feature.v);
^
/home/liujiang/Code/LARVIO/src/StaticInitializer.cpp:21:63: error: request for member ‘v’ in ‘feature’, which is of non-class type ‘const int’
init_features[feature.id] = Vector2d(feature.u, feature.v);
^
/home/liujiang/Code/LARVIO/src/StaticInitializer.cpp:30:20: error: ISO C++ forbids declaration of ‘feature’ with no type [-fpermissive]
for (const auto& feature : img_msg->features) {
^
/home/liujiang/Code/LARVIO/src/StaticInitializer.cpp:30:30: warning: range-based ‘for’ loops only available with -std=c++11 or -std=gnu++11
for (const auto& feature : img_msg->features) {
^
/home/liujiang/Code/LARVIO/src/StaticInitializer.cpp:31:27: error: request for member ‘id’ in ‘feature’, which is of non-class type ‘const int’
curr_features[feature.id] = Vector2d(feature.u, feature.v);
^
/home/liujiang/Code/LARVIO/src/StaticInitializer.cpp:31:50: error: request for member ‘u’ in ‘feature’, which is of non-class type ‘const int’
curr_features[feature.id] = Vector2d(feature.u, feature.v);
^
/home/liujiang/Code/LARVIO/src/StaticInitializer.cpp:31:61: error: request for member ‘v’ in ‘feature’, which is of non-class type ‘const int’
curr_features[feature.id] = Vector2d(feature.u, feature.v);
^
/home/liujiang/Code/LARVIO/src/StaticInitializer.cpp:32:36: error: request for member ‘id’ in ‘feature’, which is of non-class type ‘const int’
if (init_features.find(feature.id) != init_features.end()) {
^
/home/liujiang/Code/LARVIO/src/StaticInitializer.cpp:33:32: error: request for member ‘u’ in ‘feature’, which is of non-class type ‘const int’
Vector2d vec2d_c(feature.u, feature.v);
^
/home/liujiang/Code/LARVIO/src/StaticInitializer.cpp:33:43: error: request for member ‘v’ in ‘feature’, which is of non-class type ‘const int’
Vector2d vec2d_c(feature.u, feature.v);
^
/home/liujiang/Code/LARVIO/src/StaticInitializer.cpp:34:48: error: request for member ‘id’ in ‘feature’, which is of non-class type ‘const int’
Screenshot from 2021-08-25 03-40-13

Error while trying to run the ROS example

@PetWorm
Dear Sir,

Thank you for publishing this work !!
While trying to run the ROS example we receive the following error:

user@user-HP-ProDesk-600-G4-DM:~/LARVIO/ros_wrapper$ roslaunch larvio larvio_euroc.launch
... logging to /home/user/.ros/log/4efc391c-0333-11eb-bbb7-3822e23158ce/roslaunch-user-HP-ProDesk-600-G4-DM-27946.log
Checking log directory for disk usage. This may take a while.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.

started roslaunch server http://user-HP-ProDesk-600-G4-DM:46333/

SUMMARY

PARAMETERS

  • /qxc_robot/system/child_frame_id: odom
  • /qxc_robot/system/config_file: /home/user/LARVIO...
  • /qxc_robot/system/fixed_frame_id: world
  • /rosdistro: melodic
  • /rosversion: 1.14.7

NODES
/qxc_robot/
system (nodelet/nodelet)

ROS_MASTER_URI=http://localhost:11311

process[qxc_robot/system-1]: started with pid [27961]
type is larvio/SystemNodelet
[ INFO] [1601535646.772076998]: System: Finish loading ROS parameters...

===========================================
using FEJ...
estimating td... initial td = 0
estimating extrinsic...
not calibrating imu instrinsic online...
Hybrid MSCKF...Maximum number of feature in state is 30
features augmented into state will use 1d idp

[ INFO] [1601535646.795484764]: System Manager: Finish creating ROS IO...
Images from now on will be utilized...

Dynamic initialization success !

[qxc_robot/system-1] process has died [pid 27961, exit code -11, cmd /opt/ros/melodic/lib/nodelet/nodelet standalone larvio/SystemNodelet ~imu:=/imu0 ~cam0_image:=/cam0/image_raw __name:=system __log:=/home/user/.ros/log/4efc391c-0333-11eb-bbb7-3822e23158ce/qxc_robot-system-1.log].
log file: /home/user/.ros/log/4efc391c-0333-11eb-bbb7-3822e23158ce/qxc_robot-system-1*.log
all processes on machine have died, roslaunch will exit
shutting down processing monitor...
... shutting down processing monitor complete
done

Please advise.
Thank you

Covariance for dynamic initialization

thanks for your great job on LARVIO!in dynamic initialization,the covariance is not considered for imu_state in LARVIO? could you have any ideas about the obtian of covariance from your dynamic initialization?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.