bindings_joints.py
Go to the documentation of this file.
1 import unittest
2 import pinocchio as pin
3 import numpy as np
4 
5 joint_types = [
6  pin.JointModelRX, pin.JointModelRY, pin.JointModelRZ,
7  pin.JointModelPX, pin.JointModelPY, pin.JointModelPZ,
8  pin.JointModelFreeFlyer, pin.JointModelSpherical, pin.JointModelSphericalZYX,
9  pin.JointModelPlanar, pin.JointModelTranslation
10 ]
11 
12 class TestJoints(unittest.TestCase):
13 
15  for joint_type in joint_types:
16 
17  j = joint_type()
18  joint_model = pin.JointModel(j)
19 
20  self.assertTrue(j == joint_type())
21  self.assertTrue(j == joint_model)
22 
23  j.setIndexes(0,0,0)
24  self.assertFalse(j == joint_model)
25  self.assertTrue(j != joint_model)
26 
27 if __name__ == '__main__':
28  unittest.main()


pinocchio
Author(s):
autogenerated on Tue Jun 1 2021 02:45:02