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

Fix Solution::fillMessage() #432

Merged
3 commits merged into from
Mar 9, 2024
Merged

Conversation

rhaschke
Copy link
Contributor

Need to generate full planning scene message if planning progressed backwards: The scene_diff field describes PlanningScene changes of the end scene relative to the start scene, while during planning it might be inversed.
Seemingly fixes #405. I would like to add some unit tests before merging.
I also noticed that ModifyPlanningScene::(add|remove)Object doesn't yet work in backwards mode. Shall we support this or just issue an error? To reverse, removeObject() would require the full CollisionObject description (to actually create the object), while currently (for the forward pass) the name suffices.

Copy link
Contributor

@captain-yoshi captain-yoshi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Confirming that this fixes #405.

Copy link
Contributor

@v4hn v4hn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to generate full planning scene message if planning progressed backwards

That's a cheap (in terms of lines of code) solution indeed. 👍 It is quite costly with meshes in the scene, but it's definitely better than the current broken state. An improved implementation could still implement a generic "diff" for independent scene objects. Please consider creating a new issue for this as future work when merging this PR.

CI doesn't like it yet. Seems to be related to scene diff handling during execution:

[ INFO] [1677622610.740722501]: Found a contact between 'object' (type 'Object') and 'panda_leftfinger' (type 'Robot link'), which constitutes a collision. Contact information is not stored.
[ INFO] [1677622610.740764900]: Collision checking is considered complete (collision was found and 0 contacts are stored)
[ INFO] [1677622610.740791500]: Trajectory component '7/19' is invalid after scene update

rhaschke added a commit to ubi-agni/moveit_task_constructor that referenced this pull request May 25, 2023
rhaschke added a commit to ubi-agni/moveit_task_constructor that referenced this pull request May 25, 2023
@rhaschke rhaschke force-pushed the fix-solution-message branch from cae81ca to eee9989 Compare May 25, 2023 21:43
rhaschke added a commit to ubi-agni/moveit_task_constructor that referenced this pull request May 25, 2023
@rhaschke rhaschke force-pushed the fix-solution-message branch from eee9989 to 351a30c Compare May 25, 2023 23:21
dholzmann pushed a commit to CentralLabFacilities/moveit_task_constructor that referenced this pull request Jun 30, 2023
v4hn pushed a commit to v4hn/moveit_task_constructor that referenced this pull request Jan 29, 2024
captain-yoshi pushed a commit to captain-yoshi/moveit_task_constructor that referenced this pull request Feb 8, 2024
rhaschke added a commit to ubi-agni/moveit_task_constructor that referenced this pull request Mar 8, 2024
@rhaschke rhaschke force-pushed the fix-solution-message branch from 351a30c to 1246d25 Compare March 8, 2024 10:36
rhaschke added 3 commits March 8, 2024 17:16
Need to generate full planning scene message if planning progressed backwards:
The scene_diff field describes PlanningScene changes of the end scene relative to the start scene,
while during planning it might be inversed.
Joints are handled in trajectories.
Scene diffs should not modify joints during execution.
Fixes moveit#353.

Alternative to moveit#504. The previous solution, to always clear the joint states
during message generation, broke the visualization in rviz.
@rhaschke rhaschke force-pushed the fix-solution-message branch from 1246d25 to 2450127 Compare March 8, 2024 16:19
Copy link

codecov bot commented Mar 8, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 58.83%. Comparing base (e09fecd) to head (2450127).

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #432      +/-   ##
==========================================
+ Coverage   58.70%   58.83%   +0.14%     
==========================================
  Files          91       91              
  Lines        8614     8617       +3     
==========================================
+ Hits         5056     5069      +13     
+ Misses       3558     3548      -10     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

rhaschke added a commit to ubi-agni/moveit_task_constructor that referenced this pull request Mar 8, 2024
The scene_diff field usually describes PlanningScene changes of the end scene relative to the start scene.
For backwards planning, this direction is reversed: the start scene is derived from the end scene.
Thus, we need to generate a full planning scene message for the end scene if planning progressed backwards.

Fixes moveit#405.
@rhaschke rhaschke closed this pull request by merging all changes into moveit:master in 55c4b52 Mar 9, 2024
@rhaschke rhaschke deleted the fix-solution-message branch March 9, 2024 10:59
v4hn pushed a commit to v4hn/moveit_task_constructor that referenced this pull request Sep 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Error when displaying the last waypoint of a MoveRelative stage
3 participants