Go to the documentation of this file.
    4 import pinocchio 
as pin
 
    5 from test_case 
import PinocchioTestCase 
as TestCase
 
   10         self.
model = pin.buildSampleModelHumanoidRandom()
 
   13         qmax = np.full((self.
model.nq, 1), np.pi)
 
   15         self.
v = np.random.rand(self.
model.nv)
 
   16         self.
a = np.random.rand(self.
model.nv)
 
   19         for _ 
in range(self.
model.njoints):
 
   25         self.assertTrue(len(res) == 3)
 
   30         self.assertApprox(self.
data.ddq, data2.ddq)
 
   37         self.assertTrue(len(res) == 3)
 
   41         self.assertApprox(self.
data.ddq, data2.ddq)
 
   48             self.
model, data2, self.
q, self.
v * 0, self.
a * 0
 
   51         self.assertApprox(res, ref)
 
   60             self.
model, data2, self.
q, self.
v * 0, self.
a * 0, self.
fext 
   63         self.assertApprox(res, ref)
 
   66 if __name__ == 
"__main__":
 
  
void randomConfiguration(const LieGroupGenericTpl< LieGroupCollection > &lg, const Eigen::MatrixBase< ConfigL_t > &q0, const Eigen::MatrixBase< ConfigR_t > &q1, const Eigen::MatrixBase< ConfigOut_t > &qout)
def test_generalized_gravity_derivatives(self)
void computeStaticTorqueDerivatives(const ModelTpl< Scalar, Options, JointCollectionTpl > &model, DataTpl< Scalar, Options, JointCollectionTpl > &data, const Eigen::MatrixBase< ConfigVectorType > &q, const container::aligned_vector< ForceTpl< Scalar, Options >> &fext, const Eigen::MatrixBase< ReturnMatrixType > &static_torque_partial_dq)
Computes the partial derivative of the generalized gravity and external forces contributions (a....
const DataTpl< Scalar, Options, JointCollectionTpl >::TangentVectorType & rnea(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 > &a, const container::aligned_vector< ForceDerived > &fext)
The Recursive Newton-Euler algorithm. It computes the inverse dynamics, aka the joint torques accordi...
def test_rnea_derivatives(self)
void computeGeneralizedGravityDerivatives(const ModelTpl< Scalar, Options, JointCollectionTpl > &model, DataTpl< Scalar, Options, JointCollectionTpl > &data, const Eigen::MatrixBase< ConfigVectorType > &q, const Eigen::MatrixBase< ReturnMatrixType > &gravity_partial_dq)
Computes the partial derivative of the generalized gravity contribution with respect to the joint con...
ConstraintDataTpl< Scalar, Options, ConstraintCollectionTpl > createData(const ConstraintModelTpl< Scalar, Options, ConstraintCollectionTpl > &cmodel)
void computeRNEADerivatives(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 > &a, const container::aligned_vector< ForceTpl< Scalar, Options >> &fext)
Computes the derivatives of the Recursive Newton Euler Algorithms with respect to the joint configura...
result_of::push_front< V const, T >::type append(T const &t, V const &v)
Append the element T at the front of boost fusion vector V.
def test_static_torque_derivatives(self)
pinocchio
Author(s): 
autogenerated on Wed May 28 2025 02:41:14