Fill point_before_trajectory with same information as trajectory #2043
+67
−0
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.

When executing a trajectory with a start time in the future, the trajectory interpolation will create a setpoint at the robot's current configuration based on the state interface information.
However, when the state interface for example doesn't have acceleration information, but the trajectory does contain position, velocity and acceleration, the segment from the current state to the first trajectory point will not use quintic spline interpolation, though the rest of the trajectory will.
This commit fills the current state with velocity and acceleration information if it is not given in the state interfaces but it is defined in the trajectory's first point.
This fixes #2015
Velocity profile with first point in the future / at other position without this PR applied:

Velocity profile with first point in the future / at other position with this PR applied:

I know that this is strictly speaking behavior changing, but I would nevertheless consider this a bugfix. This could, of course get an opt-in parameter on released versions to avoid the behavior change if desired.