MRSL Motion Primitive Library  1.2
A motion primitive library for generating trajectory for mobile robots
Public Member Functions | Public Attributes | List of all members
Waypoint< Dim > Struct Template Reference

Waypoint base class. More...

#include <waypoint.h>

Public Member Functions

 Waypoint ()
 Empty constructor.
 
 Waypoint (Control::Control c)
 Simple constructor. More...
 
void print (std::string str="") const
 Print all attributes.
 

Public Attributes

Vecf< Dim > pos {Vecf<Dim>::Zero()}
 position in $R^{n}$
 
Vecf< Dim > vel {Vecf<Dim>::Zero()}
 velocity in $R^{n}$
 
Vecf< Dim > acc {Vecf<Dim>::Zero()}
 acceleration in $R^{n}$
 
Vecf< Dim > jrk {Vecf<Dim>::Zero()}
 jerk in $R^{n}$
 
decimal_t yaw {0}
 yaw
 
decimal_t t {0}
 time when reaching this waypoint in graph search
 
union {
   struct {
      bool   use_pos: 1
 If true, pos will be used in primitive generation.
 
      bool   use_vel: 1
 If true, vel will be used in primitive generation.
 
      bool   use_acc: 1
 If true, acc will be used in primitive generation.
 
      bool   use_jrk: 1
 If true, jrk will be used in primitive generation.
 
      bool   use_yaw: 1
 If true, yaw will be used in primitive generation.
 
   } 
 
   Control::Control   control: 5
 Control value.
 
}; 
 Control flag. More...
 
bool enable_t {false}
 

Detailed Description

template<int Dim>
struct Waypoint< Dim >

Waypoint base class.

State includes position, velocity, acceleration and jerk in $R^n$, where the dimension $n$ can be either 2 or 3. Yaw is contained by default. The anonymous union is used to set control flag.

Constructor & Destructor Documentation

◆ Waypoint()

template<int Dim>
Waypoint< Dim >::Waypoint ( Control::Control  c)
inline

Simple constructor.

Parameters
ccontrol value

Member Data Documentation

◆ @1

union { ... }

Control flag.

Anonymous union type that contains 5 bits as xxxxx, each bit from right to left is assigned to use_pos, use_vel, use_acc, use_jrk and use_yaw.

◆ enable_t

template<int Dim>
bool Waypoint< Dim >::enable_t {false}

if enabled, use $t$ when calculating hash_value


The documentation for this struct was generated from the following file: