HKUST-Aerial-Robotics / VINS-Mono

A Robust and Versatile Monocular Visual-Inertial State Estimator
GNU General Public License v3.0
4.83k stars 2.07k forks source link

Trying to solve extreme drift with software synchronization #431

Open ardaboluk opened 1 year ago

ardaboluk commented 1 year ago

I've been successfully using VINS-Mono on i7 notebook with unsynchronized 50FPS global shutter camera and 250FPS high quality IMU. However, when I run the algorithm with the same camera and IMU on Jetson TX2, odometry flies away most of the time and good initialization occurs very rarely.

I suspect that this may be caused by camera and IMU being unsynchronized. On notebook, time difference is less than 30ms and changes very little. On TX2 however, initial value of time difference changes with each run. Also, it changes dramatically during the run.

As a possible solution, I think of synchronizing them with an external ROS node which publishes two topics for IMU and camera at fixed frequencies. The topic messages will have system time (Jetson TX2) as timestamp.

Then I will add subscribers to IMU and camera SDKs listening to corresponding topics. In callbacks of the subscribers, I will then publish the latest IMU and camera data, dropping the previous ones. Also, timestamps of external topic messages will be assigned to IMU and camera messages in the callbacks.

Any one tried this solution ? Is it viable ?

Could you share if you have an insight ?