bindings
python
pinocchio
derivative
xm.py
Go to the documentation of this file.
1
#
2
# Copyright (c) 2016 CNRS
3
#
4
5
import
numpy
as
np
6
import
pinocchio
as
pin
7
from
dcrba
import
DCRBA, DRNEA, Coriolis
8
from
numpy.linalg
import
norm
9
from
pinocchio.robot_wrapper
import
RobotWrapper
10
from
pinocchio.utils
import
rand
11
12
np.random.seed(0)
13
14
robot =
RobotWrapper
(
15
"/home/nmansard/src/pinocchio/pinocchio/models/romeo/urdf/romeo.urdf"
,
16
[
17
"/home/nmansard/src/pinocchio/pinocchio/models/romeo/"
,
18
],
19
pin.JointModelFreeFlyer(),
20
)
21
q =
rand
(robot.model.nq)
22
q[3:7] /= norm(q[3:7])
23
vq =
rand
(robot.model.nv)
24
aq =
rand
(robot.model.nv)
25
26
# d/dq M(q)
27
dcrba =
DCRBA
(robot)
28
dcrba.pre(q)
29
Mp =
dcrba
()
30
31
# d/dvq RNEA(q,vq) = C(q,vq)
32
coriolis =
Coriolis
(robot)
33
C =
coriolis
(q, vq)
34
35
# d/dq RNEA(q,vq,aq)
36
drnea =
DRNEA
(robot)
37
aq =
rand
(robot.model.nv)
38
R =
drnea
(q, vq, aq)
pinocchio.robot_wrapper.RobotWrapper
Definition:
bindings/python/pinocchio/robot_wrapper.py:15
dcrba.DCRBA
Definition:
dcrba.py:59
dcrba.Coriolis
Definition:
dcrba.py:244
xm.drnea
drnea
Definition:
xm.py:36
dcrba
Definition:
dcrba.py:1
pinocchio.utils
Definition:
bindings/python/pinocchio/utils.py:1
xm.coriolis
coriolis
Definition:
xm.py:32
pinocchio.robot_wrapper
Definition:
bindings/python/pinocchio/robot_wrapper.py:1
dcrba.DRNEA
Definition:
dcrba.py:321
pinocchio.utils.rand
def rand(n)
Definition:
bindings/python/pinocchio/utils.py:41
pinocchio
Author(s):
autogenerated on Sun Dec 22 2024 03:41:13