A PTP Trajectory Generator of Asymmetric Trapezoidal Velocity Profile. Differences to VelocityProfile_Trap:
More...
#include <velocity_profile_atrap.h>
|
| | VelocityProfileATrap (double max_vel=0, double max_acc=0, double max_dec=0) |
| | Constructor. More...
|
| |
| void | SetProfile (double pos1, double pos2) override |
| | compute the fastest profile Algorithm: More...
|
| |
| void | SetProfileDuration (double pos1, double pos2, double duration) override |
| | Profile scaled by the total duration. 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...
|
| |
| 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 | firstPhaseDuration () const |
| | get the time of first phase More...
|
| |
| double | secondPhaseDuration () const |
| | get the time of second phase More...
|
| |
| double | thirdPhaseDuration () const |
| | get the time of third phase More...
|
| |
| bool | operator== (const VelocityProfileATrap &other) const |
| | Compares two Asymmetric Trapezoidal Velocity Profiles. More...
|
| |
| double | Duration () const override |
| | Duration. More...
|
| |
| double | Pos (double time) const override |
| | Get position at given time. More...
|
| |
| double | Vel (double time) const override |
| | Get velocity at given time. More...
|
| |
| double | Acc (double time) const override |
| | Get given acceleration/deceleration at given time. More...
|
| |
| void | Write (std::ostream &os) const override |
| | Write basic information. More...
|
| |
| KDL::VelocityProfile * | Clone () const override |
| | returns copy of current VelocityProfile object More...
|
| |
| | ~VelocityProfileATrap () override |
| |
A PTP Trajectory Generator of Asymmetric Trapezoidal Velocity Profile. Differences to VelocityProfile_Trap:
- Maximal acceleration and deceleration can be different, resulting an asymmetric trapezoid shaped velocity profile.
- Function to generate full synchronized PTP trajectory is provided.
- Function to generate trapezoid shaped velocity profile with start velocity.
Definition at line 51 of file velocity_profile_atrap.h.
◆ VelocityProfileATrap()
| pilz_industrial_motion_planner::VelocityProfileATrap::VelocityProfileATrap |
( |
double |
max_vel = 0, |
|
|
double |
max_acc = 0, |
|
|
double |
max_dec = 0 |
|
) |
| |
Constructor.
- Parameters
-
| 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 39 of file velocity_profile_atrap.cpp.
◆ ~VelocityProfileATrap()
| pilz_industrial_motion_planner::VelocityProfileATrap::~VelocityProfileATrap |
( |
| ) |
|
|
override |
◆ Acc()
| double pilz_industrial_motion_planner::VelocityProfileATrap::Acc |
( |
double |
time | ) |
const |
|
override |
◆ Clone()
| KDL::VelocityProfile * pilz_industrial_motion_planner::VelocityProfileATrap::Clone |
( |
| ) |
const |
|
override |
◆ Duration()
| double pilz_industrial_motion_planner::VelocityProfileATrap::Duration |
( |
| ) |
const |
|
override |
◆ firstPhaseDuration()
| double pilz_industrial_motion_planner::VelocityProfileATrap::firstPhaseDuration |
( |
| ) |
const |
|
inline |
◆ operator==()
| bool pilz_industrial_motion_planner::VelocityProfileATrap::operator== |
( |
const VelocityProfileATrap & |
other | ) |
const |
Compares two Asymmetric Trapezoidal Velocity Profiles.
- Returns
- True if equal, false otherwise.
Definition at line 422 of file velocity_profile_atrap.cpp.
◆ Pos()
| double pilz_industrial_motion_planner::VelocityProfileATrap::Pos |
( |
double |
time | ) |
const |
|
override |
◆ secondPhaseDuration()
| double pilz_industrial_motion_planner::VelocityProfileATrap::secondPhaseDuration |
( |
| ) |
const |
|
inline |
◆ SetProfile()
| void pilz_industrial_motion_planner::VelocityProfileATrap::SetProfile |
( |
double |
pos1, |
|
|
double |
pos2 |
|
) |
| |
|
override |
compute the fastest profile Algorithm:
- compute the minimal distance which is needed to reach maximal velocity
- if maximal velocity can be reached
- compute the coefficients of the trajectory
- if maximal velocity can not be reached
- compute the new velocity can be reached
- compute the coefficients based on this new velocity
- Parameters
-
| pos1 | start position |
| pos2 | goal position |
Definition at line 61 of file velocity_profile_atrap.cpp.
◆ setProfileAllDurations()
| bool pilz_industrial_motion_planner::VelocityProfileATrap::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:
- compute the maximal velocity of given durations
- compute the acceleration and deceleration of given duraitons
- if limits are fulfilled
- compute the coefficients
- Parameters
-
| pos1 | start position |
| pos2 | goal position |
| acc_duration | time of acceleration phase |
| const_duration | time of constant phase |
| dec_duration | time of deceleration phase |
- Returns
- true if the combination of three durations is valid
Definition at line 152 of file velocity_profile_atrap.cpp.
◆ SetProfileDuration()
| void pilz_industrial_motion_planner::VelocityProfileATrap::SetProfileDuration |
( |
double |
pos1, |
|
|
double |
pos2, |
|
|
double |
duration |
|
) |
| |
|
override |
Profile scaled by the total duration.
- Parameters
-
| pos1 | start position |
| pos2 | goal position |
| duration | trajectory duration (must be longer than fastest case, otherwise will be ignored) |
Definition at line 129 of file velocity_profile_atrap.cpp.
◆ setProfileStartVelocity()
| bool pilz_industrial_motion_planner::VelocityProfileATrap::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).
- Parameters
-
| pos1 | start position |
| pos2 | goal position |
| vel1 | start velocity |
- Returns
Definition at line 207 of file velocity_profile_atrap.cpp.
◆ thirdPhaseDuration()
| double pilz_industrial_motion_planner::VelocityProfileATrap::thirdPhaseDuration |
( |
| ) |
const |
|
inline |
◆ Vel()
| double pilz_industrial_motion_planner::VelocityProfileATrap::Vel |
( |
double |
time | ) |
const |
|
override |
◆ Write()
| void pilz_industrial_motion_planner::VelocityProfileATrap::Write |
( |
std::ostream & |
os | ) |
const |
|
override |
◆ operator<<
The documentation for this class was generated from the following files: