bitsim
Model, simulate, estimate and control robots in C++
Loading...
Searching...
No Matches
bitsim::trajectory::WaypointTrajectory< LinkType > Class Template Reference

A container that represents a collection of way points linked together via a LinkType The LinkType defines how smooth the trajectory will look like. More...

#include <waypoint_trajectory.h>

Public Types

using link_type = LinkType
using w_point_type = typename link_type::w_point_type
using link_iterator = typename std::vector<link_type>::iterator
 point iteration
using const_link_iterator = typename std::vector<link_type>::const_iterator

Public Member Functions

 WaypointTrajectory ()
 Constructor.
 WaypointTrajectory (uint_t n)
 Constructor.
std::pair< real_t, link_type > distance (const w_point_type &p) const
 Computes the minimum distance of the given point from the trajectory.
uint_t size () const
 How many waypoints the pah has.
void reserve (uint_t n)
 Reserve space for waypoints.
void clear ()
 clear the memory allocated for points and edges
bool empty () const
 Returns true if the trajectory is empty.
void push (const link_type &link)
 Push a new link.
link_type & operator[] (uint_t i)
 Returns a read/write reference of the i-th link.
const link_type & operator[] (uint_t i) const
 Returns a read reference of the i-th link.
void resize (uint_t n)
 Resize the underlying links.
link_iterator begin ()
 Raw node iteration.
link_iterator end ()
const_link_iterator begin () const
 Raw node iteration.
const_link_iterator end () const

Detailed Description

template<typename LinkType>
class bitsim::trajectory::WaypointTrajectory< LinkType >

A container that represents a collection of way points linked together via a LinkType The LinkType defines how smooth the trajectory will look like.

Member Typedef Documentation

◆ const_link_iterator

template<typename LinkType>
using bitsim::trajectory::WaypointTrajectory< LinkType >::const_link_iterator = typename std::vector<link_type>::const_iterator

◆ link_iterator

template<typename LinkType>
using bitsim::trajectory::WaypointTrajectory< LinkType >::link_iterator = typename std::vector<link_type>::iterator

point iteration

◆ link_type

template<typename LinkType>
using bitsim::trajectory::WaypointTrajectory< LinkType >::link_type = LinkType

◆ w_point_type

template<typename LinkType>
using bitsim::trajectory::WaypointTrajectory< LinkType >::w_point_type = typename link_type::w_point_type

Constructor & Destructor Documentation

◆ WaypointTrajectory() [1/2]

template<typename LinkType>
bitsim::trajectory::WaypointTrajectory< LinkType >::WaypointTrajectory ( )

Constructor.

◆ WaypointTrajectory() [2/2]

template<typename LinkType>
bitsim::trajectory::WaypointTrajectory< LinkType >::WaypointTrajectory ( uint_t n)
explicit

Constructor.

Member Function Documentation

◆ begin() [1/2]

template<typename LinkType>
link_iterator bitsim::trajectory::WaypointTrajectory< LinkType >::begin ( )
inline

Raw node iteration.

◆ begin() [2/2]

template<typename LinkType>
const_link_iterator bitsim::trajectory::WaypointTrajectory< LinkType >::begin ( ) const
inline

Raw node iteration.

◆ clear()

template<typename LinkType>
void bitsim::trajectory::WaypointTrajectory< LinkType >::clear ( )
inline

clear the memory allocated for points and edges

◆ distance()

template<typename LinkType>
std::pair< real_t, typename WaypointTrajectory< LinkType >::link_type > bitsim::trajectory::WaypointTrajectory< LinkType >::distance ( const w_point_type & p) const

Computes the minimum distance of the given point from the trajectory.

◆ empty()

template<typename LinkType>
bool bitsim::trajectory::WaypointTrajectory< LinkType >::empty ( ) const
inline

Returns true if the trajectory is empty.

◆ end() [1/2]

template<typename LinkType>
link_iterator bitsim::trajectory::WaypointTrajectory< LinkType >::end ( )
inline

◆ end() [2/2]

template<typename LinkType>
const_link_iterator bitsim::trajectory::WaypointTrajectory< LinkType >::end ( ) const
inline

◆ operator[]() [1/2]

template<typename LinkType>
link_type & bitsim::trajectory::WaypointTrajectory< LinkType >::operator[] ( uint_t i)
inline

Returns a read/write reference of the i-th link.

◆ operator[]() [2/2]

template<typename LinkType>
const link_type & bitsim::trajectory::WaypointTrajectory< LinkType >::operator[] ( uint_t i) const
inline

Returns a read reference of the i-th link.

◆ push()

template<typename LinkType>
void bitsim::trajectory::WaypointTrajectory< LinkType >::push ( const link_type & link)
inline

Push a new link.

◆ reserve()

template<typename LinkType>
void bitsim::trajectory::WaypointTrajectory< LinkType >::reserve ( uint_t n)
inline

Reserve space for waypoints.

◆ resize()

template<typename LinkType>
void bitsim::trajectory::WaypointTrajectory< LinkType >::resize ( uint_t n)
inline

Resize the underlying links.

◆ size()

template<typename LinkType>
uint_t bitsim::trajectory::WaypointTrajectory< LinkType >::size ( ) const
inline

How many waypoints the pah has.


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