Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Empty estimate file #47

Open
yuchenweng-private opened this issue Jul 19, 2022 · 4 comments
Open

Empty estimate file #47

yuchenweng-private opened this issue Jul 19, 2022 · 4 comments

Comments

@yuchenweng-private
Copy link

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.

  • Successs indices: []
    No success runs, not plotting.

Plotting absolute error for one trajectory...
Traceback (most recent call last):
File "catkin_rpg_trajectory_evaluation/src/rpg_trajectory_evaluation/scripts/analyze_trajectory_single.py", line 176, in
pu.plot_trajectory_top(ax, plot_traj.p_es_aligned, 'b', 'Estimate')
NameError: name 'plot_traj' is not defined

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
Copy link

shervinkoushan commented Sep 27, 2022

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
Copy link

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

@goldbird5
Copy link

goldbird5 commented Nov 28, 2022

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
Copy link

Anyone has solved this issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants