2 import pinocchio
as pin
5 from test_case
import PinocchioTestCase
10 self.
model = pin.buildSampleModelHumanoidRandom()
11 self.
joint_idx = self.model.getJointId(
"rarm2_joint")
if self.model.existJointName(
"rarm2_joint")
else (self.model.njoints-1)
13 self.
data = self.model.createData()
14 self.
q = pin.randomConfiguration(self.
model)
15 self.
v = np.random.rand((self.model.nv))
16 self.
a = np.random.rand((self.model.nv))
29 pin.computeForwardKinematicsDerivatives(model,data,q,v,a)
31 pin.getJointVelocityDerivatives(model,data,self.
joint_idx,pin.WORLD)
32 pin.getJointVelocityDerivatives(model,data,self.
joint_idx,pin.LOCAL)
33 pin.getJointVelocityDerivatives(model,data,self.
joint_idx,pin.LOCAL_WORLD_ALIGNED)
35 pin.getJointAccelerationDerivatives(model,data,self.
joint_idx,pin.WORLD)
36 pin.getJointAccelerationDerivatives(model,data,self.
joint_idx,pin.LOCAL)
37 pin.getJointAccelerationDerivatives(model,data,self.
joint_idx,pin.LOCAL_WORLD_ALIGNED)
39 if __name__ ==
'__main__':
def test_derivatives(self)