Skip to content

Commit

Permalink
better docs for ellipsoids
Browse files Browse the repository at this point in the history
  • Loading branch information
askuric committed Aug 22, 2023
1 parent 4e08735 commit db8cabe
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 7 deletions.
20 changes: 16 additions & 4 deletions pycapacity/human.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,16 @@ def velocity_ellipsoid(J, N, dl_max):
"""
Human musculoskeletal velocity ellipsoid calculation

.. math:: E_f = \{\dot{x}~ |~ J\dot{q} = \dot{x},~ L\dot{q} = \dot{l} \quad ||\dot{l}|| \leq \dot{l}_{max}\}
.. math:: E_f = \{\dot{x}~ |~ J\dot{q} = \dot{x},~ L\dot{q} = W=\dot{l} \quad ||W^{-1}\dot{l}|| \leq 1\}

where

.. math:: W=diag(\dot{l}_{max})

Args:
J: position jacobian
N: moment arm matrix (:math:`N = -L^T`, where :math:`L` is the muscle length jacobian)
dl_max: maximal joint velocities
dl_max: maximal joint velocities

Returns
---------
Expand All @@ -53,7 +57,11 @@ def acceleration_ellipsoid(J, M, N, F_max):
"""
Human muscuskeletal acceleration ellipsoid calculation (dynamic manipulability ellipsoid)

.. math:: E_a = \{\ddot{x}~ |~ \ddot{x} = JM^{-1}NF, \quad ||F|| \leq {F}_{max}\}
.. math:: E_a = \{\ddot{x}~ |~ \ddot{x} = JM^{-1}NF, \quad |W^{-1}|F|| \leq 1\}

where

.. math:: W=diag(F_{max})

Args:
J: matrix jacobian
Expand All @@ -80,8 +88,12 @@ def force_ellipsoid(J, N, F_max):
"""
Human muscuskeletal force ellipsoid calculation

.. math:: E_f = \{f~ |~ NF = J^Tf,\quad ||F|| \leq {F}_{max}\}
.. math:: E_f = \{f~ |~ NF = J^Tf,\quad ||W^{-1}F|| \leq 1\}

where

.. math:: W=diag(F_{max})

Args:
J: matrix jacobian
N: moment arm matrix
Expand Down
18 changes: 15 additions & 3 deletions pycapacity/robot.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,11 @@ def velocity_ellipsoid(J, dq_max):
"""
Velocity manipulability ellipsoid calculation

.. math:: E_f = \{\dot{x}~ |~ J\dot{q} = \dot{x},\quad ||\dot{q}|| \leq \dot{q}_{max}\}
.. math:: E_f = \{\dot{x}~ |~ J\dot{q} = \dot{x},\quad ||W^{-1}\dot{q}|| \leq 1\}

where

.. math:: W=diag(\dot{q}_{max})

Args:
J: position jacobian
Expand All @@ -53,7 +57,11 @@ def acceleration_ellipsoid(J, M, t_max):
"""
Acceleration ellipsoid calculation (dynamic manipulability ellipsoid)

.. math:: E_a = \{\ddot{x}~ |~ \ddot{x} = JM^{-1}\\tau,\quad ||{\\tau}|| \leq {\\tau}_{max}\}
.. math:: E_a = \{\ddot{x}~ |~ \ddot{x} = JM^{-1}\\tau,\quad ||W^{-1}{\\tau}|| \leq 1\}

where

.. math:: W=diag(\\tau_{max})

Args:
J: matrix jacobian
Expand All @@ -79,7 +87,11 @@ def force_ellipsoid(J, t_max):
"""
Force manipulability ellipsoid calculation

.. math:: E_f = \{f~ |~ \\tau = J^Tf,\quad ||\\tau|| \leq {\\tau}_{max}\}
.. math:: E_f = \{f~ |~ \\tau = J^Tf,\quad ||W^{-1}\\tau|| \leq 1\}

where

.. math:: W=diag(\\tau_{max})

Args:
J: matrix jacobian
Expand Down

0 comments on commit db8cabe

Please sign in to comment.