moveit2 icon indicating copy to clipboard operation
moveit2 copied to clipboard

Fix Pilz blending times (backport #2961)

Open mergify[bot] opened this issue 1 year ago • 2 comments

Description

Found the issue!

Turns out that Pilz's appendWithStrictTimeIncrease() function had a single if-statement that encompassed two conditions:

  1. If trajectory is empty
  2. If the end state of one segment is not equal to the start state of the second segment

In both cases, the whole trajectory segment was appended with a dt=0.

The problem is that in case 1, it's appropriate to add a dt=0 (as the trajectory is empty, the first point should be at t=0). In case 2, we needed to apply a non-zero sample time offset dictated by the actual dt of that trajectory's first waypoint.

Closes https://github.com/moveit/moveit2/issues/2945

Checklist

  • [x] Required by CI: Code is auto formatted using clang-format
  • [x] Extend the tutorials / documentation reference
  • [x] Document API changes relevant to the user in the MIGRATION.md notes
  • [x] Create tests, which fail without this PR reference
  • [x] Include a screenshot if changing a GUI
  • [x] 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 #2961 done by [Mergify](https://mergify.com).

mergify[bot] avatar Sep 14 '24 13:09 mergify[bot]

Cherry-pick of 4fad0d0de6b2b5b17ecdca21923203d2b902369c has failed:

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

You are currently cherry-picking commit 4fad0d0de.
  (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_planners/pilz_industrial_motion_planner/src/plan_components_builder.cpp

Unmerged paths:
  (use "git add <file>..." to mark resolution)
	both modified:   moveit_planners/pilz_industrial_motion_planner/src/command_list_manager.cpp
	both modified:   moveit_planners/pilz_industrial_motion_planner/src/trajectory_blender_transition_window.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

mergify[bot] avatar Sep 14 '24 13:09 mergify[bot]

@henningkayser Iron CI seems to be not passing at the moment, could you help merge this backport? Thanks!

sea-bass avatar Sep 15 '24 13:09 sea-bass