MRSL Motion Primitive Library
1.2
A motion primitive library for generating trajectory for mobile robots
|
#include <primitive.h>
Public Member Functions | |
Primitive () | |
Empty constructor. | |
Primitive (const Waypoint< Dim > &p, const VecDf &u, decimal_t t) | |
Construct from an initial state p and an input control u for a given duration t. More... | |
Primitive (const Waypoint< Dim > &p1, const Waypoint< Dim > &p2, decimal_t t) | |
Construct from an initial state p1 and a goal state p2 for a given duration t. | |
Primitive (const vec_E< Vec6f > &cs, decimal_t t, Control::Control control) | |
Construct from given coefficients and duration . More... | |
Waypoint< Dim > | evaluate (decimal_t t) const |
Return Waypoint at time . More... | |
decimal_t | t () const |
Return duration . | |
Control::Control | control () const |
Get the control indicator. | |
Primitive1D | pr (int k) const |
Get the 1D primitive. More... | |
Primitive1D | pr_yaw () const |
Get the yaw primitive. | |
decimal_t | max_vel (int k) const |
Return max velocity along one axis. More... | |
decimal_t | max_acc (int k) const |
Return max accleration along one axis. More... | |
decimal_t | max_jrk (int k) const |
Return max jerk along k-th dimension. | |
decimal_t | J (const Control::Control &control) const |
Return total efforts for the given duration. More... | |
decimal_t | Jyaw () const |
Return total yaw efforts for the given duration. | |
vec_E< Waypoint< Dim > > | sample (int N) const |
Sample N+1 Waypoints using uniformed time. | |
Public Attributes | |
decimal_t | t_ |
Duration. | |
Control::Control | control_ |
Control. | |
std::array< Primitive1D, Dim > | prs_ |
By default, primitive class contains Dim 1D primitive. | |
Primitive1D | pr_yaw_ |
Primitive for yaw. | |
Primitive class.
Contains 1D primitives corresponding to each axis individually.
|
inline |
Construct from an initial state p and an input control u for a given duration t.
if the dimension of u is greater than p, use the additional value for yaw control
|
inline |
Construct from given coefficients and duration .
Note: flag use_xxx
is not set in this constructor
|
inline |
Return total efforts for the given duration.
control | effort is defined as -th derivative of polynomial |
Return J is the summation of efforts in all three dimensions and
Return max accleration along one axis.
k | indicates the corresponding axis: 0-x, 1-y, 2-z |
Return max velocity along one axis.
k | indicates the corresponding axis: 0-x, 1-y, 2-z |
|
inline |
Get the 1D primitive.
k | indicates the corresponding axis: 0-x, 1-y, 2-z |