Skip to content

fix: ensure attached objects update during motion execution (backport #3327)#3414

Merged
sea-bass merged 1 commit intojazzyfrom
mergify/bp/jazzy/pr-3327
Apr 4, 2025
Merged

fix: ensure attached objects update during motion execution (backport #3327)#3414
sea-bass merged 1 commit intojazzyfrom
mergify/bp/jazzy/pr-3327

Conversation

@mergify
Copy link
Copy Markdown

@mergify mergify bot commented Apr 3, 2025

Description

  • Check that attached objects in the monitored robot match those in the planned trajectory.
  • If an object disappears from the monitored robot, remove it from the trajectory way-point robot_state. (avoid false positives, stop trajectories due to collisions between environment and objects that are not attached to the robot anymore)
  • If an object is attached to the monitored robot but missing in the trajectory, add it to enable meaningful collision checking. (avoids disruptive condition in which even if the object has been added to the robot as attached collision object it is not considered for online collision checking)

Implications

This could impact a few different situations:

  • Imagine you’re catching an object during motion, and an external node tells the planning scene to add the new attached collision object. Even though MoveIt knows about the new attached object, the collision check still only considers the attached objects that were there at the planning stage, so it misses the new one. This could lead to a situation where a collision is missed because the newly attached object isn’t part of the check.
  • Similarly, dropping an object during motion may result in preempting a valid path due to a non existsent collision.
    This is an automatic backport of pull request fix: ensure attached objects update during motion execution #3327 done by Mergify.

@codecov
Copy link
Copy Markdown

codecov bot commented Apr 3, 2025

Codecov Report

Attention: Patch coverage is 0% with 42 lines in your changes missing coverage. Please review.

Project coverage is 45.81%. Comparing base (db4944f) to head (2f264c6).
Report is 1 commits behind head on jazzy.

Files with missing lines Patch % Lines
...ros/planning/plan_execution/src/plan_execution.cpp 0.00% 37 Missing ⚠️
moveit_core/robot_state/src/robot_state.cpp 0.00% 5 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##            jazzy    #3414      +/-   ##
==========================================
- Coverage   45.83%   45.81%   -0.02%     
==========================================
  Files         717      717              
  Lines       62580    62616      +36     
  Branches     7570     7580      +10     
==========================================
+ Hits        28676    28679       +3     
- Misses      33739    33771      +32     
- Partials      165      166       +1     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@sea-bass sea-bass merged commit 63e7bfa into jazzy Apr 4, 2025
8 checks passed
@sea-bass sea-bass deleted the mergify/bp/jazzy/pr-3327 branch April 4, 2025 17:56
@github-project-automation github-project-automation bot moved this to ✅ Done in MoveIt Apr 4, 2025
if (trajectory)
{
std::map<std::string, const moveit::core::AttachedBody*> attached_objects;
trajectory->getWayPoint(0).getAttachedBodies(trajectory_attached_objects);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This crashes with a segfault if trajectory is empty!
moveit/moveit_task_constructor#692

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