Skip to content

Ports moveit #3676 and #3682 (backport #3283)#3317

Merged
sea-bass merged 2 commits intohumblefrom
mergify/bp/humble/pr-3283
Feb 6, 2025
Merged

Ports moveit #3676 and #3682 (backport #3283)#3317
sea-bass merged 2 commits intohumblefrom
mergify/bp/humble/pr-3283

Conversation

@mergify
Copy link
Copy Markdown

@mergify mergify bot commented Feb 6, 2025

Description

Checklist

  • Required by CI: Code is auto formatted using clang-format
  • Extend the tutorials / documentation reference
  • Document API changes relevant to the user in the MIGRATION.md notes
  • Create tests, which fail without this PR reference
  • Include a screenshot if changing a GUI
  • While waiting for someone to review your request, please help review another open pull request to support the maintainers

This is an automatic backport of pull request #3283 done by [Mergify](https://mergify.com).

* Use separate callback queue + spinner for ExecuteTrajectoryAction (#3676)

This allows parallel execution + planning.

Also required modifying updateSceneWithCurrentState() to allow skipping a scene update with a new robot state (from CurrentStateMonitor), if the planning scene is currently locked (due to planning).
Otherwise, the CurrentStateMonitor would block too.

Co-authored-by: Robert Haschke <rhaschke@techfak.uni-bielefeld.de>

* PSM: simplify state_update_pending_ (#3682)

* Move update of state_update_pending_ to updateSceneWithCurrentState()

* Revert to try_lock

While there are a few other locks except explicit user locks (getPlanningSceneServiceCallback(), collisionObjectCallback(), attachObjectCallback(), newPlanningSceneCallback(), and scenePublishingThread()), these occur rather seldom
(scenePublishingThread() publishes at 2Hz).

Hence, we might indeed balance a non-blocking CSM vs. missed PS updates in favour of CSM.

* Don't block for scene update from stateUpdateTimerCallback too

The timer callback and CSM's state update callbacks are served from the same callback queue, which would block CSM again.

* further locking adaptations

reading dt_state_update_ and last_robot_state_update_wall_time_
does not lead to logic errors, but at most to a skipped or redundant update on corrupted data.
Alternatively we could be on the safe side and turn both variables into std::atomic, but that
would effectively mean locks on every read.

Instead, only set state_update_pending_ as an atomic, which is lockfree in this case.

Co-authored-by: Michael Görner <me@v4hn.de>

* Ports changes to ROS2.

---------

Co-authored-by: Robert Haschke <rhaschke@techfak.uni-bielefeld.de>
Co-authored-by: Robert Haschke <rhaschke@users.noreply.github.com>
Co-authored-by: Michael Görner <me@v4hn.de>
Co-authored-by: Sebastian Castro <4603398+sea-bass@users.noreply.github.com>
Co-authored-by: Sebastian Jahr <sebastian.jahr@picknik.ai>
(cherry picked from commit ba35aaa)

# Conflicts:
#	moveit_ros/move_group/src/default_capabilities/execute_trajectory_action_capability.cpp
#	moveit_ros/planning/planning_scene_monitor/include/moveit/planning_scene_monitor/planning_scene_monitor.hpp
#	moveit_ros/planning/planning_scene_monitor/src/planning_scene_monitor.cpp
@mergify mergify bot added the conflicts label Feb 6, 2025
@mergify
Copy link
Copy Markdown
Author

mergify bot commented Feb 6, 2025

Cherry-pick of ba35aaa has failed:

On branch mergify/bp/humble/pr-3283
Your branch is up to date with 'origin/humble'.

You are currently cherry-picking commit ba35aaa58.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Changes to be committed:
	modified:   moveit_ros/move_group/src/default_capabilities/execute_trajectory_action_capability.h

Unmerged paths:
  (use "git add/rm <file>..." as appropriate to mark resolution)
	both modified:   moveit_ros/move_group/src/default_capabilities/execute_trajectory_action_capability.cpp
	deleted by us:   moveit_ros/planning/planning_scene_monitor/include/moveit/planning_scene_monitor/planning_scene_monitor.hpp
	both modified:   moveit_ros/planning/planning_scene_monitor/src/planning_scene_monitor.cpp

To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally

@sea-bass
Copy link
Copy Markdown
Contributor

sea-bass commented Feb 6, 2025

@rr-mark could you take a look at the Humble conflicts for this one? Thanks!

@riv-mjohnson
Copy link
Copy Markdown
Contributor

#3322

* Resolves merge conflicts.

* Undoes erroneous auto-format.

* Undoes erroneous auto-format.
@sea-bass sea-bass removed the conflicts label Feb 6, 2025
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Feb 6, 2025

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

Attention: Patch coverage is 87.50000% with 3 lines in your changes missing coverage. Please review.

Project coverage is 51.37%. Comparing base (77b646e) to head (edebe26).
Report is 1 commits behind head on humble.

Files with missing lines Patch % Lines
...nning_scene_monitor/src/planning_scene_monitor.cpp 87.50% 3 Missing ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##           humble    #3317      +/-   ##
==========================================
- Coverage   51.39%   51.37%   -0.02%     
==========================================
  Files         382      382              
  Lines       31896    31874      -22     
==========================================
- Hits        16391    16372      -19     
+ Misses      15505    15502       -3     

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

@sea-bass sea-bass merged commit c3cd237 into humble Feb 6, 2025
7 checks passed
@sea-bass sea-bass deleted the mergify/bp/humble/pr-3283 branch February 6, 2025 12:39
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.

3 participants