-
Notifications
You must be signed in to change notification settings - Fork 935
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
fix memcpy bug in copyJointToOMPLState in ompl interface #2239
Conversation
Codecov Report
@@ Coverage Diff @@
## master #2239 +/- ##
==========================================
- Coverage 57.76% 57.41% -0.36%
==========================================
Files 326 326
Lines 25629 25629
==========================================
- Hits 14805 14714 -91
- Misses 10824 10915 +91
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for figuring this out. Also, thank you so much for making a test for this. I left some minor comments on a few things if you want to clean up some stuff in the test. If not, you are welcome to ignore those comments as they all have to do with how the test was written in the first place and you are just following what was already there.
moveit_planners/ompl/ompl_interface/src/parameterization/model_based_state_space.cpp
Show resolved
Hide resolved
This is failing CI for unrelated issues with python. |
@tylerjw Agree to all :) (in the spirit of leaving things better than you found them). Thanks for the review! Yeah, I went through the CI, but it's not ideal to go through at the moment... :) |
Co-authored-by: Tyler Weaver <tylerjw@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm, thank you
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the cleanup. I'll let someone else review this before we merge and hopefully by then we can fix the python test issue.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ouch, that's a nasty bug. Thanks for fixing this and writing a test.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well spotted! Thanks.
Description
A single line bug fix (that was punching far above its weight class in terms of causing debugging fun.)
Example of the issue in an online C++ shell.
Previous related discussion with @tylerjw, where he created the example that I use in the C++ shell link above.
What (I think) happens in this piece of code
The joint data for a specific joint is copied from MoveIt to OMPL, it looks something like this:
Robot model memory (array of doubles), the bold values are copied.
| x1 | x2 | ... | ... | y1 | y2 | y3| ... | ... | ... | z1 | .. |
Copies into OMPL state memory (also an array of doubles)
| x1 | x2 | y1 | y2 | y3 | z1 |
The | ... | represent joint values for fixed joints (or mimic joints?) that are not relevant for OMPL.
Test
I extended an existing test in
test_state_space.cpp
to make it fail without this fix. I mirrored the approach of the other tests. But maybe it is not the best way to test this. If anyone agrees, I can add another test that just copies fixed, known joint values.Checklist