Go to the documentation of this file.
11 #include <boost/test/unit_test.hpp>
12 #include <boost/utility/binary.hpp>
14 BOOST_AUTO_TEST_SUITE(BOOST_TEST_MODULE)
18 using namespace Eigen;
26 model.lowerPositionLimit.head<3>().
fill(-1.);
27 model.upperPositionLimit.head<3>().
fill(1.);
29 VectorXd
vq(VectorXd::Random(
model.nv));
30 VectorXd
aq(VectorXd::Random(
model.nv));
34 const Eigen::Vector3d vcom0 = data_ref.vcom[0];
35 const double alpha = 1e-8;
36 Eigen::VectorXd
dq = VectorXd::Zero(
model.nv);
39 for (
int k = 0; k <
model.nv; ++k)
43 dvcom_dqn.col(k) = (data_ref.vcom[0] - vcom0) /
alpha;
55 BOOST_CHECK(dvcom_dq.isApprox(dvcom_dqn, sqrt(
alpha)));
66 BOOST_CHECK(dvcom_dq.isApprox(dvcom_dqn, sqrt(
alpha)));
70 BOOST_AUTO_TEST_SUITE_END()
void randomConfiguration(const ModelTpl< Scalar, Options, JointCollectionTpl > &model, const Eigen::MatrixBase< ConfigVectorIn1 > &lowerLimits, const Eigen::MatrixBase< ConfigVectorIn2 > &upperLimits, const Eigen::MatrixBase< ReturnType > &qout)
Generate a configuration vector uniformly sampled among provided limits.
Eigen::Matrix< Scalar, 3, Eigen::Dynamic, Options > Matrix3x
The 3d jacobian type (temporary)
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 getCenterOfMassVelocityDerivatives(const ModelTpl< Scalar, Options, JointCollectionTpl > &model, DataTpl< Scalar, Options, JointCollectionTpl > &data, const Eigen::MatrixBase< Matrix3xOut > &vcom_partial_dq)
Computes the partial derivatie of the center-of-mass velocity with respect to the joint configuration...
void humanoid(ModelTpl< Scalar, Options, JointCollectionTpl > &model, bool usingFF=true)
Create a 28-DOF kinematic chain of a floating humanoid robot.
BOOST_AUTO_TEST_CASE(test_kinematics_derivatives_vcom)
void computeAllTerms(const ModelTpl< Scalar, Options, JointCollectionTpl > &model, DataTpl< Scalar, Options, JointCollectionTpl > &data, const Eigen::MatrixBase< ConfigVectorType > &q, const Eigen::MatrixBase< TangentVectorType > &v)
Computes efficiently all the terms needed for dynamic simulation. It is equivalent to the call at the...
Main pinocchio namespace.
const DataTpl< Scalar, Options, JointCollectionTpl >::Vector3 & centerOfMass(const ModelTpl< Scalar, Options, JointCollectionTpl > &model, DataTpl< Scalar, Options, JointCollectionTpl > &data, const Eigen::MatrixBase< ConfigVectorType > &q, const bool computeSubtreeComs=true)
Computes the center of mass position of a given model according to a particular joint configuration....
pinocchio
Author(s):
autogenerated on Thu Dec 19 2024 03:41:26