26 #ifndef MPBLOCKS_DUBINS_CURVES_EIGEN_SOLUTION_LRL_B_HPP_
27 #define MPBLOCKS_DUBINS_CURVES_EIGEN_SOLUTION_LRL_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]);
119 #endif // MPBLOCKS_DUBINS_CURVES_EIGEN_SOLUTION_LRL_B_HPP_
Scalar leftAngleOf(const Scalar q_theta)
return the angle of the vector from the center of the counter clockwise (left) circle coincident to q...
Eigen::Matrix< Scalar, 3, 1 > Vector3d
__host__ __device__ Format_t ccwArc(Format_t a, Format_t b)
returns the counter clockwise (left) 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
Eigen::Matrix< Scalar, 2, 1 > Vector2d
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
__host__ __device__ Normalized< Scalar, Exp, Spec > normalized(const RValue< Scalar, Exp, Spec > &exp)
Encodes a dubins path primitive, which is three connected arc segments.
Eigen::Matrix< Scalar, 2, 1 > leftCenter(const Eigen::Matrix< Scalar, 3, 1 > &q, Scalar r)
return the center of a counter clockwise (left) circle coincident to q with radius r ...
static Path< Scalar > solve(const Vector3d &q0, const Vector3d &q1, const Scalar r)