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

Trajectory player fixes #989

Merged
merged 4 commits into from
Feb 21, 2024

Conversation

rjoomen
Copy link
Contributor

@rjoomen rjoomen commented Feb 20, 2024

  • Fix trajectory player for trajectories that do not start from time=0, e.g. when in a trajectory set
  • Fix trajectory interpolator for size=1 trajectories

This is related to tesseract-robotics/tesseract_qt#99.

…0, e.g. when in a trajectory set

- Fix trajectory interpolator for size=1 trajectories
Copy link

codecov bot commented Feb 20, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (26f3e47) 90.91% compared to head (3b7a2e9) 90.91%.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #989   +/-   ##
=======================================
  Coverage   90.91%   90.91%           
=======================================
  Files         280      280           
  Lines       15877    15877           
=======================================
  Hits        14435    14435           
  Misses       1442     1442           

@marrts
Copy link
Contributor

marrts commented Feb 20, 2024

This is working for me and is definitely a nice addition, just have a couple of notes:

  1. I'm confused as to what you are accomplishing with the "Fix trajectory interpolator for size=1 trajectories" I see you added a check for size being 1, but I don't know what the behavior change is.
  2. It looks like this will also require a PR on tesseract_planning as one of the examples points to trajectoryDuration() method

@rjoomen
Copy link
Contributor Author

rjoomen commented Feb 20, 2024

  1. When a trajectory has only one waypoint, the TrajectoryInterpolator would incorrectly set the initial state and total time to 0, leading to the trajectory slider in the workbench showing only zeros. With this fix, if for example a trajectory set has one trajectory with 10 points with times [0...10] and a second set with only one point with time=11 the slider will correctly show 11 for the second set (and 0-10 for the first). Obviously there is nothing to slide, but at least the numbers shown are correct. Trajectories of size one are not very useful, of course, but sometimes my planner receives this as input, as only the start is reachable (IK), but not the goal.
  2. See Update OnlinePlanningExample to updated TrajectoryPlayer tesseract_planning#441

- Fixed a bug in the trajectory interpolator
- Renamed parameter t to f in the interpolator, as this is a fraction (blend), not time, to prevent confusion
@Levi-Armstrong Levi-Armstrong merged commit 7a971fb into tesseract-robotics:master Feb 21, 2024
11 of 13 checks passed
rjoomen added a commit to rjoomen/tesseract_planning that referenced this pull request Feb 22, 2024
Levi-Armstrong pushed a commit to tesseract-robotics/tesseract_planning that referenced this pull request Feb 22, 2024
@rjoomen rjoomen deleted the trajectoryfix branch February 23, 2024 05:54
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