2 import pinocchio
as pin
5 from test_case
import PinocchioTestCase
10 self.
model = pin.buildSampleModelHumanoidRandom()
15 q = pin.randomConfiguration(self.
model)
16 v = np.random.rand(self.
model.nv)
17 a = np.random.rand(self.
model.nv)
18 pin.forwardKinematics(self.
model, data, q, v, a)
24 v = pin.getVelocity(self.
model, data, self.
joint_idx, pin.ReferenceFrame.LOCAL)
26 v = pin.getVelocity(self.
model, data, self.
joint_idx, pin.ReferenceFrame.WORLD)
28 v = pin.getVelocity(self.
model, data, self.
joint_idx, pin.ReferenceFrame.LOCAL_WORLD_ALIGNED)
33 a = pin.getAcceleration(self.
model, data, self.
joint_idx, pin.ReferenceFrame.LOCAL)
35 a = pin.getAcceleration(self.
model, data, self.
joint_idx, pin.ReferenceFrame.WORLD)
37 a = pin.getAcceleration(self.
model, data, self.
joint_idx, pin.ReferenceFrame.LOCAL_WORLD_ALIGNED)
41 a = pin.getClassicalAcceleration(self.
model, data, self.
joint_idx, pin.ReferenceFrame.LOCAL)
42 a = pin.getClassicalAcceleration(self.
model, data, self.
joint_idx, pin.ReferenceFrame.WORLD)
43 a = pin.getClassicalAcceleration(self.
model, data, self.
joint_idx, pin.ReferenceFrame.LOCAL_WORLD_ALIGNED)
45 if __name__ ==
'__main__':
JointDataTpl< Scalar, Options, JointCollectionTpl > createData(const JointModelTpl< Scalar, Options, JointCollectionTpl > &jmodel)
Visit a JointModelTpl through CreateData visitor to create a JointDataTpl.
def assertApprox(self, a, b, eps=1e-6)
static void act(const Eigen::MatrixBase< Mat > &iV, const ForceDense< ForceDerived > &f, Eigen::MatrixBase< MatRet > const &jF)
Action of a motion set on a force object. The input motion set is represented by a 6xN matrix whose e...