tesseract-robotics / tesseract

Motion Planning Environment
http://tesseract-docs.rtfd.io
Other
257 stars 89 forks source link

Trajectory player fixes #989

Closed rjoomen closed 6 months ago

rjoomen commented 6 months ago

This is related to https://github.com/tesseract-robotics/tesseract_qt/pull/99.

codecov[bot] commented 6 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

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

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/tesseract-robotics/tesseract/pull/989/graphs/tree.svg?width=650&height=150&src=pr&token=nh4aHZzgpR&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=tesseract-robotics)](https://app.codecov.io/gh/tesseract-robotics/tesseract/pull/989?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=tesseract-robotics) ```diff @@ Coverage Diff @@ ## master #989 +/- ## ======================================= Coverage 90.91% 90.91% ======================================= Files 280 280 Lines 15877 15877 ======================================= Hits 14435 14435 Misses 1442 1442 ```
marrts commented 6 months ago

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 commented 6 months ago

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 https://github.com/tesseract-robotics/tesseract_planning/pull/441