MRSL Motion Primitive Library
1.2
A motion primitive library for generating trajectory for mobile robots
|
Trajectory generator. More...
#include <traj_solver.h>
Public Member Functions | |
TrajSolver (Control::Control control, Control::Control yaw_control=Control::VEL, bool debug=false) | |
Constructor. More... | |
void | setWaypoints (const vec_E< Waypoint< Dim >> &ws) |
Set Waypoint array directly, overwrite global vars. | |
void | setV (decimal_t v) |
Set velocity used for internal time allocation. | |
void | setDts (const std::vector< decimal_t > &dts) |
void | setPath (const vec_Vecf< Dim > &path) |
Trajectory< Dim > | solve (bool verbose=false) |
Solve for trajectory. | |
vec_Vecf< Dim > | getPath () const |
Get the path used for time allocation. | |
vec_E< Waypoint< Dim > > | getWaypoints () const |
Get the Waypoint array used to solve trajectory. | |
std::vector< decimal_t > | getDts () const |
Get the time allocation. | |
Private Member Functions | |
std::vector< decimal_t > | allocate_time (const vec_Vecf< Dim > &pts, decimal_t v) |
Internal time allocation from path and vel using L-inf. | |
Private Attributes | |
vec_Vecf< Dim > | path_ |
Intermediate pos. | |
vec_E< Waypoint< Dim > > | waypoints_ |
Intermediate waypoints. | |
std::vector< decimal_t > | dts_ |
Time allocation. | |
decimal_t | v_ {1} |
Velocity used for internal time allocation. | |
Control::Control | control_ |
Control constraints for start and goal. | |
Control::Control | yaw_control_ |
Control constraints for start and goal yaw. | |
std::unique_ptr< PolySolver< Dim > > | poly_solver_ |
Poly solver. | |
std::unique_ptr< PolySolver< 1 > > | yaw_solver_ |
Poly solver for yaw only. | |
Trajectory generator.
|
inline |
Constructor.
control | define the control flag for start and end |
yaw_control | define the control flag for yaw start and end |
|
inline |
Set time allocation (optional), overwrite global dts, if not set, we will set a time allocation using L-inf
|
inline |