27 #ifndef MPBLOCKS_DUBINS_CURVES_CUDA2_SOLUTION_LRL_A_HPP_
28 #define MPBLOCKS_DUBINS_CURVES_CUDA2_SOLUTION_LRL_A_HPP_
34 namespace curves_cuda {
37 template <
typename Format_t>
62 template <
typename Format_t>
69 using namespace cuda::linalg2;
71 const Format_t _PI =
static_cast<Format_t
>(M_PI);
72 const Format_t
_2 =
static_cast<Format_t
>(2);
73 const Format_t
_4 =
static_cast<Format_t
>(4);
79 v << -Dispatch::sin( get<2>(q0) ),
80 Dispatch::cos( get<2>(q0) );
85 v << -Dispatch::sin( get<2>(q1) ),
86 Dispatch::cos( get<2>(q1) );
90 Format_t d =
norm(c[0]-c[1]);
99 Format_t
a = -Dispatch::acos( d / (
_4*r) );
117 b = Dispatch::atan2( get<1>(dc), get<0>(dc) );
126 b = Dispatch::atan2( get<1>(dc), get<0>(dc) );
141 for(
int i=0; i < 3; i++)
155 template <
typename Format_t>
163 using namespace cuda::linalg2;
165 const Format_t _PI =
static_cast<Format_t
>(M_PI);
166 const Format_t
_2 =
static_cast<Format_t
>(2);
167 const Format_t
_4 =
static_cast<Format_t
>(4);
173 v << -Dispatch::sin( get<2>(q0) ),
174 Dispatch::cos( get<2>(q0) );
179 v << -Dispatch::sin( get<2>(q1) ),
180 Dispatch::cos( get<2>(q1) );
184 Format_t d =
norm(c[0]-c[1]);
193 Format_t
a = -Dispatch::acos( d / (
_4*r) );
211 b = Dispatch::atan2( get<1>(dc), get<0>(dc) );
220 b = Dispatch::atan2( get<1>(dc), get<0>(dc) );
234 for(
int i=0; i < 3; i++)
240 for(
int i=0; i < 3; i++)
273 #endif // SOLUTIONLRLA_H_
const CoefficientKey< 4 > _4
__device__ __host__ Normalize< Scalar, Exp > normalize(RValue< Scalar, Exp > const &A)
empty struct used to template "variant" of three arc primitives
__device__ __host__ Matrix< Scalar, ROWS, COLS > mktmp(RValue< Scalar, ROWS, COLS, Exp > const &M)
forces the creation of a temporary
__host__ __device__ Format_t ccwArc(Format_t a, Format_t b)
returns the counter clockwise (left) distance from a to b
empty struct used to template "variant" of three arc primitives
empty struct used to template "right turn" primitive
Encapsulates the solution distance along with a feasibility bit for a particular primitive solution...
__host__ __device__ Format_t clampRadian(Format_t a)
wraps the input onto [-pi,pi]
__device__ __host__ Scalar norm(const RValue< Scalar, ROWS, COLS, Exp > &M)
compute the norm
static Result< Format_t > solve(const Vector3d_t &q0, const Vector3d_t &q1, const Format_t r)
basic interface returns only the total distance
interface for different solutions