HITSZ-NRSL / Dynamic-VINS

[RA-L 2022] RGB-D Inertial Odometry for a Resource-restricted Robot in Dynamic Environments
310 stars 40 forks source link

Initial orientation of the robot #9

Closed eliabntt closed 1 year ago

eliabntt commented 1 year ago

Hi there. I'm facing some issue replaying my bags. Essentially after some time the system starts drifting when I use VIO. With VO it does not happen. My guess is that it's mainly related to the fact that the robot is not horizontal and static at the beginning of the experiment or maybe due to spikes that we have with the Imu. However, those spikes are coherent with the odometry (it's simulated data). Is there a way to say "this is my initial position/orientation" to your system such that the gravity and the Imu locations are initialized correctly?

eliabntt commented 1 year ago

I've seen that you initialize it but it takes the average. Unfortunately my bag starts with the robot rotating in roll/pitch so I guess that that's the reason I see the drift.

Or maybe you've some other suggestion on why this might happen.

jianhengLiu commented 1 year ago

If the initial state is not static, it would help to set static_init to 0, then it would follow the initialization procedure according to 'Online Temporal Calibration for Monocular Visual-Inertial Systems'. The averages are mainly used to check if the imu is motivated or not and if not it is used to estimate the bias of accelerometor. Another factor might come from the failure tracking of feature if the rotation is fierce or if it is pure rotation. You could turn show_track on and check it in rviz. So far we haven't have enough test on dynamic initialization, your feedback is beneficial to us. Thanks a lot!

eliabntt commented 1 year ago

Ok, I'll try to share something today maybe you'll have some ideas. I've seen many people in the various vins version with problems similar to mine.

Can you explain a bit more how static_init works? It was my understanding that it was the transform between the Imu and the camera not between the system and the map frame.

On Tue, 1 Nov 2022, 02:41 ChrisLiu, @.***> wrote:

If the initial state is not static, it would help to set static_init to 0, then it would follow the initialization procedure according to 'Online Temporal Calibration for Monocular Visual-Inertial Systems'. The averages are mainly used to check if the imu is motivated or not and if not it is used to estimate the bias of accelerometor. Another factor might come from the failure tracking of feature if the rotation is fierce or if it is pure rotation. You could turn show_track on and check it in rviz. So far we haven't have enough test on dynamic initialization, your feedback is beneficial to us. Thanks a lot!

— Reply to this email directly, view it on GitHub https://github.com/HITSZ-NRSL/Dynamic-VINS/issues/9#issuecomment-1297901746, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEXDUJVBKUEYZVJYQDV3TE3WGBYNFANCNFSM6AAAAAARTH5QHQ . You are receiving this because you authored the thread.Message ID: @.***>

jianhengLiu commented 1 year ago

The static_init is based on the prior that the scale is obtained from depth sensor or stereo, it give a prior to gravity direction that is horizontal and calculate the bias of imu. They are both rough guess and will be refined in optimization. We also tried to use the average to initialize, and didn't see a much different in our experiments. (staticInitialAlignWithDepth function in estimator.cpp)

eliabntt commented 1 year ago

Hi there, good news for you bad for me. My colleague wrongly set the camera intrinsic for the experiment, so rn we no longer have drift.

Btw, for reference, a good parameter to tune is acc_n even if the IMU is precise (we have gt).