Closed mdhom closed 3 years ago
Yes, that should be good. Just as you've written, you need to call update
after changing the input values, and then you can use the trajectory duration and the at_time
method of the output parameters. Note that in Python the at_time
method returns the new kinematic state as a tuple instead of using references like the C++ version.
ok perfect, thanks. just another question: the duration of the trajectory i get after calling update on the fly, is it the new total duration (including all the time passed since the first call)?
Yes, it is the total duration from current to target state as in the input parameters.
ok great, thanks. if you're ok, i'd like to provide an extra python example with this behaviour the next days?
Sure, just open a PR for that.
Hey, i want to use your library in a non-realtime environment, so i need to get the status of the trajectory at points with flexible distance in time to each other. I am not sure how to use your (python-)library here. I could imagine that using the
Trajectory.at_time
i could accomplish this, but then i am not sure how to implement changes intarget_position
,target_velocity
on the fly. My thoughts would generate something like that:update
on Ruckig instance once with the target values of the beginningat_time
as long as target values haven't changedupdate
onceCould you give me a little hint how to setup this best? Thanks!