A PTP Trajectory Generator of Asymmetric Trapezoidal Velocity Profile. Differences to VelocityProfile_Trap: More...
#include <velocity_profile_atrap.h>
Public Member Functions | |
virtual double | Acc (double time) const override |
Get given acceleration/deceleration at given time. More... | |
virtual KDL::VelocityProfile * | Clone () const override |
returns copy of current VelocityProfile object More... | |
virtual double | Duration () const override |
Duration. More... | |
double | FirstPhaseDuration () const |
get the time of first phase More... | |
bool | operator== (const VelocityProfile_ATrap &other) const |
Compares two Asymmetric Trapezoidal Velocity Profiles. More... | |
virtual double | Pos (double time) const override |
Get position at given time. More... | |
double | SecondPhaseDuration () const |
get the time of second phase More... | |
virtual void | SetProfile (double pos1, double pos2) override |
compute the fastest profile Algorithm: More... | |
bool | setProfileAllDurations (double pos1, double pos2, double duration1, double duration2, double duration3) |
Profile with given acceleration/constant/deceleration durations. Each duration must obey the maximal velocity/acceleration/deceleration constraints. Otherwise the operation will be ignored. Algorithm: More... | |
virtual void | SetProfileDuration (double pos1, double pos2, double duration) override |
Profile scaled by the total duration. More... | |
bool | setProfileStartVelocity (double pos1, double pos2, double vel1) |
Profile with start velocity Note: This function is not general and is currently only used for live control (vel1*(pos2-pos1)>0). More... | |
double | ThirdPhaseDuration () const |
get the time of third phase More... | |
virtual double | Vel (double time) const override |
Get velocity at given time. More... | |
VelocityProfile_ATrap (double max_vel=0, double max_acc=0, double max_dec=0) | |
Constructor. More... | |
virtual void | Write (std::ostream &os) const override |
Write basic information. More... | |
virtual | ~VelocityProfile_ATrap () |
Public Member Functions inherited from KDL::VelocityProfile | |
virtual | ~VelocityProfile () |
Private Member Functions | |
void | setEmptyProfile () |
helper functions More... | |
Private Attributes | |
double | a1_ |
three phases of trapezoid More... | |
double | a2_ |
double | a3_ |
double | b1_ |
coef. from ^0 -> ^2 of first phase More... | |
double | b2_ |
double | b3_ |
double | c1_ |
of second phase More... | |
double | c2_ |
double | c3_ |
double | end_pos_ |
const double | max_acc_ |
const double | max_dec_ |
const double | max_vel_ |
specification of the motion profile : More... | |
double | start_pos_ |
double | start_vel_ |
for initial velocity More... | |
double | t_a_ |
of third phase More... | |
double | t_b_ |
the duration of first phase More... | |
double | t_c_ |
the duration of second phase More... | |
Friends | |
std::ostream & | operator<< (std::ostream &os, const VelocityProfile_ATrap &p) |
Additional Inherited Members | |
Static Public Member Functions inherited from KDL::VelocityProfile | |
static VelocityProfile * | Read (std::istream &is) |
A PTP Trajectory Generator of Asymmetric Trapezoidal Velocity Profile. Differences to VelocityProfile_Trap:
Definition at line 34 of file velocity_profile_atrap.h.
pilz::VelocityProfile_ATrap::VelocityProfile_ATrap | ( | double | max_vel = 0 , |
double | max_acc = 0 , |
||
double | max_dec = 0 |
||
) |
Constructor.
max_vel | maximal velocity (absolute value, always positive) |
max_acc | maximal acceleration (absolute value, always positive) |
max_dec | maximal deceleration (absolute value, always positive) |
Definition at line 22 of file velocity_profile_atrap.cpp.
|
virtual |
Definition at line 416 of file velocity_profile_atrap.cpp.
|
overridevirtual |
Get given acceleration/deceleration at given time.
time |
Implements KDL::VelocityProfile.
Definition at line 333 of file velocity_profile_atrap.cpp.
|
overridevirtual |
returns copy of current VelocityProfile object
Implements KDL::VelocityProfile.
Definition at line 356 of file velocity_profile_atrap.cpp.
|
overridevirtual |
Duration.
Implements KDL::VelocityProfile.
Definition at line 282 of file velocity_profile_atrap.cpp.
|
inline |
bool pilz::VelocityProfile_ATrap::operator== | ( | const VelocityProfile_ATrap & | other | ) | const |
Compares two Asymmetric Trapezoidal Velocity Profiles.
Definition at line 394 of file velocity_profile_atrap.cpp.
|
overridevirtual |
Get position at given time.
time |
Implements KDL::VelocityProfile.
Definition at line 287 of file velocity_profile_atrap.cpp.
|
inline |
|
private |
helper functions
Definition at line 421 of file velocity_profile_atrap.cpp.
|
overridevirtual |
compute the fastest profile Algorithm:
pos1 | start position |
pos2 | goal position |
Implements KDL::VelocityProfile.
Definition at line 32 of file velocity_profile_atrap.cpp.
bool pilz::VelocityProfile_ATrap::setProfileAllDurations | ( | double | pos1, |
double | pos2, | ||
double | duration1, | ||
double | duration2, | ||
double | duration3 | ||
) |
Profile with given acceleration/constant/deceleration durations. Each duration must obey the maximal velocity/acceleration/deceleration constraints. Otherwise the operation will be ignored. Algorithm:
pos1 | start position |
pos2 | goal position |
acc_duration | time of acceleration phase |
const_duration | time of constant phase |
dec_duration | time of deceleration phase |
Definition at line 125 of file velocity_profile_atrap.cpp.
|
overridevirtual |
Profile scaled by the total duration.
pos1 | start position |
pos2 | goal position |
duration | trajectory duration (must be longer than fastest case, otherwise will be ignored) |
Implements KDL::VelocityProfile.
Definition at line 102 of file velocity_profile_atrap.cpp.
bool pilz::VelocityProfile_ATrap::setProfileStartVelocity | ( | double | pos1, |
double | pos2, | ||
double | vel1 | ||
) |
Profile with start velocity Note: This function is not general and is currently only used for live control (vel1*(pos2-pos1)>0).
pos1 | start position |
pos2 | goal position |
vel1 | start velocity |
Definition at line 181 of file velocity_profile_atrap.cpp.
|
inline |
|
overridevirtual |
Get velocity at given time.
time |
Implements KDL::VelocityProfile.
Definition at line 310 of file velocity_profile_atrap.cpp.
|
overridevirtual |
Write basic information.
os |
Implements KDL::VelocityProfile.
Definition at line 364 of file velocity_profile_atrap.cpp.
|
friend |
Definition at line 369 of file velocity_profile_atrap.cpp.
|
private |
three phases of trapezoid
Definition at line 176 of file velocity_profile_atrap.h.
|
private |
Definition at line 176 of file velocity_profile_atrap.h.
|
private |
Definition at line 176 of file velocity_profile_atrap.h.
|
private |
coef. from ^0 -> ^2 of first phase
Definition at line 177 of file velocity_profile_atrap.h.
|
private |
Definition at line 177 of file velocity_profile_atrap.h.
|
private |
Definition at line 177 of file velocity_profile_atrap.h.
|
private |
of second phase
Definition at line 178 of file velocity_profile_atrap.h.
|
private |
Definition at line 178 of file velocity_profile_atrap.h.
|
private |
Definition at line 178 of file velocity_profile_atrap.h.
|
private |
Definition at line 170 of file velocity_profile_atrap.h.
|
private |
Definition at line 167 of file velocity_profile_atrap.h.
|
private |
Definition at line 168 of file velocity_profile_atrap.h.
|
private |
specification of the motion profile :
Definition at line 166 of file velocity_profile_atrap.h.
|
private |
Definition at line 169 of file velocity_profile_atrap.h.
|
private |
for initial velocity
Definition at line 173 of file velocity_profile_atrap.h.
|
private |
|
private |
the duration of first phase
Definition at line 182 of file velocity_profile_atrap.h.
|
private |
the duration of second phase
Definition at line 183 of file velocity_profile_atrap.h.