Go to the documentation of this file.
15 #include <boost/test/unit_test.hpp>
16 #include <boost/variant.hpp>
20 toFull(
const Eigen::VectorXd & vec,
int mimPrim,
int mimSec,
double scaling,
double offset)
22 Eigen::VectorXd vecFull(
vec.size() + 1);
23 vecFull <<
vec.head(mimSec), scaling *
vec[mimPrim] + offset,
vec.tail(
vec.size() - mimSec);
29 Eigen::MatrixXd
G = Eigen::MatrixXd::Zero(
model.nv, modelMimic.
nv);
30 for (
int i = 0;
i < modelMimic.
nv; ++
i)
36 BOOST_AUTO_TEST_SUITE(BOOST_TEST_MODULE)
43 BOOST_CHECK(
model.nq == 33);
44 BOOST_CHECK(
model.nv == 32);
49 BOOST_CHECK(modelff.
nq == 32);
50 BOOST_CHECK(modelff.
nv == 32);
55 BOOST_CHECK(modelMimic.
nq == 32);
56 BOOST_CHECK(modelMimic.
nv == 31);
61 BOOST_CHECK(modelMimicff.
nq == 31);
62 BOOST_CHECK(modelMimicff.
nv == 31);
70 BOOST_CHECK(
model.nq == 6);
71 BOOST_CHECK(
model.nv == 6);
76 BOOST_CHECK(model_m.
nq == 5);
77 BOOST_CHECK(model_m.
nv == 5);
79 #ifdef PINOCCHIO_WITH_HPP_FCL
82 pinocchio::buildModels::manipulatorGeometries(
model, geom);
92 BOOST_CHECK(
model.nq == 35);
93 BOOST_CHECK(
model.nv == 34);
95 #ifdef PINOCCHIO_WITH_HPP_FCL
97 pinocchio::buildModels::humanoidGeometries(
model, geom);
109 BOOST_AUTO_TEST_SUITE_END()
void manipulator(ModelTpl< Scalar, Options, JointCollectionTpl > &model, const bool mimic=false)
Create a 6-DOF kinematic chain shoulder-elbow-wrist.
void forwardKinematics(const ModelTpl< Scalar, Options, JointCollectionTpl > &model, DataTpl< Scalar, Options, JointCollectionTpl > &data, const Eigen::MatrixBase< ConfigVectorType > &q)
Update the joint placements according to the current joint configuration.
void updateGeometryPlacements(const ModelTpl< Scalar, Options, JointCollectionTpl > &model, DataTpl< Scalar, Options, JointCollectionTpl > &data, const GeometryModel &geom_model, GeometryData &geom_data, const Eigen::MatrixBase< ConfigVectorType > &q)
Apply a forward kinematics and update the placement of the geometry objects.
void humanoidRandom(ModelTpl< Scalar, Options, JointCollectionTpl > &model, bool usingFF=true, bool mimic=false)
Create a humanoid kinematic tree with 6-DOF limbs and random joint placements.
Eigen::VectorXd toFull(const Eigen::VectorXd &vec, int mimPrim, int mimSec, double scaling, double offset)
void humanoid(ModelTpl< Scalar, Options, JointCollectionTpl > &model, bool usingFF=true)
Create a 28-DOF kinematic chain of a floating humanoid robot.
int nv
Dimension of the velocity vector space.
BOOST_AUTO_TEST_CASE(build_model_sample_humanoid_random)
void neutral(const ModelTpl< Scalar, Options, JointCollectionTpl > &model, const Eigen::MatrixBase< ReturnType > &qout)
Return the neutral configuration element related to the model configuration space.
int nq
Dimension of the configuration vector representation.
Eigen::MatrixXd create_G(const pinocchio::Model &model, const pinocchio::Model &modelMimic)
pinocchio
Author(s):
autogenerated on Thu Apr 10 2025 02:42:21