|
Resurgence (PY2022)
Codebase for the Husky Robotics 2021-2022 rover Resurgence
|
Trapezoidal velocity profile in multiple dimensions. More...
#include <TrapezoidalVelocityProfile.h>
Public Member Functions | |
| TrapezoidalVelocityProfile (double maxVel, double maxAccel) | |
| Construct a new velocity profile object. | |
| void | reset () |
| Reset the profile and clear any calculated profile. | |
| bool | hasTarget () const |
| Check if a profile has been calculated. | |
| void | setTarget (robot::types::datatime_t currTime, const std::array< double, dim > &startPos, const std::array< double, dim > &endPos) |
| Calculate a profile, assuming the mechanism begins and ends at rest. | |
| void | setTarget (robot::types::datatime_t currTime, const navtypes::Vectord< dim > &startPos, const navtypes::Vectord< dim > &endPos) |
| Calculate a profile, assuming the mechanism begins and ends at rest. | |
| navtypes::Vectord< dim > | getCommand (robot::types::datatime_t currTime) const |
| Get the target position. | |
| std::optional< util::dseconds > | getTotalTime () const |
| Get the total time it takes to perform the profile. | |
Trapezoidal velocity profile in multiple dimensions.
Motion is coordinated so that all dimensions arrive at the goal at the same time.
| dim | The number of dimensions that are controlled by this profile. |
|
inline |
Construct a new velocity profile object.
| maxVel | The maximum velocity the profile should attain. |
| maxAccel | The maximum acceleration the profile should use. |
|
inline |
Get the target position.
| currTime | The current timestamp. |
|
inline |
Get the total time it takes to perform the profile.
|
inline |
Check if a profile has been calculated.
|
inline |
Calculate a profile, assuming the mechanism begins and ends at rest.
| currTime | The current timestamp. |
| startPos | The position the profile starts at. |
| endPos | The position the profile ends at. |
|
inline |
Calculate a profile, assuming the mechanism begins and ends at rest.
| currTime | The current timestamp. |
| startPos | The position the profile starts at. |
| endPos | The position the profile ends at. |