Publish planning scene while planning#3689
Conversation
rhaschke
left a comment
There was a problem hiding this comment.
This points into the right direction. I'm sure there are many more PS locks.
Question: Do we still need ExecutableMotionPlan::planning_scene_monitor_ after all?
...anning/planning_scene_monitor/include/moveit/planning_scene_monitor/planning_scene_monitor.h
Outdated
Show resolved
Hide resolved
moveit_ros/planning/planning_scene_monitor/src/planning_scene_monitor.cpp
Outdated
Show resolved
Hide resolved
I was wondering this. It looks like the only place it is used (other than to lock it) is when If I understand |
|
From poking around the code, I think I probably have misunderstood I assumed the So I wonder if I should keep the |
|
(This PR now solves the original problem - now I need to stop it breaking everything else) |
I don't know the used of it by heart and would need to dive into the code. Unfortunately, I don't have time to do that before the weekend. |
|
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 #3689 +/- ##
==========================================
- Coverage 48.01% 47.89% -0.11%
==========================================
Files 605 605
Lines 61228 61350 +122
Branches 7054 7028 -26
==========================================
- Hits 29390 29375 -15
- Misses 31417 31554 +137
Partials 421 421 ☔ View full report in Codecov by Sentry. |
|
I think my attempted changes to I think I'm going to remove those changes, and limit the scope of this PR to the other places where |
|
This approach doesn't seem to be working. I'm testing it by planning a series of motions, with subsequent motions planning while earlier motions are executing. The first motion plans and executes fine, but later motions start printing "Returning dirty link transforms", and occasionally spurious collisions are reported. Then the move group node crashes with backtrace |
Do you know where/how these PSM updates are used? |
If I'm honest, I don't completely follow what My best guess is that |
|
Could you pick an exemplary test and report its error output here? |
https://github.com/moveit/moveit/actions/runs/12993254139/job/36235033434 fails with I tried to track back where this was coming from, but my grasp of the codebase is not good enough to follow it through. |
|
This looks like PS updates are processed where they shouldn't (and not the other way around as you assumed). |
This is a classic error when the scene used for checking is not updated during attaching an object.
Exactly. c174715 |
moveit_ros/planning/plan_execution/include/moveit/plan_execution/plan_representation.h
Outdated
Show resolved
Hide resolved
|
Replacing the From my end, this now works as intended. I'd rather not dive back into plan_execution.cpp: I don't think I understand the stack well enough to make changes without breaking things. I also get the impression it only locks the planning scene monitor briefly anyway. |
rhaschke
left a comment
There was a problem hiding this comment.
LGTM. I reverted the change of visibility for SingleUnlock.
|
@v4hn could you re-review this when you get a moment? |
v4hn
left a comment
There was a problem hiding this comment.
thanks for the polite ping. 🥇
This patch looks good and adds a use-case that was never considered before.
I commented with some nits, mainly about reducing future confusion.
Could you please rebase the branch, and optionally address the comments?
Assuming CI still passes then, I approve.
moveit_planners/pilz_industrial_motion_planner/src/move_group_sequence_service.cpp
Outdated
Show resolved
Hide resolved
moveit_planners/pilz_industrial_motion_planner/src/move_group_sequence_action.cpp
Outdated
Show resolved
Hide resolved
moveit_ros/manipulation/move_group_pick_place_capability/src/pick_place_action_capability.cpp
Show resolved
Hide resolved
moveit_ros/move_group/src/default_capabilities/move_action_capability.cpp
Outdated
Show resolved
Hide resolved
moveit_ros/planning/plan_execution/include/moveit/plan_execution/plan_representation.h
Show resolved
Hide resolved
moveit_ros/planning/planning_scene_monitor/src/planning_scene_monitor.cpp
Outdated
Show resolved
Hide resolved
Co-authored-by: Robert Haschke <rhaschke@users.noreply.github.com>
…f copying/locking the planning scene monitor as needed.
…g scene from ExecutableMotionPlan.
…rently to the others, and I don't think I've understood it enough to change it.
…on/plan_representation.h Co-authored-by: Michael Görner <me@v4hn.de>
…monitor.cpp Co-authored-by: Michael Görner <me@v4hn.de>
384e308 to
c5f040e
Compare
Description
PlanningSceneMonitor::copyPlanningSceneandExecutableMotionPlan::copyPlanningScenewhich return a copy of the planning scene.LockedPlanningSceneROwithcopyPlanningScene, to avoid locking the planning scene monitor during long operations.Checklist