@@ -1256,21 +1256,23 @@ def accel_x(
12561256 :returns: Operational space accelerations of the end-effector
12571257 :rtype: ndarray(6,)
12581258
1259- ``xdd = accel_x(q, qd , wrench)`` is the operational space acceleration
1259+ ``xdd = accel_x(q, xd , wrench)`` is the operational space acceleration
12601260 due to ``wrench`` applied to the end-effector of a robot in joint
1261- configuration ``q`` and joint velocity ``qd ``.
1261+ configuration ``q`` and operational space velocity ``xd ``.
12621262
12631263 .. math::
12641264
1265- \ddot{x} = \mathbf{J}(q) \mathbf{M}(q)^{-1} \left(
1266- \mathbf{J}(q)^T w - \mathbf{C}(q)\dot{q} - \mathbf{g}(q)
1265+ \ddot{x} = \dot{\mathbf{J}}_a(q, \dot{q})\dot{q}
1266+ + \mathbf{J}_a(q) \mathbf{M}(q)^{-1} \left(
1267+ \mathbf{J}_a(q)^T w - \mathbf{C}(q)\dot{q}
1268+ - \mathbf{g}(q)
12671269 \right)
12681270
12691271 **Trajectory operation**
12701272
1271- If `q`, `qd`, torque are matrices (m,n) then ``qdd `` is a matrix (m,n)
1272- where each row is the acceleration corresponding to the equivalent rows
1273- of q, qd, wrench.
1273+ If ``q`` is a matrix (m,n), and ``xd `` and ``wrench`` are matrices
1274+ (m,6), then ``xdd`` is a matrix (m,6) where each row is the acceleration
1275+ corresponding to the equivalent rows of ``q``, ``xd``, and `` wrench`` .
12741276
12751277 .. rubric:: Notes
12761278
@@ -1294,7 +1296,7 @@ def accel_x(
12941296 if q .shape [1 ] != 6 :
12951297 pinv = True
12961298
1297- xdd = np .zeros ((q .shape [0 ], self . n ))
1299+ xdd = np .zeros ((q .shape [0 ], 6 ))
12981300
12991301 for k , (qk , xdk , wk ) in enumerate (zip (q , xd , w )):
13001302 Ja = self .jacob0_analytical (qk , representation = representation )
@@ -1322,16 +1324,10 @@ def accel_x(
13221324
13231325 # xd = Ja qd
13241326 # xdd = Jad qd + Ja qdd
1325- #
1326- # Ja = T J
1327- # Jad = Td J + T Jd
1328- # assume Td = 0, not sure how valid that is
1329-
1330- # need Jacobian dot
13311327 qdk = Ji @ xdk
1332- Jd = self .jacob0_dot (qk , qdk , J0 = Ja )
1328+ Jad = self .jacob0_dot (qk , qdk , representation = representation )
13331329
1334- xdd [k , :] = T @ ( Jd @ qdk + J @ qdd )
1330+ xdd [k , :] = Jad @ qdk + Ja @ qdd
13351331
13361332 if q .shape [0 ] == 1 :
13371333 return xdd [0 , :]
0 commit comments