26 #ifndef MPBLOCKS_DUBINS_CURVES_PATH_H_
27 #define MPBLOCKS_DUBINS_CURVES_PATH_H_
29 #include <Eigen/Dense>
41 template <
typename Format_t>
43 typedef Eigen::Matrix<Format_t, 3, 1>
Vector3d;
61 Path(
int id) : id(id),
f(false) {
s.fill(0); }
84 Format_t
dist(
const Format_t r)
const {
88 return r * (
s[0] +
s[2]) +
s[1];
92 operator bool()
const {
return f; }
95 template <
typename Format_t>
114 #endif // MPBLOCKS_DUBINS_CURVES_PATH_H_
Path(int id, const Vector3d &s)
we only use this constructor when it's feasible
Path< Format_t > & operator=(const Vector3d &s_in)
fill and set to feasible, returns itself so that we can do the return in one line ...
Path(const Path< Format_t > &other)
Format_t dist(const Format_t r) const
compute distance based on id
Vector3d s
lengths of each segment, how it's interpreted depends on id
int id
identifies the type of path
Path(int id)
the default constructor marks it as infeasible, so we can return it immediately
BinaryKey other(const BinaryKey &key)
Encodes a dubins path primitive, which is three connected arc segments.
Path< Format_t > bestOf(const Path< Format_t > &r0, const Path< Format_t > &r1, const Format_t r)
Path< Format_t > & operator=(const Path< Format_t > &other)
Eigen::Matrix< Format_t, 3, 1 > Vector3d