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

[BUG] Context is reused despite distinct requests, md5 hash is identical #256

Open
werner291 opened this issue Sep 2, 2021 · 3 comments · May be fixed by #266
Open

[BUG] Context is reused despite distinct requests, md5 hash is identical #256

werner291 opened this issue Sep 2, 2021 · 3 comments · May be fixed by #266
Assignees
Labels
bug Something isn't working

Comments

@werner291
Copy link
Contributor

werner291 commented Sep 2, 2021

Hello,

unfortunately, the MD5 checksum of a ROS message is of the message definition itself, not of the message contents. It's meant to be used for comparing the version of a message.

Hence, the OMPL planner will re-use a context even with distinct requests, and re-plan between the same (now wrong) start/end states. There does not appear to be any built-in way to compare ROS messages, supposedly because comparing floats is not well-defined.

Correction: operator== is implemented for ROS messages. That does require us to hold on to the whole message though. Maybe we could use a shared_ptr to avoid duplication between user code and planner code?

@werner291 werner291 added the bug Something isn't working label Sep 2, 2021
@werner291
Copy link
Contributor Author

werner291 commented Sep 2, 2021

As far as I can tell, this affects benchmarking as well, since it calls the same method: https://github.com/KavrakiLab/robowflex/blob/master/robowflex_library/src/benchmarking.cpp#L216

@werner291
Copy link
Contributor Author

As a quick-fix from user code, you can forcefully refresh the context before planning:

simple_planner->refreshContext(scene, request, true);
auto response = simple_planner->plan(scene, request);

@zkingston
Copy link
Contributor

For benchmarking this is not an issue since preRun calls a force refresh, so context will not be reused. I'll take a look into comparing the entire ROS message - this has been a thorn for a while.

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

Successfully merging a pull request may close this issue.

2 participants