IMU Preintagration question on concept

Issue #320 invalid
Eugen GFu created an issue

Dear authors,

thank you very much for the great framework! It helps me a lot in performing experiments on slam and related optimization!

I have a question regarding the imu pre-integration. Today, I tried to apply the concept on the IMU data provided by this dataset: http://projects.asl.ethz.ch/datasets/doku.php?id=kmavvisualinertialdatasets or to be more precise, its "Machine Hall 01": http://robotics.ethz.ch/~asl-datasets/ijrr_euroc_mav_dataset/machine_hall/MH_01_easy/MH_01_easy.zip

Basically, I read the acceleration data and the rotation data and apply the

integrateMeasurement(acc, omega, dt)

method. You can see the simple test code here: https://github.com/mojovski/mono-vo/blob/master/tests/test_imuPreIntegration.cpp In short, this is the main part:

for (int i=off; i<9203; i++) //until time 1403636590008555520
    {
        t=std::atoll(lines[i].elements[0].c_str());
        for (int ai=4; ai<7; ai++)
        {
            acc(ai-4)=std::atof(lines[i].elements[ai].c_str());
        }
        for (int wi=1; wi<4; wi++)
        {
            omega(wi-1)=std::atof(lines[i].elements[wi].c_str());
        }

        double dt=(t-last_t)/1e9;
        pim.integrateMeasurement(acc, omega, dt);
        last_t=t;
        //pim.update()

    }

However, at the end of the integration, I get a huge error in position:

Navstate from the preintegration:
time:1403636625763555584 ns 
pose: R:
|0.994612, -0.0861074, -0.0577275|
|0.0882827, 0.995436, 0.0362508|
|0.0543426, -0.0411518, 0.997674|

p:[18.7715, -0.0239318, 14.4225]'
v:[18.9735, 0.353791, 14.4962]'

1403636625819881216ns - 
Ground truth position: 0.0801577 0.0543189  0.101987

Could somebody please point me in a direction? I feel like I misunderstood how to use the framework on the IMU data. One question I can think of: do I have to handle the gravitation vector somehow before putting the raw data into the preintegration module?

Thank you very much in advance!!

PS: Sorry if this is the wrong place for questions. I haven't found a better one.

Comments (5)

  1. Log in to comment