Go to the documentation of this file.
   16 #include <casadi/casadi.hpp> 
   19 #include <boost/test/unit_test.hpp> 
   20 #include <boost/utility/binary.hpp> 
   22 BOOST_AUTO_TEST_SUITE(BOOST_TEST_MODULE)
 
   34   model.lowerPositionLimit.head<3>().
fill(-1.);
 
   35   model.upperPositionLimit.head<3>().
fill(1.);
 
   40   TangentVector 
v(TangentVector::Random(
model.nv));
 
   41   TangentVector 
tau(TangentVector::Random(
model.nv));
 
   45   data.Minv.triangularView<Eigen::StrictlyLower>() =
 
   46     data.Minv.transpose().triangularView<Eigen::StrictlyLower>();
 
   52   ad_casadi.evalFunction(
q, 
v, 
tau);
 
   54   BOOST_CHECK(ad_casadi.ddq.isApprox(
data.ddq));
 
   55   BOOST_CHECK(ad_casadi.ddq_dq.isApprox(
data.ddq_dq));
 
   56   BOOST_CHECK(ad_casadi.ddq_dv.isApprox(
data.ddq_dv));
 
   57   BOOST_CHECK(ad_casadi.ddq_dtau.isApprox(
data.Minv));
 
   60 BOOST_AUTO_TEST_SUITE_END()
 
  
const DataTpl< Scalar, Options, JointCollectionTpl >::TangentVectorType & aba(const ModelTpl< Scalar, Options, JointCollectionTpl > &model, DataTpl< Scalar, Options, JointCollectionTpl > &data, const Eigen::MatrixBase< ConfigVectorType > &q, const Eigen::MatrixBase< TangentVectorType1 > &v, const Eigen::MatrixBase< TangentVectorType2 > &tau, const Convention convention=Convention::LOCAL)
The Articulated-Body algorithm. It computes the forward dynamics, aka the joint accelerations given t...
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.
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.
VectorXs TangentVectorType
Dense vectorized version of a joint tangent vector (e.g. velocity, acceleration, etc)....
BOOST_AUTO_TEST_CASE(test_aba_derivatives_casadi_algo)
void computeABADerivatives(const ModelTpl< Scalar, Options, JointCollectionTpl > &model, DataTpl< Scalar, Options, JointCollectionTpl > &data, const Eigen::MatrixBase< ConfigVectorType > &q, const Eigen::MatrixBase< TangentVectorType1 > &v, const Eigen::MatrixBase< TangentVectorType2 > &tau, const Eigen::MatrixBase< MatrixType1 > &aba_partial_dq, const Eigen::MatrixBase< MatrixType2 > &aba_partial_dv, const Eigen::MatrixBase< MatrixType3 > &aba_partial_dtau)
The derivatives of the Articulated-Body algorithm.
VectorXs ConfigVectorType
Dense vectorized version of a joint configuration vector.
pinocchio::ModelTpl< Scalar > Model
pinocchio
Author(s): 
autogenerated on Wed May 28 2025 02:41:14