moveit2 icon indicating copy to clipboard operation
moveit2 copied to clipboard

Fix trajectory display.

Open kpwelsh opened this issue 1 year ago • 6 comments

Description

The RViz plugin for displaying planned trajectories handles elapsed time incorrectly. Probably sometime in the last few years the dt passed to Update was switched from "s" to "ns," and this plugin wasn't updated.

Also, the plugin doesn't show the last pose in the trajectory. When we are on the last pose in the trajectory, we call displaying_trajectory_message_->getWayPointDurationFromPrevious(current_state_ + 1); to determine how long to display the pose for. This returns 0 and we accordingly display it for 0s.

Instead, I chose to put in a constant 1s display time (scaled by the user's trajectory playback rate) at the end of each trajectory so it will pause at the end briefly before looping back to the start, or disappearing.

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
  • [ ] Create tests, which fail without this PR reference
  • [x] 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

kpwelsh avatar May 13 '24 21:05 kpwelsh

This PR is stale because it has been open for 45 days with no activity. Please tag a maintainer for help on completing this PR, or close it if you think it has become obsolete.

github-actions[bot] avatar Aug 05 '24 12:08 github-actions[bot]

This PR is stale because it has been open for 45 days with no activity. Please tag a maintainer for help on completing this PR, or close it if you think it has become obsolete.

github-actions[bot] avatar Sep 27 '24 12:09 github-actions[bot]

Please target the main branch for development, we will backport the changes to humble for you if approved and if they don't break API.

mergify[bot] avatar Sep 27 '24 12:09 mergify[bot]

This PR is stale because it has been open for 45 days with no activity. Please tag a maintainer for help on completing this PR, or close it if you think it has become obsolete.

github-actions[bot] avatar Nov 22 '24 12:11 github-actions[bot]

This PR is stale because it has been open for 45 days with no activity. Please tag a maintainer for help on completing this PR, or close it if you think it has become obsolete.

github-actions[bot] avatar Apr 04 '25 12:04 github-actions[bot]

This PR is stale because it has been open for 45 days with no activity. Please tag a maintainer for help on completing this PR, or close it if you think it has become obsolete.

github-actions[bot] avatar Jun 18 '25 12:06 github-actions[bot]

https://github.com/moveit/moveit2/pull/3567 is relevant to this PR (I raised https://github.com/ros2/rviz/pull/1533 to make the time be in std::chrono::nanoseconds, and https://github.com/moveit/moveit2/pull/3567 updates MoveIt to take advantage of those changes)

riv-mjohnson avatar Sep 22 '25 17:09 riv-mjohnson