- 3.0.2 rigid body dynamics module.
|
#include <SingleDOFTrajectoryGenerator.h>
Public Member Functions | |
SingleDOFTrajectoryGenerator () | |
SingleDOFTrajectoryGenerator (const SCALAR x0, const SCALAR xT, SCALAR abs_v_max, SCALAR abs_a_max) | |
SCALAR | setup (const SCALAR x0, const SCALAR xT, SCALAR abs_v_max, SCALAR abs_a_max) |
void | queryTrajectory (const SCALAR time, SCALAR &x_new, SCALAR &v_new) |
Protected Types | |
enum | MODE { ACCELERATE_AND_DECELERATE = 0, ACCELERATE_HOLD_DECELERATE = 1 } |
Generate a simple trajectory for a single degree of freedom
This class comprises two different modes:
1) If the position distance to be bridged is too small to reach the maximum velocity through constant acceleration/deceleration, it simply constantly accelerates until the middle of the path and constantly decelerates after it.
2) Otherwise, it accelerates to the maximum velocity and then stays at that desired velocity. It starts decelerating just in time to reach zero velocity at the target point.
|
protected |
|
inline |
|
inline |
|
inline |
x0 | starting value for x |
xT | end value for x |
abs_v_max | maximal absolute velocity for the trajectory |
abs_a_max | maximal absolute acceleration for the trajectory |
References ct::rbd::tpl::SingleDOFTrajectoryGenerator< SCALAR >::ACCELERATE_AND_DECELERATE, and ct::rbd::tpl::SingleDOFTrajectoryGenerator< SCALAR >::ACCELERATE_HOLD_DECELERATE.
Referenced by ct::rbd::tpl::SingleDOFTrajectoryGenerator< SCALAR >::SingleDOFTrajectoryGenerator().
|
inline |
time | the trajectory query time |
x_new | returns the evaluated value for position |
v_new | returns the evaluated value for velocity |
References ct::rbd::tpl::SingleDOFTrajectoryGenerator< SCALAR >::ACCELERATE_AND_DECELERATE, and ct::rbd::tpl::SingleDOFTrajectoryGenerator< SCALAR >::ACCELERATE_HOLD_DECELERATE.