pantor / ruckig

Motion Generation for Robots and Machines. Real-time. Jerk-constrained. Time-optimal.
https://ruckig.com
MIT License
634 stars 155 forks source link

allow user to force new computation for the same input #132

Closed v4hn closed 2 years ago

v4hn commented 2 years ago

Otherwise sending the same target with non-zero min_duration multiple times in a control loop will not trigger a new trajectory. Instead it claims that it already achieved the target.

An alternative way to address the problem is to add a flag to InputParameter that can force a fresh computation in the next update.

I'm not particularly in love with the proposed solution, so if you have better ideas I would like to hear them. :)

pantor commented 2 years ago

Hey @v4hn!

Am I understanding this correctly, that the trajectory doesn't get re-calculated although you changed the minimum duration of the input parameters?

v4hn commented 2 years ago

No, I did not change anything. I just want to compute for the very same goal at the very same position again and give the same minimum duration as in the last target request again. Basically I wanted to get some nice repetitive plots and evaluate execution for whether targets can be reached that way. But even if I set the Input parameters again (call operator= for position, velocity and minimum duration) it does not trigger a new spline with the correct minimum duration) if the three parameters are exactly the same.

pantor commented 2 years ago

Btw, I've renamed it to reset. Thanks for your input!