bindings_kinematic_regressor.py
Go to the documentation of this file.
1 import unittest
2 from test_case import PinocchioTestCase as TestCase
3 import pinocchio as pin
4 
6 
7  def test_all(self):
8  model = pin.buildSampleModelHumanoidRandom()
9 
10  joint_name = "larm6_joint"
11  joint_id = model.getJointId(joint_name)
12  frame_id = model.addBodyFrame("test_body", joint_id, pin.SE3.Identity(), -1)
13 
14  data = model.createData()
15 
16  model.lowerPositionLimit[:7] = -1.
17  model.upperPositionLimit[:7] = 1.
18 
19  q = pin.randomConfiguration(model)
20  pin.forwardKinematics(model,data,q)
21 
22  R1 = pin.computeJointKinematicRegressor(model,data,joint_id,pin.ReferenceFrame.LOCAL,pin.SE3.Identity())
23  R2 = pin.computeJointKinematicRegressor(model,data,joint_id,pin.ReferenceFrame.LOCAL)
24 
25  self.assertApprox(R1,R2)
26 
27  R3 = pin.computeFrameKinematicRegressor(model,data,frame_id,pin.ReferenceFrame.LOCAL)
28  self.assertApprox(R1,R3)
29 
30 if __name__ == '__main__':
31  unittest.main()
32 


pinocchio
Author(s):
autogenerated on Fri Jun 23 2023 02:38:28