xm.py
Go to the documentation of this file.
1 #
2 # Copyright (c) 2016 CNRS
3 #
4 
5 import pinocchio as pin
6 from pinocchio.robot_wrapper import RobotWrapper
7 from pinocchio.utils import *
8 from dcrba import *
9 
10 np.random.seed(0)
11 
12 robot = RobotWrapper('/home/nmansard/src/pinocchio/pinocchio/models/romeo/urdf/romeo.urdf',
13  [ '/home/nmansard/src/pinocchio/pinocchio/models/romeo/', ],
14  pin.JointModelFreeFlyer()
15  )
16 q = rand(robot.model.nq); q[3:7] /= norm(q[3:7])
17 vq = rand(robot.model.nv)
18 aq = rand(robot.model.nv)
19 
20 # d/dq M(q)
21 dcrba = DCRBA(robot)
22 dcrba.pre(q)
23 Mp = dcrba()
24 
25 # d/dvq RNEA(q,vq) = C(q,vq)
26 coriolis = Coriolis(robot)
27 C = coriolis(q,vq)
28 
29 # d/dq RNEA(q,vq,aq)
30 drnea = DRNEA(robot)
31 aq = rand(robot.model.nv)
32 R = drnea(q,vq,aq)
33 
34 
Definition: dcrba.py:1
coriolis
Definition: xm.py:26
drnea
Definition: xm.py:30


pinocchio
Author(s):
autogenerated on Fri Jun 23 2023 02:38:33