|
MRSL Motion Primitive Library
1.2
A motion primitive library for generating trajectory for mobile robots
|
Trajectory class. More...
#include <trajectory.h>
Public Member Functions | |
| Trajectory () | |
| Empty constructor. | |
| Trajectory (const vec_E< Primitive< Dim >> &prs) | |
| Construct from multiple primitives. | |
| Waypoint< Dim > | evaluate (decimal_t time) const |
Evaluate Waypoint at time . More... | |
| bool | evaluate (decimal_t time, Command< Dim > &p) const |
Evaluate Command at , return false if fails to evaluate. More... | |
| bool | scale (decimal_t ri, decimal_t rf) |
| Scale according to ratio at start and end (velocity only) | |
| bool | scale_down (decimal_t mv, decimal_t ri, decimal_t rf) |
| Scale down the whole trajectory according to mv. | |
| vec_E< Command< Dim > > | sample (int N) const |
| Sample N+1 Command along trajectory using uniformed time. | |
| decimal_t | J (const Control::Control &control) const |
Return total efforts of Primitive for the given duration: . More... | |
| decimal_t | Jyaw () const |
Return total yaw efforts for the given duration: . More... | |
| std::vector< decimal_t > | getSegmentTimes () const |
| Get time of each segment. | |
| vec_E< Waypoint< Dim > > | getWaypoints () const |
| Get intermediate Waypoint on the trajectory. | |
| vec_E< Primitive< Dim > > | getPrimitives () const |
| Get Primitive array. | |
| Lambda | lambda () const |
| Get the scaling factor Lambda. | |
| decimal_t | getTotalTime () const |
| Get the total duration of Trajectory. | |
Public Attributes | |
| vec_E< Primitive< Dim > > | segs |
| Segments of primitives. | |
| std::vector< decimal_t > | taus |
| Time in virtual domain. | |
| std::vector< decimal_t > | Ts |
| Time in actual domain. | |
| decimal_t | total_t_ |
| Total time of the trajectory. | |
| Lambda | lambda_ |
| Scaling object. | |
Trajectory class.
A trajectory is composed by multiple end-to-end connected primitives, so-called piece-wise polynomials
|
inline |
|
inline |
Evaluate Command at
, return false if fails to evaluate.
If
is out of scope, we set
to be the closer bound (0 or total_t_) and return the evaluation; The failure case is when lambda is ill-posed such that
has no solution.
|
inline |
Return total efforts of Primitive for the given duration:
.
| control | Flag that indicates the order of derivative ![]() |
Return J is the summation of efforts in all three dimensions. Control::VEL or Control::VELxYAW corresponds to
; Control::ACC or Control::ACCxYAW corresponds to
; Control::JRK or Control::JRKxYAW corresponds to
; Control::SNP or Control::SNPxYAW corresponds to
.
|
inline |
Return total yaw efforts for the given duration:
.
By default, the Jyaw is using Control::VEL to calculate.
1.8.13