Dynamics: screws.dynamics¶
Dynamics of open chains: Newton-Euler inverse dynamics and what is built from it. MR chapter 8.
Portions derived from the Modern Robotics code library, Copyright (c) 2018 Huan Weng, Bill Hunt, Jarvis Schultz, Mikhail Todes (MIT).
ad ¶
ad(V)
[ad_V], the 6x6 matrix of the Lie bracket: [V1, V2] = [ad_V1] V2.
MR 8.2.2, eq. 8.39; notes 8.2.
Source code in screws/dynamics.py
28 29 30 31 32 33 34 35 36 37 38 39 | |
inverse_dynamics ¶
inverse_dynamics(
theta,
dtheta,
ddtheta,
g,
F_tip,
link_frames,
link_inertias,
S,
)
Joint forces/torques tau = M(theta) ddtheta + c(theta, dtheta) + g(theta) + J^T F_tip.
Newton-Euler forward and backward iterations. link_frames are MR's M_{i-1,i} (n + 1 of them, the last carrying frame {n} to {b}); link_inertias are the spatial inertias G_i in frame {i}; S the space-frame screw axes at home; F_tip the wrench on the end-effector in {n+1} (None means zero). MR 8.3.2, algorithm on p. 296; notes 8.3.
Source code in screws/dynamics.py
54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 | |
mass_matrix ¶
mass_matrix(theta, link_frames, link_inertias, S)
M(theta), one inverse-dynamics call per unit joint acceleration. MR 8.3.3; notes 8.3.
Source code in screws/dynamics.py
88 89 90 91 92 93 94 95 96 97 | |
velocity_quadratic_forces ¶
velocity_quadratic_forces(
theta, dtheta, link_frames, link_inertias, S
)
c(theta, dtheta), the Coriolis and centripetal joint forces. MR 8.3.3; notes 8.3.
Source code in screws/dynamics.py
100 101 102 103 | |
gravity_forces ¶
gravity_forces(theta, g, link_frames, link_inertias, S)
g(theta), the joint forces that hold the chain against gravity g. MR 8.3.3; notes 8.3.
Source code in screws/dynamics.py
106 107 108 109 | |
end_effector_forces ¶
end_effector_forces(
theta, F_tip, link_frames, link_inertias, S
)
J^T(theta) F_tip, the joint forces that create the end-effector wrench alone. MR 8.3.3.
Source code in screws/dynamics.py
112 113 114 115 | |
forward_dynamics ¶
forward_dynamics(
theta,
dtheta,
tau,
g,
F_tip,
link_frames,
link_inertias,
S,
)
ddtheta = M(theta)^{-1} (tau - c - g - J^T F_tip). MR 8.5; notes 8.5.
Source code in screws/dynamics.py
118 119 120 121 122 123 124 125 126 127 | |
euler_step ¶
euler_step(theta, dtheta, ddtheta, dt)
One first-order Euler step: (theta + dt dtheta, dtheta + dt ddtheta). MR 8.5.
Source code in screws/dynamics.py
130 131 132 133 | |
inverse_dynamics_trajectory ¶
inverse_dynamics_trajectory(
theta_mat,
dtheta_mat,
ddtheta_mat,
g,
F_tip_mat,
link_frames,
link_inertias,
S,
)
tau along a trajectory: N x n rows of joint values in, N x n rows of joint forces out.
F_tip_mat is N x 6 (or None for no tip wrench). MR 8.5; notes 8.5.
Source code in screws/dynamics.py
136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 | |
forward_dynamics_trajectory ¶
forward_dynamics_trajectory(
theta,
dtheta,
tau_mat,
g,
F_tip_mat,
link_frames,
link_inertias,
S,
dt,
int_res,
)
Simulate an open-loop force history: N x n tau_mat in, (N x n theta, N x n dtheta) out.
dt is the time between rows; int_res Euler substeps are taken between rows. MR 8.5.
Source code in screws/dynamics.py
154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 | |