Go to the documentation of this file.
11 #include <boost/test/unit_test.hpp>
16 BOOST_AUTO_TEST_SUITE(BOOST_TEST_MODULE)
22 const string model_filename =
24 + std::string(
"/example-robot-data/robots/romeo_description/urdf/romeo_small.urdf");
28 + std::string(
"/example-robot-data/robots/romeo_description/srdf/romeo.srdf");
40 const size_t num_init_col_pairs =
geom_model.collisionPairs.size();
43 const size_t num_col_pairs =
geom_model.collisionPairs.size();
59 Eigen::VectorXd
q =
model.referenceConfigurations[
"half_sitting"];
60 Eigen::VectorXd
q2 =
model.referenceConfigurations[
"half_sitting2"];
70 const string urdf =
"<robot name='test'>"
71 "<link name='base_link'/>"
72 "<link name='child_link'/>"
73 "<joint type='revolute' name='joint'>"
74 " <parent link='base_link'/>"
75 " <child link='child_link'/>"
76 " <limit effort='30' velocity='1.0' />"
79 const string srdf =
"<robot name='test'>"
80 "<group_state name='reference' group='all'>"
81 " <joint name='joint' value='0.0' />"
88 std::istringstream iss(srdf);
91 Eigen::VectorXd
q =
model.referenceConfigurations[
"reference"];
92 Eigen::VectorXd qexpected(1);
100 const string urdf =
"<robot name='test'>"
101 "<link name='base_link'/>"
102 "<link name='child_link'/>"
103 "<joint type='continuous' name='joint'>"
104 " <parent link='base_link'/>"
105 " <child link='child_link'/>"
106 " <limit effort='30' velocity='1.0' />"
109 const string srdf =
"<robot name='test'>"
110 "<group_state name='reference' group='all'>"
111 " <joint name='joint' value='0.0' />"
118 std::istringstream iss(srdf);
121 Eigen::VectorXd
q =
model.referenceConfigurations[
"reference"];
122 Eigen::VectorXd qexpected(2);
144 BOOST_AUTO_TEST_SUITE_END()
BOOST_AUTO_TEST_CASE(test_removeCollisionPairs)
Model buildModel(const std::string &filename, const std::string &model_name)
Load a model from a Python script.
ModelTpl< Scalar, Options, JointCollectionTpl > & buildModelFromXML(const std::string &xml_stream, const typename ModelTpl< Scalar, Options, JointCollectionTpl >::JointModel &rootJoint, ModelTpl< Scalar, Options, JointCollectionTpl > &model, const bool verbose=false)
Build the model from an XML stream with a particular joint as root of the model tree inside the model...
GeometryModel & buildGeom(ModelTpl< Scalar, Options, JointCollectionTpl > &model, const std::string &filename, const GeometryType type, GeometryModel &geom_model, ::hpp::fcl::MeshLoaderPtr mesh_loader=::hpp::fcl::MeshLoaderPtr())
Build The GeometryModel from a Mjcf file.
JointCollectionTpl const Eigen::MatrixBase< ConfigVectorType > & q
bool loadRotorParameters(ModelTpl< Scalar, Options, JointCollectionTpl > &model, const std::string &filename, const bool verbose=false)
Load the rotor params of a given model associated to a SRDF file. It throws if the SRDF file is incor...
void loadReferenceConfigurations(ModelTpl< Scalar, Options, JointCollectionTpl > &model, const std::string &filename, const bool verbose=false)
Get the reference configurations of a given model associated to a SRDF file. It throws if the SRDF fi...
void loadReferenceConfigurationsFromXML(ModelTpl< Scalar, Options, JointCollectionTpl > &model, std::istream &xmlStream, const bool verbose=false)
Get the reference configurations of a given model associated to a SRDF file. It throws if the SRDF fi...
JointCollectionTpl & model
Main pinocchio namespace.
#define BOOST_CHECK(check)
#define PINOCCHIO_MODEL_DIR
void removeCollisionPairs(const ModelTpl< Scalar, Options, JointCollectionTpl > &model, GeometryModel &geom_model, const std::string &filename, const bool verbose=false)
Deactive all possible collision pairs mentioned in the SRDF file. It throws if the SRDF file is incor...
pinocchio
Author(s):
autogenerated on Sat Jun 22 2024 02:41:50