Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix trajectory display. #2828

Open
wants to merge 5 commits into
base: humble
Choose a base branch
from
Open

Conversation

kpwelsh
Copy link

@kpwelsh kpwelsh commented May 13, 2024

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

  • 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

kpwelsh and others added 4 commits May 13, 2024 17:37
Handle change from s to ns in clock time.
Display the last trajectory position for a fixed time before looping back around.
Copy link
Member

@henningkayser henningkayser left a comment

Choose a reason for hiding this comment

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

Thank you! Can you retarget this change to 'main'? That is what we use as development head. We can backport any bugfixes to humble or other stable branches.

@sjahr sjahr changed the base branch from humble to main June 18, 2024 15:18
@sjahr sjahr changed the base branch from main to humble June 18, 2024 15:18
Copy link

github-actions bot commented Aug 5, 2024

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 github-actions bot added the stale Inactive issues and PRs are marked as stale and may be closed automatically. label Aug 5, 2024
@github-actions github-actions bot removed the stale Inactive issues and PRs are marked as stale and may be closed automatically. label Aug 9, 2024
Copy link

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 github-actions bot added the stale Inactive issues and PRs are marked as stale and may be closed automatically. label Sep 27, 2024
Copy link

mergify bot commented Sep 27, 2024

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.

@github-actions github-actions bot removed the stale Inactive issues and PRs are marked as stale and may be closed automatically. label Oct 8, 2024
Copy link

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 github-actions bot added the stale Inactive issues and PRs are marked as stale and may be closed automatically. label Nov 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale Inactive issues and PRs are marked as stale and may be closed automatically.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants