-
Notifications
You must be signed in to change notification settings - Fork 150
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
[WIP] Move Relative with Pilz does not reject trajectory with collision #538
[WIP] Move Relative with Pilz does not reject trajectory with collision #538
Conversation
…tion Planner Pilz default behavior does not return early on collisions. Thus it cannot be used with the MTC MoveRelative stage when using the min/max direction.
Setting a collision at the end of the trajectory will succeed as long as the min distance is reached and not in contact.
Even if Pilz would stop early on collisions, it would not work because the time parameterization is done on the hole trajectory in the |
... by using templated tests
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #538 +/- ##
==========================================
- Coverage 59.09% 59.02% -0.07%
==========================================
Files 90 92 +2
Lines 8504 8623 +119
==========================================
+ Hits 5025 5089 +64
- Misses 3479 3534 +55 ☔ View full report in Codecov by Sentry. |
... instead of IK failure
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.
This is a nice new unit test illustrating the issues with the Pilz planner.
In order to resolve the issue, we need to truncate the trajectory returned by the (Pilz) pipeline planner to the valid part.
moveit/moveit#3577 suggests to do that in MoveIt's planning pipeline.
@v4hn: I would like your opinion, on which way to go.
Obviously, truncation of the trajectory needs to happen before time parameterization. |
Thanks for documenting the issue @captain-yoshi !
I fully agree.
Well, the pilz planner does perform any validity checks as far as I know, so they should be added either way. |
Codecov ReportAttention: Patch coverage is
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## master #538 +/- ##
==========================================
- Coverage 58.82% 56.07% -2.75%
==========================================
Files 91 130 +39
Lines 8623 10771 +2148
Branches 0 945 +945
==========================================
+ Hits 5072 6039 +967
- Misses 3551 4686 +1135
- Partials 0 46 +46 ☔ View full report in Codecov by Sentry. |
It is my understanding that the
MoveRelative
stage min/max distance cannot be used with Pilz Industrial Motion Planner in it's default behaviour:The min/max distance option relies on an early stop on collisions to work. Unlike MoveIt Cartesian Interpolator, the Pilz does not check for collision by default as pointed out by moveit/moveit/issues/2942. This results in the trajectory still containing waypoints that are in collision.
This could lead to potential collisions. Should the default behaviour of Pilz align more with the "early stop on collisions" ? If not, we should at least document this behavior in MTC. I don't think there is fullproof solution for this usecase...
I added 2 tests which demonstrates the issue and valid behaviour:
cartesianCollisionMinMaxDistance
: Set's a collision at the end of the trajectory. The plan will succeed because the minimum distance is cleared. Early stop on collisions. This test should be added in this package.cartesianPilzCollisionMinMaxDistance
: Plan should have NOT succeeded because waypoints are in collision. No early stop on collisions (Default). Just for demonstration.I will probably submit a PR to be able to modify the default behaviour for Pilz in MoveIt. Would these 3 modes make sense ?