Repository navigation
invert waypoint velocities on reverse - #1335
Conversation
Otherwise the trajectories profile will be broken and robot controllers that respect velocities in specified trajectories, e.g. default PR2 and TIAGo, will generate highly oscillating profiles.
henningkayser
left a comment
There was a problem hiding this comment.
Nice that this is fixed!
It's not that critical but maybe we should document or create an issue that reverse() does not recompute acceleration/effort values.
jrgnicho
left a comment
There was a problem hiding this comment.
Thanks for the contribution
rhaschke
left a comment
There was a problem hiding this comment.
While inversing the velocities is fine, why don't you also inverse the accelerations?
They also change sign when reversing time.
Accelerations change sign twice on reversal because we reverse the trajectory and also the velocity. Here is a small test that reverses a valid trajectory. With the proposed patch this is the output on our fanuc configuration: Without the patch the velocity is not inverted for |
|
@v4hn While I was tempting to believe you on phone, from the figures I conclude that acceleration should change sign as well (and in your figure it actually does). |
The figure was generated for the normal and inverted trajectory with the proposed pull-request as-is. |
|
You (and your colleague) are right. Let's assume the trajectory is given as The term |
Yes, if we ever want to extend the representation to jerk, we will have to account for it here. Thanks for the reviews and thanks for spelling out the formalism @rhaschke 👍 |
Otherwise the trajectories profile will be broken and robot controllers that respect velocities in specified trajectories, e.g. default PR2 and TIAGo, will generate oscillating profiles.
Otherwise the trajectories profile will be broken and robot controllers that respect velocities in specified trajectories, e.g. default PR2 and TIAGo, will generate oscillating profiles.

This addresses a long-standing issue in the trajectory container.
Without this patch, the trajectory's time profile is broken after calling
reverse()and robot controllers that respect velocities in specified trajectories,
e.g. default PR2 and TIAGo, will generate execution trajectories with highly oscillating velocity-profile.
This should be cherry-picked to
melodic-develof course.