Template Class Vertex

Class Documentation

template<int _D = 1>
class mav_planning_utils::path_planning::Vertex

Public Types

typedef Eigen::Matrix<double, D, 1> ConstraintValueT
typedef std::pair<int, ConstraintValueT> Constraint
typedef std::map<int, ConstraintValueT, std::less<int>, Eigen::aligned_allocator<std::pair<const int, ConstraintValueT>>> Constraints

Public Functions

inline Vertex()

constructs an empty vertex and sets time_to_next and derivative_to_optimize to zero

inline Vertex(double _time_to_next, int _derivative_to_optimze)

constructs an empty vertex and takes arguments for time_to_next and derivative_to_optimize

inline Vertex(double _time_to_next, int _derivative_to_optimze, int derivatives)

constructs a vertex, takes arguments for time_to_next and derivative_to_optimize; sets constraints up to derivatives to zero

This is useful for beginning and end vertices

inline void addConstraint(int type, double value)

adds a constraint for the derivative specified in type with the given value

if this is a multi-dimensional vertex, all derivatives get set to the same value

template<class Derived>
inline void addConstraint(int type, const Eigen::MatrixBase<Derived> &c)

adds a constraint for the derivative specified in type with the given values in c

the constraints for the specified derivative get set to the values in the vector c. the dimension has to match the dimension of the vertex

inline void setAllZero(int up_to_type)

sets all derivatives up to (including) up_to_type to zero; useful for beginning / end vertices

inline bool hasConstraint(int type) const

returns if the vertex has a constraint specified by type

inline ConstraintValueT getConstraint(int type) const

returns the value of the constraint specified with type.

If the constraint is not set, it returns zeros >

Todo:

inline Constraints::const_iterator cBegin() const

returns a const iterator to the first constraint

inline Constraints::const_iterator cEnd() const

returns a const iterator to the end of the constraints, i.e.

one after the last element

inline bool isEqualTol(const Vertex<D> &rhs, double tol) const

Checks if both lhs and rhs are equal up to tol in case of double values.

Public Members

double time_to_next
int derivative_to_optimize
Constraints constraints

Public Static Attributes

static const int D = _D