Class Path2D

Inheritance Relationships

Base Type

Class Documentation

class Mechatronix::Path2D : public Mechatronix::MeshGeneric<SegmentBase>

engine object

Public Functions

inline explicit Path2D(string const &name)

Build Engine object.

inline ~Path2D()

Destroy Engine object.

void setup(GenericContainer const &vars)

Setup engine parameters.

Path2D can be initialized in different ways

MODE 1, XY description

:x => [ vector ] :y => [ vector ] :G2 => true build G2 clothoid list otherwise G1

MODE 2, G2 direct construction

:theta0 => number :x0 => number :y0 => number :abscissa => [ vector ] # nodes of curvilinear abscissa :curvature => [ vector ] # curvature is linearly varing

:abscissa_step => default mesh size (may be unused) :mesh = { MESH DESCRIPTION }

MESH DESCRIPTION MODE 1

:curvature_velocity = [ [ curv, velocity], [ curv, velocity], … [ curv, velocity] ]

spline mapping curvature with maximum allowed velocity

:dt => time for a mesh size h = dt*velocity :hmax => maximum admissible mesh size :maxacc => maximum admissible velocity profile acceleration :minacc => maximum admissible velocity profile deceleration

MESH DESCRIPTION MODE 2

:nodes = vector single segment direct meshing

MESH DESCRIPTION MODE 3

:segments [ segment description ] mesh sementgs, inherith form base class (see SegmentBase)

inline void make_closed()
inline real_type xTrajectory(real_type s) const

return the spline’s number of nodes. May be used to set the mesh range.

return the x coordinate of given the path

inline real_type xTrajectory_D(real_type s) const
inline real_type xTrajectory_DD(real_type s) const
inline real_type xTrajectory_DDD(real_type s) const
inline real_type yTrajectory(real_type s) const

return the y coordinate of given the path

inline real_type yTrajectory_D(real_type s) const
inline real_type yTrajectory_DD(real_type s) const
inline real_type yTrajectory_DDD(real_type s) const
inline real_type heading(real_type s) const

return the heading angle given the path position

inline real_type heading_D(real_type s) const
inline real_type heading_DD(real_type s) const
inline real_type heading_DDD(real_type s) const
inline real_type curvature(real_type s) const

return the curvature given the path position

inline real_type curvature_D(real_type s) const

return the curvature first derivative given the path position

inline real_type curvature_DD(real_type s) const

return the curvature second derivative given the path position

virtual void dump(ostream_type &stream) const

dump trajectory spline

virtual void writeToStream(ostream_type &stream) const

print trajectory parameters in human readable way