26 #ifndef MPBLOCKS_DUBINS_CURVES_EIGEN_SOLUTION_RLR_B_HPP_
27 #define MPBLOCKS_DUBINS_CURVES_EIGEN_SOLUTION_RLR_B_HPP_
35 namespace curves_eigen {
50 template <
typename Scalar>
68 Scalar d = (c[0] - c[2]).
norm();
84 Scalar
a = acos(d / (4 * r));
87 Eigen::Rotation2D<Scalar>
R(-a);
93 c[1] = c[2] + R * (c[0] - c[2]).
normalized() * 2 * r;
98 Scalar a1 = std::atan2(dc[1], dc[0]);
106 a0 = std::atan2(dc[1], dc[0]);
108 s[2] =
cwArc(a0, a1);
119 #endif // MPBLOCKS_DUBINS_CURVES_EIGEN_SOLUTION_RLR_B_HPP_
Eigen::Matrix< Scalar, 2, 1 > Vector2d
__host__ __device__ Format_t cwArc(Format_t a, Format_t b)
returns the clockwise (right) distance from a to b
Matrix< double, 3, 1 > Vector3d
empty struct used to template "variant" of three arc primitives
empty struct used to template "right turn" primitive
Scalar rightAngleOf(const Scalar q_theta)
return the angle of the vector from the center of the clockwise (right) circle coincident to q...
interface for different solutions, this is specialized for each Id in the SolutionId enum ...
__device__ __host__ Scalar norm(const RValue< Scalar, ROWS, COLS, Exp > &M)
compute the norm
Eigen::Matrix< Scalar, 2, 1 > rightCenter(const Eigen::Matrix< Scalar, 3, 1 > &q, Scalar r)
return the center of a clockwise (right) circle coincident to q with radius r
Eigen::Matrix< Scalar, 3, 1 > Vector3d
__host__ __device__ Normalized< Scalar, Exp, Spec > normalized(const RValue< Scalar, Exp, Spec > &exp)
Encodes a dubins path primitive, which is three connected arc segments.
static Path< Scalar > solve(const Vector3d &q0, const Vector3d &q1, const Scalar r)