Go to the documentation of this file.
2 from pathlib
import Path
4 import pinocchio
as pin
5 from test_case
import PinocchioTestCase
as TestCase
10 self.
model = pin.buildSampleModelHumanoidRandom(
True,
True)
17 jointId = self.
model.njoints - 1
18 self.assertNotEqual(self.
data.oMi[jointId], data2.oMi[jointId])
21 self.assertEqual(data2.oMi[jointId], data3.oMi[jointId])
30 _com_list = data.com.tolist()
32 with self.assertRaises(Exception)
as context:
33 com = data.com[len(data.com) + 10]
36 self.assertTrue(
"Index out of range" in str(context.exception))
38 with self.assertRaises(Exception)
as context:
42 self.assertTrue(
"Invalid index type" in str(context.exception))
48 filename = Path(
"data.pickle")
49 with filename.open(
"wb")
as f:
52 with filename.open(
"rb")
as f:
53 data_copy = pickle.load(f)
55 self.assertTrue(data == data_copy)
58 if __name__ ==
"__main__":
void forwardKinematics(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)
Update the joint placements, spatial velocities and spatial accelerations according to the current jo...
ConstraintDataTpl< Scalar, Options, ConstraintCollectionTpl > createData(const ConstraintModelTpl< Scalar, Options, ConstraintCollectionTpl > &cmodel)
Eigen::Matrix< typename LieGroupCollection::Scalar, Eigen::Dynamic, 1, LieGroupCollection::Options > neutral(const LieGroupGenericTpl< LieGroupCollection > &lg)
Visit a LieGroupVariant to get the neutral element of it.
const DataTpl< Scalar, Options, JointCollectionTpl >::Vector3 & centerOfMass(const ModelTpl< Scalar, Options, JointCollectionTpl > &model, DataTpl< Scalar, Options, JointCollectionTpl > &data, const bool computeSubtreeComs=true)
Computes the center of mass position, velocity and acceleration of a given model according to the cur...
def test_std_vector_field(self)
void copy(const ModelTpl< Scalar, Options, JointCollectionTpl > &model, const DataTpl< Scalar, Options, JointCollectionTpl > &origin, DataTpl< Scalar, Options, JointCollectionTpl > &dest, KinematicLevel kinematic_level)
Copy part of the data from origin to dest. Template parameter can be used to select at which differen...
pinocchio
Author(s):
autogenerated on Wed May 28 2025 02:41:14