1 import pinocchio
as pin
6 model = pin.buildSampleModelHumanoidRandom()
7 data = model.createData()
11 model.lowerPositionLimit = -np.ones((model.nq,1))
12 model.upperPositionLimit = np.ones((model.nq,1))
14 q = pin.randomConfiguration(model)
15 v = np.random.rand(model.nv,1)
16 a = np.random.rand(model.nv,1)
20 pin.computeForwardKinematicsDerivatives(model,data,q,v,a)
24 joint_name =
"rleg6_joint" 25 joint_id = model.getJointId(joint_name)
29 (dv_dq,dv_dv) = pin.getJointVelocityDerivatives(model,data,joint_id,pin.ReferenceFrame.WORLD)
31 (dv_dq_local,dv_dv_local) = pin.getJointVelocityDerivatives(model,data,joint_id,pin.ReferenceFrame.LOCAL)
35 (dv_dq,da_dq,da_dv,da_da) = pin.getJointAccelerationDerivatives(model,data,joint_id,pin.ReferenceFrame.WORLD)
37 (dv_dq_local,da_dq_local,da_dv_local,da_da_local) = pin.getJointAccelerationDerivatives(model,data,joint_id,pin.ReferenceFrame.LOCAL)