4 import pinocchio
as pin
5 from test_case
import PinocchioTestCase
10 self.
model = pin.buildSampleModelHumanoidRandom()
12 self.
model.getJointId(
"rarm2_joint")
13 if self.
model.existJointName(
"rarm2_joint")
14 else (self.
model.njoints - 1)
18 self.
q = pin.randomConfiguration(self.
model)
19 self.
v = np.random.rand(self.
model.nv)
20 self.
a = np.random.rand(self.
model.nv)
33 pin.computeForwardKinematicsDerivatives(model, data, q, v, a)
35 pin.getJointVelocityDerivatives(model, data, self.
joint_idx, pin.WORLD)
36 pin.getJointVelocityDerivatives(model, data, self.
joint_idx, pin.LOCAL)
37 pin.getJointVelocityDerivatives(
38 model, data, self.
joint_idx, pin.LOCAL_WORLD_ALIGNED
41 pin.getJointAccelerationDerivatives(model, data, self.
joint_idx, pin.WORLD)
42 pin.getJointAccelerationDerivatives(model, data, self.
joint_idx, pin.LOCAL)
43 pin.getJointAccelerationDerivatives(
44 model, data, self.
joint_idx, pin.LOCAL_WORLD_ALIGNED
48 if __name__ ==
"__main__":