2 import pinocchio
as pin
5 @unittest.skipUnless(pin.WITH_HPP_FCL,
"Needs HPP-FCL")
9 self.
model = pin.buildSampleModelHumanoid()
14 self.assertTrue(col.name ==
'rleg_shoulder_object')
15 col.name =
'new_collision_name' 16 self.assertTrue(col.name ==
'new_collision_name')
20 self.assertTrue(col.parentJoint == 2)
22 self.assertTrue(col.parentJoint == 3)
25 m = pin.SE3.Identity()
26 new_m = pin.SE3.Random()
28 self.assertTrue(np.allclose(col.placement.homogeneous,m.homogeneous))
30 self.assertTrue(np.allclose(col.placement.homogeneous , new_m.homogeneous))
34 self.assertTrue(col.meshPath
is not None)
37 scale = np.array([1.,2.,3.])
40 self.assertTrue(obj.meshScale[0] == scale[0])
41 self.assertTrue(obj.meshScale[1] == scale[1])
42 self.assertTrue(obj.meshScale[2] == scale[2])
46 vec = np.array([scale]*3)
49 self.assertTrue(np.allclose(obj.meshScale, vec))
61 self.assertTrue(self.
model.check(data_2))
62 self.assertEqual(len(collision_data_2.oMg), self.
collision_model.ngeoms)
66 self.assertEqual(self.
collision_model.ngeoms,collision_model_copy.ngeoms)
69 collision_data_copy = collision_data.copy()
70 self.assertEqual(len(collision_data.oMg),len(collision_data_copy.oMg))
72 if __name__ ==
'__main__':
JointDataTpl< Scalar, Options, JointCollectionTpl > createData(const JointModelTpl< Scalar, Options, JointCollectionTpl > &jmodel)
Visit a JointModelTpl through CreateData visitor to create a JointDataTpl.
def test_create_data(self)
def test_parent_get_set(self)
def test_name_get_set(self)
def test_placement_get_set(self)
def test_create_datas(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...
def test_meshpath_get(self)
def test_scalar_scale(self)