1#ifndef WAYPOINT_TRAJECTORY_H
2#define WAYPOINT_TRAJECTORY_H
26 static_assert(std::is_default_constructible<LinkType>::value,
27 "LinkType must have default constructor");
68 void clear() { links_.clear(); }
73 bool empty()
const {
return links_.empty(); }
111 std::vector<link_type> links_;
121template <
typename LinkType>
122std::pair<real_t, typename WaypointTrajectory<LinkType>::link_type>
127 real_t dist_ = std::numeric_limits<real_t>::max();
130 for (
const auto &
link : links_)
142 return std::make_pair(dist_, links_);
A container that represents a collection of way points linked together via a LinkType The LinkType de...
Definition waypoint_trajectory.h:24
link_type & operator[](uint_t i)
Returns a read/write reference of the i-th link.
Definition waypoint_trajectory.h:83
std::pair< real_t, link_type > distance(const w_point_type &p) const
Computes the minimum distance of the given point from the trajectory.
Definition waypoint_trajectory.h:123
bool empty() const
Returns true if the trajectory is empty.
Definition waypoint_trajectory.h:73
void reserve(uint_t n)
Reserve space for waypoints.
Definition waypoint_trajectory.h:63
link_iterator end()
Definition waypoint_trajectory.h:99
std::vector< link_type >::const_iterator const_link_iterator
Definition waypoint_trajectory.h:37
const_link_iterator begin() const
Raw node iteration.
Definition waypoint_trajectory.h:104
void clear()
clear the memory allocated for points and edges
Definition waypoint_trajectory.h:68
LinkType link_type
Definition waypoint_trajectory.h:29
link_iterator begin()
Raw node iteration.
Definition waypoint_trajectory.h:98
link_type::w_point_type w_point_type
Definition waypoint_trajectory.h:31
std::vector< link_type >::iterator link_iterator
point iteration
Definition waypoint_trajectory.h:36
uint_t size() const
How many waypoints the pah has.
Definition waypoint_trajectory.h:58
void resize(uint_t n)
Resize the underlying links.
Definition waypoint_trajectory.h:93
const link_type & operator[](uint_t i) const
Returns a read reference of the i-th link.
Definition waypoint_trajectory.h:88
void push(const link_type &link)
Push a new link.
Definition waypoint_trajectory.h:78
const_link_iterator end() const
Definition waypoint_trajectory.h:105
WaypointTrajectory()
Constructor.
Definition waypoint_trajectory.h:114
OutT resolve(const std::string &name, const std::map< std::string, std::any > &input)
Definition std_map_utils.h:25
Definition bitrl_consts.h:14
double real_t
real_t
Definition bitrl_types.h:23
std::size_t uint_t
uint_t
Definition bitrl_types.h:43