Go to the documentation of this file.
14 #include <boost/test/unit_test.hpp>
19 template<
typename Jo
intModel_>
22 template<
typename Jo
intModel_>
25 static JointModel_
run()
28 jmodel.setIndexes(0, 0, 0);
33 template<
typename Scalar,
int Options>
41 JointModel jmodel(Vector3::Random().normalized());
48 template<
typename Scalar,
int Options>
56 JointModel jmodel(Vector3::Random().normalized());
63 template<
typename Scalar,
int Options>
71 JointModel jmodel(Vector3::Random().normalized());
78 template<
typename Scalar,
int Options,
template<
typename,
int>
class JointCollection>
93 template<
typename Scalar,
int Options,
template<
typename,
int>
class JointCollection>
105 jmodel.setIndexes(0, 0, 0);
110 template<
typename Jo
intModel_>
126 template<
typename Scalar,
int Options>
140 template<
typename Scalar,
int Options,
int axis>
154 template<
typename Scalar,
int Options>
162 JointModel jmodel(Vector3::Random().normalized());
169 BOOST_AUTO_TEST_SUITE(joint_model_base_test)
171 template<
typename TestDerived>
174 template<
typename Jo
intModel>
178 return TestDerived::test(jmodel);
184 template<
typename Jo
intModel>
188 BOOST_CHECK(jmodel_copy == jmodel.
derived());
191 BOOST_CHECK(jmodel_any != jmodel.
derived());
198 template<
typename Jo
intModel>
201 typedef typename JointModel::JointDataDerived
JointData;
203 Eigen::Matrix<typename JointModel::Scalar, 3, 1>
v = jdata.
M_accessor().translation();
204 Eigen::Matrix<typename JointModel::Scalar, 3, 3>
R = jdata.
M_accessor().rotation();
216 BOOST_CHECK(joint_revolutex != joint_revolutey);
223 BOOST_CHECK(jmodel_any != jmodelx);
236 template<
typename Jo
intModel>
240 BOOST_CHECK(jmodel == jmodel);
241 BOOST_CHECK(jmodel.template cast<Scalar>().
isEqual(jmodel));
242 BOOST_CHECK(jmodel.template cast<Scalar>() == jmodel);
244 jmodel.template cast<long double>().template cast<double>() == jmodel,
245 std::string(
"Error when casting " + jmodel.
shortname() +
" from long double to double."));
259 template<
typename Jo
intModel>
262 typedef typename JointModel::JointDataDerived
JointData;
264 std::cout <<
"shortname: " << jmodel.
shortname() << std::endl;
265 std::cout <<
"classname: " << jmodel.
classname() << std::endl;
266 std::cout <<
"disp:\n" << jmodel << std::endl;
270 std::cout <<
"shortname: " << jdata.
shortname() << std::endl;
271 std::cout <<
"classname: " << jdata.
classname() << std::endl;
272 std::cout <<
"disp:\n" << jdata << std::endl;
284 BOOST_AUTO_TEST_SUITE_END()
void setIndexes(JointIndex id, int q, int v)
JointDataDerived createData() const
pinocchio::JointModelPrismaticUnalignedTpl< Scalar, Options > JointModel
pinocchio::JointModelCompositeTpl< Scalar, Options, JointCollection > JointModel
void setIndexes(JointIndex id, int q, int v)
pinocchio::JointModelMimic< JointModel_ > JointModel
BOOST_AUTO_TEST_CASE(isEqual)
JointModelRevoluteTpl< context::Scalar, context::Options, 0 > JointModelRX
void setIndexes(JointIndex id, int q, int v)
bool isEqual(const JointModelBase< JointModelDerived > &other) const
NewScalar cast(const Scalar &value)
JointModelDerived & addJoint(const JointModelBase< JointModel > &jmodel, const SE3 &placement=SE3::Identity())
Add a joint to the vector of joints.
static Eigen::Matrix< Scalar, 3, 1 > vector()
JointModelRevoluteTpl< context::Scalar, context::Options, 1 > JointModelRY
void setIndexes(JointIndex id, int nq, int nv)
static std::string classname()
void setIndexes(JointIndex id, int q, int v)
pinocchio::JointModelHelicalUnalignedTpl< Scalar, Options > JointModel
void operator()(const pinocchio::JointModelBase< JointModel > &) const
JointDataTpl< context::Scalar > JointData
static void test(const JointModelBase< JointModel > &jmodel)
Eigen::Matrix< Scalar, 3, 1, _Options > Vector3
static std::string classname()
JointCollectionDefault::JointModelVariant JointModelVariant
Eigen::Matrix< Scalar, 3, 1, Options > Vector3
std::string shortname() const
pinocchio::JointModelRevoluteUnboundedUnalignedTpl< Scalar, Options > JointModel
pinocchio::JointModelHelicalTpl< Scalar, Options, axis > JointModel
Eigen::Matrix< Scalar, 3, 1, _Options > Vector3
pinocchio::JointModelTpl< Scalar, Options, JointCollection > JointModel
pinocchio::JointModelUniversalTpl< Scalar, Options > JointModel
Eigen::Matrix< Scalar, 3, 1, Options > Vector3
JointModelTpl< context::Scalar > JointModel
pinocchio::JointModelRevoluteUnalignedTpl< Scalar, Options > JointModel
void setIndexes(JointIndex id, int q, int v)
JointCollectionTpl const Eigen::MatrixBase< ConfigVectorType > const Eigen::MatrixBase< TangentVectorType > & v
static void test(const JointModelBase< JointModel > &jmodel)
bool isEqual(const ConstraintDataTpl< Scalar, Options, ConstraintCollectionTpl > &cdata_generic, const ConstraintDataBase< ConstraintDataDerived > &cdata)
static void test(const JointModelBase< JointModel > &jmodel)
Eigen::Matrix< Scalar, 3, 1, _Options > Vector3
void setIndexes(JointIndex id, int q, int v)
std::string shortname() const
void setIndexes(JointIndex id, int q, int v)
boost::variant< JointModelRX, JointModelRY, JointModelRZ, JointModelMimicRX, JointModelMimicRY, JointModelMimicRZ, JointModelFreeFlyer, JointModelPlanar, JointModelRevoluteUnaligned, JointModelSpherical, JointModelSphericalZYX, JointModelPX, JointModelPY, JointModelPZ, JointModelPrismaticUnaligned, JointModelTranslation, JointModelRUBX, JointModelRUBY, JointModelRUBZ, JointModelRevoluteUnboundedUnaligned, JointModelHx, JointModelHy, JointModelHz, JointModelHelicalUnaligned, JointModelUniversal, boost::recursive_wrapper< JointModelComposite > > JointModelVariant
bool isEqual(const JointModelBase< OtherDerived > &) const
JointModelDerived & derived()
Transformation_t M_accessor() const
Main pinocchio namespace.
pinocchio
Author(s):
autogenerated on Fri Nov 1 2024 02:41:38