2 import pinocchio
as pin
5 from test_case
import PinocchioTestCase
10 self.
model = pin.buildSampleModelHumanoidRandom()
11 self.
parent_idx = self.model.getJointId(
"rarm2_joint")
if self.model.existJointName(
"rarm2_joint")
else (self.model.njoints-1)
18 self.
data = self.model.createData()
19 self.
q = pin.randomConfiguration(self.
model)
20 self.
v = np.random.rand((self.model.nv))
21 self.
a = np.random.rand((self.model.nv))
34 pin.computeForwardKinematicsDerivatives(model,data,q,v,a)
36 pin.getFrameVelocityDerivatives(model,data,self.
frame_idx,pin.WORLD)
37 pin.getFrameVelocityDerivatives(model,data,self.
frame_idx,pin.LOCAL)
38 pin.getFrameVelocityDerivatives(model,data,self.
frame_idx,pin.LOCAL_WORLD_ALIGNED)
40 pin.getFrameAccelerationDerivatives(model,data,self.
frame_idx,pin.WORLD)
41 pin.getFrameAccelerationDerivatives(model,data,self.
frame_idx,pin.LOCAL)
42 pin.getFrameAccelerationDerivatives(model,data,self.
frame_idx,pin.LOCAL_WORLD_ALIGNED)
44 if __name__ ==
'__main__':
def test_derivatives(self)