27 #ifndef MPBLOCKS_DUBINS_CURVES_CUDA2_SOLUTION_LRL_B_HPP_
28 #define MPBLOCKS_DUBINS_CURVES_CUDA2_SOLUTION_LRL_B_HPP_
34 namespace curves_cuda {
37 template <
typename Format_t>
61 template <
typename Format_t>
68 using namespace cuda::linalg2;
70 const Format_t _PI =
static_cast<Format_t
>(M_PI);
71 const Format_t
_2 =
static_cast<Format_t
>(2);
72 const Format_t
_4 =
static_cast<Format_t
>(4);
78 v << -Dispatch::sin( get<2>(q0) ),
79 Dispatch::cos( get<2>(q0) );
84 v << -Dispatch::sin( get<2>(q1) ),
85 Dispatch::cos( get<2>(q1) );
89 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) );
140 for(
int i=0; i < 3; i++)
160 template <
typename Format_t>
168 using namespace cuda::linalg2;
170 const Format_t _PI =
static_cast<Format_t
>(M_PI);
171 const Format_t
_2 =
static_cast<Format_t
>(2);
172 const Format_t
_4 =
static_cast<Format_t
>(4);
178 v << -Dispatch::sin( get<2>(q0) ),
179 Dispatch::cos( get<2>(q0) );
184 v << -Dispatch::sin( get<2>(q1) ),
185 Dispatch::cos( get<2>(q1) );
189 Format_t d =
norm(c[0]-c[1]);
199 Format_t
a = -Dispatch::acos( d / (4*r) );
217 b = Dispatch::atan2( get<1>(dc), get<0>(dc) );
226 b = Dispatch::atan2( get<1>(dc), get<0>(dc) );
240 for(
int i=0; i < 3; i++)
246 for(
int i=0; i < 3; i++)
272 #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