rpng / open_vins

An open source platform for visual-inertial navigation research.
https://docs.openvins.com
GNU General Public License v3.0
2.11k stars 627 forks source link

Problems replicating EuRoC results, pgeneva_ros_eth.launch produces timestamps inconsistent with ground truth. #91

Closed ab-10 closed 3 years ago

ab-10 commented 4 years ago

I'm trying to replicate the results of your paper OpenVINS: A Research Platform for Visual-Inertial Estimation, using pgeneva_ros_eth.launch file.

I'm using EuRoC V1_02_medium.

I downloaded the bag file and ASL dataset from here: https://projects.asl.ethz.ch/datasets/doku.php?id=kmavvisualinertialdatasets

I used data.csv as the ground-truth (located in V1_02_medium/mav0/state_groundtruth_estimate0, where V1_02_medium is the unziped ASL dataset).

I converted data.csv to data.txt using rosrun ov_eval format_converter data.csv

In ov_msckf/launch/pgeneva_ros_eth.launch I have changed the bag arg to my system path to V1_02_medium.bag and I've switched dosave to true.

However, the timestamps of the newly created path estimate file (in the location specified by arg path_est) do not match the timestamps of data.txt file.

data.txt starts at timestamp (s) 1403715524.90714 and ends at 1403715608.41214.

Path estimate produced by pgeneva_ros_eth.launch starts at 1403715278.16214 and ends in 1403715418.71220.

Consequently, the path estimate ends before the ground truth data begins.

If there's a more straightforward way to replicate the results, please let me know.

goldbattle commented 4 years ago

Since we estimate the IMU camera time offset they shouldn't line up. The ground truth is in the IMU clock frame, thus we append the current camera IMU time offset when we publish the poses. If you disable the toff it should line up if you use a time offset of zero (I have not tested, but logically it should be the case).

Let me know if this answers your question.

ab-10 commented 4 years ago

If you disable the toff it should line up if you use a time offset of zero

The error persists when bag_start arg is set to 0, is this what you meant?

I should also specify, that the error only occurs with EuRoC V1_02_medium, I've tested with the other EuRoC bag files and they provide a sufficient number of overlapping timestamps with the ground truth to evaluate using error_singlerun script (which is not the case when running V1_02_medium).

goldbattle commented 4 years ago

Can you compare to the CSV files here: https://www.github.com/rpng/open_vins/tree/master/ov_data%2Feuroc_mav

These should be the ones from the zip ASL files, besides the V101 entry.

ab-10 commented 4 years ago

The V1_02 ground truth entry I used is identical to the one provided in https://www.github.com/rpng/open_vins/tree/master/ov_data%2Feuroc_mav

goldbattle commented 4 years ago

The ones that I use are from the ov_data folder, so I am not sure why there is a difference. Are you by chance using sim_time or some other sort of parameter to change how ROS time works? From rosbag info I get that the bag:

path:        V1_02_medium.bag
version:     2.0
duration:    1:28s (88s)
start:       Jun 25 2014 12:58:43.93 (1403715523.93)
end:         Jun 25 2014 13:00:12.05 (1403715612.05)

When I run it I get that the data that is saved to the traj_estimate.txt:

I am running the following command to look at the error for a single run (default launch file):

rosrun ov_eval error_singlerun posyaw /tmp/traj_estimate.txt src/open_vins/ov_data/euroc_mav/V1_02_medium.txt
goldbattle commented 3 years ago

Reopen if you run into the issue again.