uzh-rpg / rpg_trajectory_evaluation

Toolbox for quantitative trajectory evaluation of VO/VIO
MIT License
1.06k stars 348 forks source link

Empty estimate file #47

Open yuchenweng-private opened 2 years ago

yuchenweng-private commented 2 years ago

I got a bug that my stamped_est_gt_matched.txt file is empty, when I try to evaluate the result I got from VINS-FUSION and VINS-MONO. Terminal shows : UserWarning: loadtxt: Empty input file: "plot_folder/saved_results/traj_est/stamped_est_gt_matches.txt" matches = np.loadtxt(fn_matches, dtype=int) Saved matching results to plot_folder/saved_results/traj_est/stamped_est_gt_matches.txt. Empty estimate file. Loading data failed. Trials 0 fails, will not count. ===> MulTrajError: summarized 0 trajectories.

I have also checked that my stamped_groundtruth.txt and stamped_traj_estimat.txt, the format is right that contains timestamp, translation vector and quaternion.

shervinkoushan commented 1 year ago

Could it be that the numbers in your .txt files are rounded off?

I encountered the same issue, but it was resolved once I used std::fixed when writing the .txt files.

aartykov commented 1 year ago

@yuchenweng-private hey pal, could you solve this issue?

goldbird5 commented 1 year ago

First, I suggest you to erase the 'saved_results' folder when you run it every time. It's because it read the old file if there exists one, and if there was same issue before, the file would be empty as you can see in your UserWarning log.

The reason of the empty file may be because the 'matches' of the timestamps is empty.

You can check it by checking 'potential_matches' in 'associate_timestamps.py' line 62 is empty or not.

If then, try to explicitly set 'max_diff'(default is 0.02) as bigger value(e.g. 0.05) in 'traj_loading.load_stamped_dataset()' in 'trajectory.py' line 134.

cmakelabs commented 3 months ago

Anyone has solved this issue?