Giter VIP home page Giter VIP logo

inertialscale's Introduction

1. INTRODUCTION

Matlab implementation of the scale estimation method presented in:

Mustaniemi J., Kannala J., Särkkä S., Matas J., Heikkilä J. "Inertial-Based Scale Estimation for Structure from Motion on Mobile Devices", International Conference on Intelligent Robots and Systems (IROS), 2017

Algorithm recovers the metric scale of the visual reconstruction given the camera poses and inertial measurements. Temporal and spatial alignment of the camera and IMU is also performed in the process.

2. INPUTS

2.1. Camera poses and timestamps

Camera poses and timestamps are read from a text file 'poses.txt'. Place the file to the folder '/data/dataset_name/poses.txt'. The file should have the following format:

10158706658000 2.3115 -0.7212 2.0553 0.9054 0.4168 -0.0635 -0.0480

10158739989000 2.3282 -0.7229 2.0687 0.9049 0.4180 -0.0631 -0.0482

10158773320000 2.3859 -0.7232 2.0309 0.9027 0.4222 -0.0675 -0.0464

The first column contains the timestamps in nanoseconds. Columns 2-4 contain the camera positions (x,y,z). Columns 5-8 contain the camera orientations in quaternions (qw,qx,qy,qz).

2.2. Inertial measurements and timestamps

Angular velocities and accelerations are read from text files 'gyroscope.txt' and 'accelerometer.txt'. Place files to the folder '/data/dataset_name/gyroscope.txt', etc. The files should have the following format:

10158731787661 7.92720 0.53151 4.84108

10158741791911 7.92720 0.49799 4.90811

10158751780744 7.87932 0.49081 4.97755

The first column contains the timestamps in nanoseconds. Last three colums contain the measurements (x,y,z). Units should be [rad/s] and [m/s^2]. Note: inertial and visual timestamp sources can be different.

2.3. Additional

If the ground truth scale correction factor is known in advance (testing purposes), one can place a text file 'groundtruth.txt' to the folder '/data/dataset_name/groundtruth.txt'. The algorithm will then report the error of the scale estimate in percents. The file should have a single line containing the scale factor (e.g. 0.02571850).

3. OUTPUTS

The algorithm will output the estimated scale correction factor, gravity vector and bias of the accelerometer. The code will also output the estimated time offset between the camera and IMU (td), as well as the relative rotation between them (R).

inertialscale's People

Contributors

jannemus 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

Watchers

 avatar  avatar  avatar

inertialscale's Issues

bugs in solveClosedForm

Hi, thanks for the open-source code.
I am trying to use this code for scale alignment but did not get reasonable results.
I check the code and find there might be a bug in solveClosedForm function.
After the Umeyama alignment, we recover the Rs, but when rotating IMU measure to camera coordinate, e.g., this line, we should use angImu*Rs.transpose() rather than angImu*Rs .
After fixing this bug (actually, I use the unofficial C++ implementation, which is almost the same as this implementation), I can get the right extrinsic, which is consistent with other self-calibrated VIO systems, such as VINS-Mono. But I still can not get a reasonable scale estimate.
Can you give me some advice?

Attempt to initialize VINS

@jannemus
I originally intended to try it as an initialization method, but for a VINS problem, the global position (x, y, z) is not observable and we cannot obtain the camera position. Therefore, can we consider this method to be universal in VINS? Or can relative positions be used?
我本来是想在尝试作为初始化手段,但是对于一个VINS问题来说,全局位置(x,y,z)是不可观的,我们不可能获得相机位置,所以是否可以认为这种方法在VINS通用呢?还是说可以使用相对位置呢?

License

Hi,

There is currently no license to use your code, and I would appreciate one so I can check it out and use the algorithm.

Thank You!

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.