26 #ifndef MPBLOCKS_DUBINS_CURVES_EIGEN_SOLUTION_LRL_A_HPP_
27 #define MPBLOCKS_DUBINS_CURVES_EIGEN_SOLUTION_LRL_A_HPP_
35 namespace curves_eigen {
49 template <
typename Scalar>
67 Scalar d = (c[0] - c[2]).
norm();
83 Scalar
a = acos(d / (4 * r));
86 Eigen::Rotation2D<Scalar>
R(-a);
92 c[1] = c[0] + R * (c[2] - c[0]).
normalized() * 2 * r;
97 Scalar a1 = std::atan2(dc[1], dc[0]);
105 a0 = std::atan2(dc[1], dc[0]);
118 #endif // MPBLOCKS_DUBINS_CURVES_EIGEN_SOLUTION_LRL_A_HPP_
static dubins::Path< Scalar > solve(const Vector3d &q0, const Vector3d &q1, const Scalar r)
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
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)
Eigen::Matrix< Scalar, 2, 1 > Vector2d
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 ...