-
Notifications
You must be signed in to change notification settings - Fork 948
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
Consider attached bodies in Pilz planner #2773 #2824
Conversation
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.
I generally approve, but I suggest to pass only the minimally required info, namely the start state (instead of the full planning scene).
moveit_planners/pilz_industrial_motion_planner/src/trajectory_generator.cpp
Outdated
Show resolved
Hide resolved
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.
A question about the general approach: In #2773 (comment) you conclude, that the start state is taken from the robot model instantiated in the constructor.
Would it be feasible, to update the TrajectoryGenerator::robot_model_
member variable from the scene on every new planning request (dropping the const-ness)? Or maybe drop the robot_model_
member completely and use scene->getRobotModel ()
throughout the TrajectoryGenerator class since we now have the scene available everywhere?
Could you add a testcase failing before and passing after your fix?
moveit_planners/pilz_industrial_motion_planner/src/trajectory_generator.cpp
Outdated
Show resolved
Hide resolved
Based on @jschleicher comment, I change the code to a minimal change.
I agree these kinds of errors may be avoided by using the scene instead of a fixed robot model.
It will take me some time to prepare that, but sure I will try. |
This error would still have been there. Without looking through the code layers in the pilz planner, the core of this is most likely that MoveIt's Nonetheless 👍 to remove |
Codecov Report
@@ Coverage Diff @@
## master #2824 +/- ##
==========================================
- Coverage 60.83% 60.81% -0.02%
==========================================
Files 366 366
Lines 31717 31715 -2
==========================================
- Hits 19293 19283 -10
- Misses 12424 12432 +8
Continue to review full report at Codecov.
|
Thanks for your comments. For now, I reverted to passing down the start state from the current planning scene, but only passing down the |
- Remove convertToRobotTrajectory() and integrate its line of code into setSuccessResponse() - Pass the final start_state into setSuccessResponse()
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.
I further simplified the API. Thanks for your work @cambel.
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.
Looks good to me now. Are you working on a testcase? Or should we merge as-is?
@jschleicher I don't really have time these days for the testcase. If it can be merged as-is, great. I will try to do the test cases by the end of September. |
Congrats on getting your first MoveIt pull request merged and improving open source robotics! |
Thanks for bringing this upstream! |
@cambel Thank you for this PR! |
Format code Update test
Format code Update test
Format code Update test
Format code Update test
* Add test case for #2824 Co-authored-by: Cristian Beltran <cristianbehe@gmail.com> Co-authored-by: Joachim Schleicher <joachimsl@gmx.de> Co-authored-by: jschleicher <j.schleicher@pilz.de>
Description
See to #2773.
The Pilz planners create a
start_state
based only on therobot_model
stored on instantiation of the planner, thus any new attached bodies are not present during planning. The solution here is to use the current state from the planning scene instead.Note: the planning on the Pilz planner side still succeed (and maybe it shouldn't), however, with this PR's changes the extra recheck on the planning pipeline catch the invalid plan here: https://github.com/ros-planning/moveit/blob/e8b54db3ae61a1314e49656ad84795d4cfc2e523/moveit_ros/planning/planning_pipeline/src/planning_pipeline.cpp#L260-L336
Checklist