-
Notifications
You must be signed in to change notification settings - Fork 938
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 Condition for Adding current DistanceResultData to DistanceMap for DistanceRequestType::SINGLE #1963
Fix Condition for Adding current DistanceResultData to DistanceMap for DistanceRequestType::SINGLE #1963
Conversation
Thanks for helping in improving MoveIt and open source robotics! |
Codecov Report
@@ Coverage Diff @@
## master #1963 +/- ##
=======================================
Coverage 49.88% 49.88%
=======================================
Files 315 315
Lines 24739 24739
=======================================
+ Hits 12340 12341 +1
+ Misses 12399 12398 -1
Continue to review full report at Codecov.
|
Hello @jonasTUM , Wow, that's quite an involved error you found there. I did not spend too much time on this, but tried to come up with a test case for this yesterday. |
Hello @v4hn, actually, I am not so familiar with testing. I have seen that within the
I am wondering, whether testing a distance request type makes sense for the bullet library. I think that the distance request type, e.g. |
For building the test, I would just rebuild the package, as cmake will only rebuild changed files.
https://answers.ros.org/question/271114/catkin-run-specific-unit-test/ Using an install workspace with
This call will also print the regular output of the tests.
True, someone implemented |
20e75ac
to
98dff69
Compare
This logic is/was broken in collision_detection_fcl. bullet does not even implement it, so factorize DistanceRequest distance tests in their own suite
98dff69
to
d992957
Compare
The new test catches the issue now. I'll merge once the tests succeeds here. |
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.
The new test fails on current upstream and succeeds with this patch.
Thank you for the contribution @jonasTUM !
Congrats on getting your first MoveIt pull request merged and improving open source robotics! |
Description
One line of code is changed in the collision calculation interface file for FCL.
Within the settings for a distance request within MoveIt! the user can specify a DistanceRequestType.
I am using distance requests for avoiding collisions of the robot. Therefore, I want to check every collision geometry of a single robot link with the world objects. I am only interested in the closest point of each robot link to the world object, i.e. in the collision geometry of the robot link that is closest to the world object. Therefore, I am using DistanceRequestType::SINGLE. However, when using SINGLE MoveIt! does not store the results for the closest collision object in the DistanceMap of the DistanceResult. Instead, MoveIt! stores the distance result for a random collision geometry of the robot link in the DistanceMap, and not the results for the closest collision geometry. This results in the assumption that a certain robot link is far away from an obstacle although collision is very close.
I think, this is due to the wrong condition for replacing the current DistanceResultData in the DistanceMap in case of SINGLE distance request types. If the distance of the current collision geometry is smaller than the stored one, the stored one should be replaced.
In my case, I got a more reasonable robot behavior after having applied this change.