Right now it looks like the behavior of the trajectory generator is that it extrapolates the polynomial outside of the time range that you set it up with. So for example if time goes from 0 to 1 you could call it time = 2 and get some (potentially really crazy) extrapolated value.
Clamping the pos/vel/acc values to the t=0 and t=duration values would probably be better to avoid accidental commands being sent to robot. Maybe with a warning indicating that you're time is out of bounds?
Right now it looks like the behavior of the trajectory generator is that it extrapolates the polynomial outside of the time range that you set it up with. So for example if
time
goes from0
to1
you could call ittime = 2
and get some (potentially really crazy) extrapolated value.Clamping the pos/vel/acc values to the t=0 and t=duration values would probably be better to avoid accidental commands being sent to robot. Maybe with a warning indicating that you're time is out of bounds?