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

Issue saving the simulation state with save_total_state in ROS2 #477

Open
harry-graves opened this issue Oct 4, 2024 · 4 comments
Open
Labels
bug Something isn't working

Comments

@harry-graves
Copy link

Hi, I noticed an issue when trying to save the simulation state in a ROS2 environment. After changing filepath_est, filepath_std and filepath_gt, when using the save_total_state:=true flag, I get the following error:

[run_subscribe_msckf-1] terminate called after throwing an instance of 'boost::filesystem::filesystem_error'
[run_subscribe_msckf-1]   what():  boost::filesystem::create_directories: Invalid argument
[ERROR] [run_subscribe_msckf-1]: process has died [pid 611689, exit code -6, cmd '/home/ori/ros2_ws/install/ov_msckf/lib/ov_msckf/run_subscribe_msckf --ros-args -r __ns:=/ov_msckf --params-file /tmp/launch_params_f1udo1j0 --params-file /tmp/launch_params_8cgjp7ug --params-file /tmp/launch_params__47f7d76 --params-file /tmp/launch_params_vj12ovz1 --params-file /tmp/launch_params_7y3x4w5v'].

However I noticed this can be worked around by manually replacing "state_estimate.txt", "state_deviation.txt" and "state_groundtruth.txt" with your own full filepaths in the following file:

std::string filepath_est = "state_estimate.txt";
std::string filepath_std = "state_deviation.txt";
std::string filepath_gt = "state_groundtruth.txt";

This would then give me a stderr output when rebuilding, but it worked as a temporary fix.

@diplodocuslongus
Copy link

diplodocuslongus commented Nov 8, 2024

After changing filepath_est, filepath_std and filepath_gt

Where do you change these files?
I have the same error as yours when setting save_total_state:=true (ROS2 humble) but without changing any destination file path or file name.

Your fix does the trick to save the deviation and estimate states, but the groundtruth isn't saved though.

Thanks a lot anyway.

@harry-graves
Copy link
Author

filepath_est, filepath_std and filepath_gt can be changed in estimator_config.yaml, though whatever filepaths you put here are overwritten by the fix I have given above.

I'm not too sure what you mean by saving the groundtruth, but the above workaround allowed me to save the estimated state, which includes the trajectory, to a text file.

@diplodocuslongus
Copy link

not too sure what you mean by saving the groundtruth

I was referring to the ground truth data that is included in a dataset when running OpenVINS offline.
And I meant that when running openVINS with a pre-existing dataset (e.g. EuROC), I don't see any state_groundtruth.txt file.

Also the data format saved in the estimated state file is different from that expected by ov_eval for, e.g., trajectory alignment.

@goldbattle goldbattle added the bug Something isn't working label Nov 23, 2024
@goldbattle
Copy link
Member

I think this needs to be fixed. I think the ROS2 version of this saving doesn't work as expected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants