5 #include "pinocchio/multibody/liegroup/liegroup.hpp" 6 #include "pinocchio/multibody/liegroup/liegroup-collection.hpp" 7 #include "pinocchio/multibody/liegroup/liegroup-generic.hpp" 8 #include "pinocchio/multibody/liegroup/cartesian-product-variant.hpp" 10 #include "pinocchio/multibody/joint/joint-generic.hpp" 12 #include <boost/test/unit_test.hpp> 13 #include <boost/utility/binary.hpp> 14 #include <boost/algorithm/string.hpp> 15 #include <boost/mpl/vector.hpp> 17 #define EIGEN_VECTOR_IS_APPROX(Va, Vb, precision) \ 18 BOOST_CHECK_MESSAGE((Va).isApprox(Vb, precision), \ 19 "check " #Va ".isApprox(" #Vb ") failed " \ 20 "[\n" << (Va).transpose() << "\n!=\n" << (Vb).transpose() << "\n]") 21 #define EIGEN_MATRIX_IS_APPROX(Va, Vb, precision) \ 22 BOOST_CHECK_MESSAGE((Va).isApprox(Vb, precision), \ 23 "check " #Va ".isApprox(" #Vb ") failed " \ 24 "[\n" << (Va) << "\n!=\n" << (Vb) << "\n]") 29 #define IFVERBOSE if(VERBOSE) 32 template<
typename Derived>
33 std::ostream& operator<< (std::ostream& os, const LieGroupBase<Derived>& lg)
35 return os << lg.name();
37 template<
typename LieGroupCollection>
38 std::ostream& operator<< (std::ostream& os, const LieGroupGenericTpl<LieGroupCollection>& lg)
40 return os << lg.name();
50 const Scalar prec = Eigen::NumTraits<Scalar>::dummy_precision();
51 BOOST_TEST_MESSAGE (
"Testing Joint over " << jmodel.shortname());
52 typedef typename T::ConfigVector_t ConfigVector_t;
53 typedef typename T::TangentVector_t TangentVector_t;
55 ConfigVector_t
q1(ConfigVector_t::Random (jmodel.nq()));
56 TangentVector_t q1_dot(TangentVector_t::Random (jmodel.nv()));
57 ConfigVector_t
q2(ConfigVector_t::Random (jmodel.nq()));
59 static ConfigVector_t Ones(ConfigVector_t::Ones(jmodel.nq()));
64 q1 = LieGroupType().randomConfiguration(-Ones, Ones);
67 typename T::JointDataDerived jdata = jmodel.createData();
70 jmodel.calc(jdata, q1, q1_dot);
74 q2 = LieGroupType().integrate(q1,q1_dot);
76 jmodel.calc(jdata,q2);
79 double tol_test = 1e2;
80 if(jmodel.shortname() ==
"JointModelPlanar")
85 if(jmodel.shortname() !=
"JointModelSphericalZYX")
87 BOOST_CHECK_MESSAGE(M2.
isApprox(M2_exp), std::string(
"Error when integrating1 " + jmodel.shortname()));
91 ConfigVector_t qTest(ConfigVector_t::Random (jmodel.nq()));
92 TangentVector_t qTest_dot(TangentVector_t::Random (jmodel.nv()));
93 ConfigVector_t qResult(ConfigVector_t::Random (jmodel.nq()));
94 qTest = LieGroupType().randomConfiguration(-Ones, Ones);
95 qResult = LieGroupType().integrate(qTest, qTest_dot);
96 LieGroupType().integrate(qTest, qTest_dot, qTest);
98 std::string(
"Normalization error when integrating with same input and output " + jmodel.shortname()));
102 typename T::JointDataDerived jdata = jmodel.createData();
103 jmodel.calc(jdata, qTest);
107 typename T::JointDataDerived jdata = jmodel.createData();
108 jmodel.calc(jdata, qResult);
111 BOOST_CHECK_MESSAGE(MTest.
isApprox(MResult),
112 std::string(
"Inconsistent value when integrating with same input and output " + jmodel.shortname()));
114 BOOST_CHECK_MESSAGE(qTest.isApprox(qResult,prec),
115 std::string(
"Inconsistent value when integrating with same input and output " + jmodel.shortname()));
118 ConfigVector_t q3 = LieGroupType().integrate(q2,-q1_dot);
119 jmodel.calc(jdata,q3);
122 BOOST_CHECK_MESSAGE(M3.
isApprox(M1), std::string(
"Error when integrating back " + jmodel.shortname()));
125 ConfigVector_t q_interpolate = LieGroupType().interpolate(q1,q2,0.);
126 BOOST_CHECK_MESSAGE(q_interpolate.isApprox(q1), std::string(
"Error when interpolating " + jmodel.shortname()));
128 q_interpolate = LieGroupType().interpolate(q1,q2,1.);
129 BOOST_CHECK_MESSAGE(q_interpolate.isApprox(q2,tol_test*prec), std::string(
"Error when interpolating " + jmodel.shortname()));
131 if(jmodel.shortname() !=
"JointModelSphericalZYX")
133 q_interpolate = LieGroupType().interpolate(q1,q2,u);
134 jmodel.calc(jdata,q_interpolate);
135 SE3 M_interpolate = jdata.M;
137 SE3 M_interpolate_expected = M1*
exp6(u*v1);
138 BOOST_CHECK_MESSAGE(M_interpolate_expected.
isApprox(M_interpolate,1e4*prec), std::string(
"Error when interpolating " + jmodel.shortname()));
142 TangentVector_t
zero = LieGroupType().difference(q1,q1);
143 BOOST_CHECK_MESSAGE (zero.isZero(), std::string (
"Error: difference between two equal configurations is not 0."));
144 zero = LieGroupType().difference(q2,q2);
145 BOOST_CHECK_MESSAGE (zero.isZero(), std::string (
"Error: difference between two equal configurations is not 0."));
151 TangentVector_t vdiff = LieGroupType().difference(q1,q2);
152 BOOST_CHECK_MESSAGE(vdiff.isApprox(q1_dot,tol_test*prec), std::string(
"Error when differentiating " + jmodel.shortname()));
155 Scalar
dist = LieGroupType().distance(q1,q2);
156 BOOST_CHECK_MESSAGE(dist > 0.,
"distance - wrong results");
157 BOOST_CHECK_SMALL(math::fabs(dist-q1_dot.norm()), tol_test*prec);
159 std::string error_prefix(
"LieGroup");
160 error_prefix +=
" on joint " + jmodel.shortname();
162 BOOST_CHECK_MESSAGE(jmodel.nq() ==
LieGroupType::NQ, std::string(error_prefix +
" - nq "));
163 BOOST_CHECK_MESSAGE(jmodel.nv() ==
LieGroupType::NV, std::string(error_prefix +
" - nv "));
167 LieGroupType().randomConfiguration(-1 * Ones, Ones).size(),
168 std::string(error_prefix +
" - RandomConfiguration dimensions "));
170 ConfigVector_t q_normalize(ConfigVector_t::Random());
172 if(jmodel.shortname() ==
"JointModelSpherical")
174 BOOST_CHECK_MESSAGE(!LieGroupType().
isNormalized(q_normalize_ref), std::string(error_prefix +
" - !isNormalized "));
175 q_normalize_ref /= q_normalize_ref.norm();
177 else if(jmodel.shortname() ==
"JointModelFreeFlyer")
179 BOOST_CHECK_MESSAGE(!LieGroupType().
isNormalized(q_normalize_ref), std::string(error_prefix +
" - !isNormalized "));
180 q_normalize_ref.template tail<4>() /= q_normalize_ref.template tail<4>().norm();
182 else if(boost::algorithm::istarts_with(jmodel.shortname(),
"JointModelRUB"))
184 BOOST_CHECK_MESSAGE(!LieGroupType().
isNormalized(q_normalize_ref), std::string(error_prefix +
" - !isNormalized "));
185 q_normalize_ref /= q_normalize_ref.norm();
187 else if(jmodel.shortname() ==
"JointModelPlanar")
189 BOOST_CHECK_MESSAGE(!LieGroupType().
isNormalized(q_normalize_ref), std::string(error_prefix +
" - !isNormalized "));
190 q_normalize_ref.template tail<2>() /= q_normalize_ref.template tail<2>().norm();
192 BOOST_CHECK_MESSAGE(LieGroupType().
isNormalized(q_normalize_ref), std::string(error_prefix +
" - isNormalized "));
193 LieGroupType().normalize(q_normalize);
194 BOOST_CHECK_MESSAGE(q_normalize.isApprox(q_normalize_ref), std::string(error_prefix +
" - normalize "));
199 template <
typename T>
203 jmodel.setIndexes(0,0,0);
204 typename T::JointDataDerived jdata = jmodel.createData();
206 for (
int i = 0;
i <= 50; ++
i)
216 pinocchio::JointModelRevoluteUnaligned::JointDataDerived jdata = jmodel.
createData();
225 pinocchio::JointModelPrismaticUnaligned::JointDataDerived jdata = jmodel.
createData();
233 template <
typename T>
236 typedef typename T::ConfigVector_t ConfigVector_t;
237 typedef typename T::TangentVector_t TangentVector_t;
238 typedef typename T::JacobianMatrix_t JacobianMatrix_t;
242 BOOST_TEST_MESSAGE (lg.name());
243 ConfigVector_t
q[2], q_dv[2];
246 TangentVector_t va, vb, dv;
247 JacobianMatrix_t
J[2];
250 lg.difference (q[0], q[1], va);
251 lg.template dDifference<ARG0> (q[0], q[1], J[0]);
252 lg.template dDifference<ARG1> (q[0], q[1], J[1]);
254 const Scalar
eps = 1e-6;
255 for (
int k = 0; k < 2; ++k) {
256 BOOST_TEST_MESSAGE (
"Checking J" << k <<
'\n' << J[k]);
260 for (
int i = 0;
i < dv.size(); ++
i)
263 lg.integrate (q[k], dv, q_dv[k]);
264 lg.difference (q_dv[0], q_dv[1], vb);
267 TangentVector_t J_dv = J[k].col(
i);
268 TangentVector_t vb_va = (vb - va) / eps;
277 template <
typename T>
281 template <
typename Scalar,
int Options>
286 typedef typename LG_t::ConfigVector_t ConfigVector_t;
287 typedef typename LG_t::JacobianMatrix_t JacobianMatrix_t;
288 typedef typename LG_t::ConstQuaternionMap_t ConstQuaternionMap_t;
296 ConstQuaternionMap_t quat0(q[0].
template tail<4>().
data()), quat1(q[1].
template tail<4>().
data());
297 JacobianMatrix_t
J[2];
299 lg.template dDifference<ARG0> (q[0], q[1], J[0]);
300 lg.template dDifference<ARG1> (q[0], q[1], J[1]);
302 SE3 om0 (
typename SE3::Quaternion (q[0].
template tail<4>()).matrix(), q[0].
template head<3>()),
303 om1 (
typename SE3::Quaternion (q[1].
template tail<4>()).matrix(), q[1].
template head<3>()),
304 _1m2 (om1.actInv (om0)) ;
309 ConfigVector_t q_interp = lg.interpolate(q[0],q[1],u);
310 ConstQuaternionMap_t quat_interp(q_interp.template tail<4>().data());
312 SE3 M0(quat0,q[0].
template head<3>());
313 SE3 M1(quat1,q[1].
template head<3>());
316 SE3 M_interp(quat_interp,q_interp.template head<3>());
318 BOOST_CHECK(M_u.
isApprox(M_interp));
321 template <
typename Scalar,
int Options>
332 typedef typename LG_t::ConfigVector_t ConfigVector_t;
333 typedef typename LG_t::JacobianMatrix_t JacobianMatrix_t;
340 JacobianMatrix_t
J[2];
342 lg.template dDifference<ARG0> (q[0], q[1], J[0]);
343 lg.template dDifference<ARG1> (q[0], q[1], J[1]);
348 JacobianMatrix_t
X (JacobianMatrix_t::Identity());
349 X.template bottomRightCorner<3,3>() = oR1.transpose() * oR0;
354 template<
bool around_
identity>
356 template <
typename T>
359 typedef typename T::ConfigVector_t ConfigVector_t;
360 typedef typename T::TangentVector_t TangentVector_t;
361 typedef typename T::JacobianMatrix_t JacobianMatrix_t;
365 ConfigVector_t
q = lg.random();
366 TangentVector_t
v,
dq, dv;
375 ConfigVector_t q_v = lg.integrate (q, v);
377 JacobianMatrix_t Jq, Jv;
378 lg.dIntegrate_dq (q, v, Jq);
379 lg.dIntegrate_dv (q, v, Jv);
381 const Scalar
eps = 1e-6;
382 for (
int i = 0;
i < v.size(); ++
i)
385 ConfigVector_t q_dq = lg.integrate (q, dq);
387 ConfigVector_t q_dq_v = lg.integrate (q_dq, v);
388 TangentVector_t Jq_dq = Jq.col(
i);
390 TangentVector_t dI_dq = lg.difference (q_v, q_dq_v) /
eps;
393 ConfigVector_t q_v_dv = lg.integrate (q, (v+dv).eval());
394 TangentVector_t Jv_dv = Jv.col(
i);
396 TangentVector_t dI_dv = lg.difference (q_v, q_v_dv) /
eps;
405 template <
typename T>
408 typedef typename T::ConfigVector_t ConfigVector_t;
409 typedef typename T::TangentVector_t TangentVector_t;
410 typedef typename T::JacobianMatrix_t JacobianMatrix_t;
413 BOOST_TEST_MESSAGE (lg.name());
414 ConfigVector_t qa, qb (lg.nq());
416 TangentVector_t
v (lg.nv());
418 lg.integrate(qa,
v, qb);
420 JacobianMatrix_t Jd_qb, Ji_v;
422 lg.template dDifference<ARG1> (qa, qb, Jd_qb);
423 lg.template dIntegrate <ARG1> (qa,
v , Ji_v );
425 BOOST_CHECK_MESSAGE ((Jd_qb * Ji_v).isIdentity(),
431 Jd_qb * Ji_v <<
'\n');
437 template <
typename T>
440 typedef typename T::ConfigVector_t ConfigVector_t;
441 typedef typename T::TangentVector_t TangentVector_t;
445 ConfigVector_t
q = lg.random();
446 TangentVector_t dv(TangentVector_t::Zero(lg.nv()));
448 BOOST_TEST_MESSAGE (lg.name());
449 typedef Eigen::Matrix<Scalar,T::NQ,T::NV> JacobianCoeffs;
450 JacobianCoeffs Jintegrate(JacobianCoeffs::Zero(lg.nq(),lg.nv()));
451 lg.integrateCoeffWiseJacobian(q,Jintegrate);
452 JacobianCoeffs Jintegrate_fd(JacobianCoeffs::Zero(lg.nq(),lg.nv()));
454 const Scalar
eps = 1e-8;
455 for (
int i = 0;
i < lg.nv(); ++
i)
458 ConfigVector_t q_next(ConfigVector_t::Zero(lg.nq()));
459 lg.integrate(q, dv,q_next);
460 Jintegrate_fd.col(
i) = (q_next -
q)/eps;
482 for (
int i = 0;
i < 20; ++
i)
483 boost::mpl::for_each<Variant::types>(
TestJoint());
495 typedef boost::mpl::vector< VectorSpaceOperationTpl<1,Scalar,Options>
502 VectorSpaceOperationTpl<2,Scalar,Options>,
503 SpecialOrthogonalOperationTpl<2,Scalar,Options>
507 SpecialOrthogonalOperationTpl<3,Scalar,Options>
510 for (
int i = 0;
i < 20; ++
i)
519 typedef boost::mpl::vector< VectorSpaceOperationTpl<1,Scalar,Options>
526 VectorSpaceOperationTpl<2,Scalar,Options>,
527 SpecialOrthogonalOperationTpl<2,Scalar,Options>
531 SpecialOrthogonalOperationTpl<3,Scalar,Options>
534 for (
int i = 0;
i < 20; ++
i)
546 typedef boost::mpl::vector< VectorSpaceOperationTpl<1,Scalar,Options>
553 VectorSpaceOperationTpl<2,Scalar,Options>,
554 SpecialOrthogonalOperationTpl<2,Scalar,Options>
558 SpecialOrthogonalOperationTpl<3,Scalar,Options>
561 for (
int i = 0;
i < 20; ++
i)
570 typedef boost::mpl::vector< VectorSpaceOperationTpl<1,Scalar,Options>
577 VectorSpaceOperationTpl<2,Scalar,Options>,
578 SpecialOrthogonalOperationTpl<2,Scalar,Options>
582 SpecialOrthogonalOperationTpl<3,Scalar,Options>
585 for (
int i = 0;
i < 20; ++
i)
589 typedef SpecialEuclideanOperationTpl<3,Scalar,Options>
LieGroup;
590 typedef LieGroup::ConfigVector_t ConfigVector_t;
593 ConfigVector_t
q = lg.random();
596 typedef Eigen::Matrix<Scalar,LieGroup::NQ,LieGroup::NV> JacobianCoeffs;
597 JacobianCoeffs Jintegrate(JacobianCoeffs::Zero(lg.nq(),lg.nv()));
598 lg.integrateCoeffWiseJacobian(q,Jintegrate);
608 VSO_t::ConfigVector_t
q,
609 lo(VSO_t::ConfigVector_t::Constant(-std::numeric_limits<double>::infinity())),
612 up(VSO_t::ConfigVector_t::Constant( 0));
616 VSO_t ().randomConfiguration(lo, up, q);
617 }
catch (
const std::runtime_error&) {
620 BOOST_CHECK_MESSAGE(error,
"Random configuration between infinite bounds should return an error");
630 BOOST_CHECK (vs1.
nq () == 1);
631 BOOST_CHECK (vs1.
nv () == 1);
632 BOOST_CHECK (vs1.
name () ==
"R^1");
638 BOOST_CHECK (vs2.nq () == 2);
639 BOOST_CHECK (vs2.nv () == 2);
640 BOOST_CHECK (vs2.name () ==
"R^2");
641 BOOST_CHECK (vs2.neutral () ==
neutral);
646 BOOST_CHECK (vs3.nq () == 3);
647 BOOST_CHECK (vs3.nv () == 3);
648 BOOST_CHECK (vs3.name () ==
"R^3");
649 BOOST_CHECK (vs3.neutral () ==
neutral);
652 neutral.resize (2); neutral [0] = 1; neutral [1] = 0;
653 BOOST_CHECK (so2.nq () == 2);
654 BOOST_CHECK (so2.nv () == 1);
655 BOOST_CHECK (so2.name () ==
"SO(2)");
656 BOOST_CHECK (so2.neutral () ==
neutral);
659 neutral.resize (4); neutral.setZero ();
661 BOOST_CHECK (so3.nq () == 4);
662 BOOST_CHECK (so3.nv () == 3);
663 BOOST_CHECK (so3.name () ==
"SO(3)");
664 BOOST_CHECK (so3.neutral () ==
neutral);
667 neutral.resize (4); neutral.setZero ();
669 BOOST_CHECK (se2.nq () == 4);
670 BOOST_CHECK (se2.nv () == 3);
671 BOOST_CHECK (se2.name () ==
"SE(2)");
672 BOOST_CHECK (se2.neutral () ==
neutral);
675 neutral.resize (7); neutral.setZero ();
677 BOOST_CHECK (se3.nq () == 7);
678 BOOST_CHECK (se3.nv () == 6);
679 BOOST_CHECK (se3.name () ==
"SE(3)");
680 BOOST_CHECK (se3.neutral () ==
neutral);
684 neutral.resize (4); neutral.setZero ();
686 BOOST_CHECK (r2xso2.nq () == 4);
687 BOOST_CHECK (r2xso2.nv () == 3);
688 BOOST_CHECK (r2xso2.name () ==
"R^2*SO(2)");
689 BOOST_CHECK (r2xso2.neutral () ==
neutral);
693 neutral.resize (7); neutral.setZero ();
695 BOOST_CHECK (r3xso3.nq () == 7);
696 BOOST_CHECK (r3xso3.nv () == 6);
697 BOOST_CHECK (r3xso3.name () ==
"R^3*SO(3)");
698 BOOST_CHECK (r3xso3.neutral () ==
neutral);
704 BOOST_CHECK(dim == 2);
706 BOOST_CHECK(dim == Eigen::Dynamic);
708 BOOST_CHECK(dim == Eigen::Dynamic);
716 q1 << 0,0,-0.1953711450011105244,0.9807293794421349169;
717 q2 << 0,0,-0.19537114500111049664,0.98072937944213492244;
719 BOOST_CHECK_MESSAGE (so3.distance(q1,
q2) > 0.,
720 "SO3 small distance - wrong results");
723 template<
typename LieGroupCollection>
731 template<
typename Derived>
738 template<
typename Derived>
742 BOOST_CHECK(lg.
nq() ==
nq(lg_generic));
743 BOOST_CHECK(lg.
nv() ==
nv(lg_generic));
745 BOOST_CHECK(lg.
name() ==
name(lg_generic));
753 TangentVector_t
v = TangentVector_t::Random(lg.
nv());
754 ConfigVector_t qout_ref(lg.
nq());
757 ConfigVectorGeneric qout(lg.
nq());
758 integrate(lg_generic, ConfigVectorGeneric(q0), TangentVectorGeneric(v), qout);
759 BOOST_CHECK(qout.isApprox(qout_ref));
761 ConfigVector_t
q1 (
nq(lg_generic));
766 ConfigVector_t
q2(
nq(lg_generic));
778 template<
typename Lg1,
typename Lg2>
782 BOOST_CHECK_EQUAL(LieGroupGeneric(lg1), LieGroupGeneric(lg2));
785 template<
typename Lg1,
typename Lg2>
789 BOOST_CHECK_PREDICATE( std::not_equal_to<LieGroupGeneric>(),
790 (LieGroupGeneric(lg1))(LieGroupGeneric(lg2)) );
803 BOOST_AUTO_TEST_SUITE_END ()
void operator()(const pinocchio::JointModelPrismaticUnaligned &) const
JointCollectionTpl const Eigen::MatrixBase< ConfigVectorType > const Eigen::MatrixBase< TangentVectorType > & v
Scalar distance(const ModelTpl< Scalar, Options, JointCollectionTpl > &model, const Eigen::MatrixBase< ConfigVectorIn1 > &q0, const Eigen::MatrixBase< ConfigVectorIn2 > &q1)
Distance between two configuration vectors, namely .
void test_liegroup_variant_not_equal(Lg1 lg1, Lg2 lg2)
JointModelPrismaticTpl< double, 0, 0 > JointModelPX
int nv(const JointModelTpl< Scalar, Options, JointCollectionTpl > &jmodel)
Visit a JointModelTpl through JointNvVisitor to get the dimension of the joint tangent space...
void operator()(const T) const
Eigen::Matrix< Scalar, NQ, 1, Options > ConfigVector_t
void setIndexes(JointIndex id, int q, int v)
JointDataDerived createData() const
int nq(const JointModelTpl< Scalar, Options, JointCollectionTpl > &jmodel)
Visit a JointModelTpl through JointNqVisitor to get the dimension of the joint configuration space...
void integrate(const ModelTpl< Scalar, Options, JointCollectionTpl > &model, const Eigen::MatrixBase< ConfigVectorType > &q, const Eigen::MatrixBase< TangentVectorType > &v, const Eigen::MatrixBase< ReturnType > &qout)
Integrate a configuration vector for the specified model for a tangent vector during one unit time...
void operator()(const pinocchio::JointModelRevoluteUnaligned &) const
void difference(const ModelTpl< Scalar, Options, JointCollectionTpl > &model, const Eigen::MatrixBase< ConfigVectorIn1 > &q0, const Eigen::MatrixBase< ConfigVectorIn2 > &q1, const Eigen::MatrixBase< ReturnType > &dvout)
Compute the tangent vector that must be integrated during one unit time to go from q0 to q1...
Scalar distance(const Eigen::MatrixBase< ConfigL_t > &q0, const Eigen::MatrixBase< ConfigR_t > &q1) const
Distance between two configurations of the joint.
JointModelRevoluteUnboundedTpl< double, 0, 1 > JointModelRUBY
LieGroupGeneric::TangentVector_t TangentVector_t
JointModelRevoluteUnalignedTpl< double > JointModelRevoluteUnaligned
JointModelPrismaticTpl< double, 0, 1 > JointModelPY
Eigen::Matrix< Scalar, NV, 1, Options > TangentVector_t
std::string name(const LieGroupGenericTpl< LieGroupCollection > &lg)
Visit a LieGroupVariant to get the name of it.
bool isNormalized(const ModelTpl< Scalar, Options, JointCollectionTpl > &model, const Eigen::MatrixBase< ConfigVectorType > &q, const Scalar &prec=Eigen::NumTraits< Scalar >::dummy_precision())
Check whether a configuration vector is normalized within the given precision provided by prec...
static void test(const LieGroupBase< Derived > &lg, const LieGroupGenericTpl< LieGroupCollection > &lg_generic)
void integrate(const Eigen::MatrixBase< ConfigIn_t > &q, const Eigen::MatrixBase< Tangent_t > &v, const Eigen::MatrixBase< ConfigOut_t > &qout) const
Integrate a joint's configuration with a tangent vector during one unit time duration.
LieGroupGeneric::ConfigVector_t ConfigVector_t
JointCollectionTpl const Eigen::MatrixBase< ConfigVectorType > & q
void test_liegroup_variant_equal(Lg1 lg1, Lg2 lg2)
void specificTests(const CartesianProductOperation< VectorSpaceOperationTpl< 3, Scalar, Options >, SpecialOrthogonalOperationTpl< 3, Scalar, Options > >) const
JointCollectionTpl const Eigen::MatrixBase< ConfigVectorIn1 > const Eigen::MatrixBase< ConfigVectorIn2 > const Scalar & u
JointModelRevoluteTpl< double, 0, 1 > JointModelRY
void random(const Eigen::MatrixBase< Config_t > &qout) const
Generate a random joint configuration, normalizing quaternions when necessary.
JointModelSphericalZYXTpl< double > JointModelSphericalZYX
Eigen::Quaternion< Scalar, Options > Quaternion
void operator()(const T) const
void specificTests(const T) const
JointModelRevoluteTpl< double, 0, 2 > JointModelRZ
BOOST_AUTO_TEST_CASE(test_all)
#define EIGEN_VECTOR_IS_APPROX(Va, Vb, precision)
JointCollectionTpl const Eigen::MatrixBase< ConfigVectorIn1 > const Eigen::MatrixBase< ConfigVectorIn2 > & q1
#define BOOST_TEST_MODULE
FCL_REAL dist(short i) const
void specificTests(const SpecialEuclideanOperationTpl< 3, Scalar, Options >) const
JointModelTranslationTpl< double > JointModelTranslation
Main pinocchio namespace.
JointModelSphericalTpl< double > JointModelSpherical
JointCollectionTpl const Eigen::MatrixBase< ConfigVectorIn1 > & q0
void neutral(const ModelTpl< Scalar, Options, JointCollectionTpl > &model, const Eigen::MatrixBase< ReturnType > &qout)
Return the neutral configuration element related to the model configuration space.
std::string name() const
Get name of instance.
bool isApprox(const Derived &other, const Scalar &prec=Eigen::NumTraits< Scalar >::dummy_precision()) const
void operator()(const T) const
JointModelPrismaticTpl< double, 0, 2 > JointModelPZ
void random(const LieGroupGenericTpl< LieGroupCollection > &lg, const Eigen::MatrixBase< Config_t > &qout)
#define EIGEN_MATRIX_IS_APPROX(Va, Vb, precision)
void operator()(const T) const
JointDataDerived createData() const
JointModelFreeFlyerTpl< double > JointModelFreeFlyer
void normalize(const ModelTpl< Scalar, Options, JointCollectionTpl > &model, const Eigen::MatrixBase< ConfigVectorType > &qout)
Normalize a configuration vector.
void test_lie_group_methods(T &jmodel, typename T::JointDataDerived &)
SE3Tpl< typename MotionDerived::Scalar, PINOCCHIO_EIGEN_PLAIN_TYPE(typename MotionDerived::Vector3)::Options > exp6(const MotionDense< MotionDerived > &nu)
Exp: se3 -> SE3.
LieGroupGenericTpl< LieGroupCollection > LieGroupGeneric
traits< SE3Tpl >::Matrix3 Matrix3
JointModelRevoluteUnboundedTpl< double, 0, 0 > JointModelRUBX
JointModelPrismaticUnalignedTpl< double > JointModelPrismaticUnaligned
Eigen::Matrix< Scalar, Eigen::Dynamic, 1 > VectorXd
JointModelRevoluteTpl< double, 0, 0 > JointModelRX
static SE3Tpl Interpolate(const SE3Tpl &A, const SE3Tpl &B, const OtherScalar &alpha)
Linear interpolation on the SE3 manifold.
ConfigVector_t neutral() const
Index nv() const
Get dimension of Lie Group tangent space.
JointModelPlanarTpl< double > JointModelPlanar
void operator()(const T) const
ConfigVector_t neutral() const
Get neutral element as a vector.