-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 6d54c66
Showing
203 changed files
with
11,881 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# Sphinx build info version 1 | ||
# This file records the configuration used when building these files. When it is not found, a full rebuild will be done. | ||
config: 87c56f8f37e41e15cdf499eae8312a86 | ||
tags: 645f666f9bcd5a90fca523b33c5a78b7 |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
:github_url: https://github.com/stephane-caron/pink/tree/main/doc/barriers.rst | ||
|
||
.. _Barriers: | ||
|
||
******** | ||
Barriers | ||
******** | ||
|
||
Definition | ||
========== | ||
|
||
.. automodule:: pink.barriers.barrier | ||
:members: | ||
|
||
Position barrier | ||
================ | ||
|
||
.. automodule:: pink.barriers.position_barrier | ||
:members: | ||
|
||
Body Spherical barrier | ||
====================== | ||
|
||
.. automodule:: pink.barriers.body_spherical_barrier | ||
:members: | ||
|
||
Whole Body Collision Avoidance | ||
============================== | ||
|
||
.. automodule:: pink.barriers.self_collision_barrier | ||
:members: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
:github_url: https://github.com/stephane-caron/pink/tree/main/doc/developer-notes.rst | ||
|
||
*************** | ||
Developer notes | ||
*************** | ||
|
||
This section documents internal functions and other notes shared between contributors to this project. | ||
|
||
Design guidelines | ||
================= | ||
|
||
* Pink is designed for clarity before performance | ||
* Leaky abstractions are our enemy | ||
* WIP | ||
|
||
Exceptions | ||
========== | ||
|
||
.. automodule:: pink.exceptions | ||
:members: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
:github_url: https://github.com/stephane-caron/pink/tree/main/doc/index.rst | ||
|
||
.. title:: Table of Contents | ||
|
||
#### | ||
Pink | ||
#### | ||
|
||
**P**\ ython **in**\ verse **k**\ inematics for articulated robot models, based on `Pinocchio <https://github.com/stack-of-tasks/pinocchio>`_. | ||
|
||
.. image:: https://user-images.githubusercontent.com/1189580/192318997-ed7574c3-8238-451d-9548-a769d46ec03b.png | ||
:alt: Banner for Pink | ||
|
||
Inverse kinematics in Pink is defined by weighted :ref:`tasks <Tasks>` and :ref:`limits <Limits>`. The library adds a :ref:`configuration <Configuration>` type to Pinocchio, a configuration being a robot model and data to which forward kinematics have been applied. Given a configuration, tasks and a time step, :func:`pink.solve_ik.solve_ik` computes joint velocities that steer the model towards fulfilling all tasks at best. | ||
|
||
.. toctree:: | ||
:maxdepth: 1 | ||
|
||
installation.rst | ||
introduction.rst | ||
tasks.rst | ||
limits.rst | ||
barriers.rst | ||
inverse-kinematics.rst | ||
developer-notes.rst | ||
references.rst | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
:github_url: https://github.com/stephane-caron/pink/tree/main/doc/installation.rst | ||
|
||
************ | ||
Installation | ||
************ | ||
|
||
From Conda | ||
========== | ||
|
||
For best performance we recommended installing Pink from Conda: | ||
|
||
.. code:: bash | ||
conda install -c conda-forge pink | ||
From PyPI | ||
========= | ||
|
||
Installation from the Python Package Index should work via: | ||
|
||
.. code:: bash | ||
pip install pin-pink | ||
From source | ||
=========== | ||
|
||
If installation from PyPI doesn't work, you can manually install `eigenpy <https://github.com/stack-of-tasks/eigenpy>`__ (required by Pinocchio) and `Pinocchio <https://github.com/stack-of-tasks/pinocchio>`__ from source. Then install Pink by: | ||
|
||
.. code:: bash | ||
pip install --no-deps pin-pink | ||
Alternatively, copy or add the ``pink/`` module directory somewhere in your ``PYTHONPATH``. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
:github_url: https://github.com/stephane-caron/pink/tree/main/doc/introduction.rst | ||
|
||
************ | ||
Introduction | ||
************ | ||
|
||
Inverse kinematics (IK) is the problem of computing *motions* (in Pink: velocities) that achieve a given set of *tasks*, such as putting a foot on a surface, moving the center of mass to a target location, etc. | ||
|
||
This documentation assumes you are already familiar with task-based inverse kinematics. You can check out for instance this `post on inverse kinematics <https://scaron.info/robot-locomotion/inverse-kinematics.html>`__ for a general introduction. | ||
|
||
Notations | ||
========= | ||
|
||
In Pink, we adopt the subscript right-to-left convention for transforms, and superscript notation to indicate the frame of a motion or force vector: | ||
|
||
.. list-table:: | ||
:class: cheatsheet | ||
:widths: 70 30 | ||
|
||
* - Quantity | ||
- Notation | ||
* - Affine transform from frame :math:`A` to frame :math:`B` | ||
- :math:`T_{BA}` | ||
* - Body angular velocity of frame :math:`A` in frame :math:`B` | ||
- :math:`{}^A \omega_{BA}` | ||
* - Position of frame :math:`B` in frame :math:`A` | ||
- :math:`{}^A p_B` | ||
* - Rotation matrix from frame :math:`A` to frame :math:`B` | ||
- :math:`R_{BA}` | ||
* - Spatial angular velocity of frame :math:`A` in frame :math:`B` | ||
- :math:`{}^B \omega_{BA}` | ||
* - World frame (inertial) | ||
- :math:`W` | ||
|
||
With these notations frame transforms can be read left to right, for example: | ||
|
||
.. raw:: latex html | ||
|
||
\begin{align} | ||
T_{CA} & = T_{CB} T_{BA} & | ||
{}^{B} \omega & = R_{BA} {}^{A} \omega & | ||
{}^B p_C & = R_{BA} {}^A p_C + {}^B p_A | ||
\end{align} | ||
|
||
See also this `spatial algebra cheat sheet | ||
<https://scaron.info/robot-locomotion/spatial-vector-algebra-cheat-sheet.html>`_. | ||
|
||
.. _Configuration: | ||
|
||
Configuration | ||
============= | ||
|
||
.. automodule:: pink.configuration | ||
:members: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
:github_url: https://github.com/stephane-caron/pink/tree/main/doc/inverse-kinematics.rst | ||
|
||
****************** | ||
Inverse kinematics | ||
****************** | ||
|
||
The main function solve inverse kinematics is :func:`.solve_ik`. Here is for | ||
instance how it appears in a closed-loop inverse kinematics: | ||
|
||
.. code:: python | ||
rate = RateLimiter(frequency=100.0) | ||
while True: | ||
# [...] <- update task targets here | ||
velocity = solve_ik(configuration, tasks, rate.dt, solver=solver) | ||
configuration.integrate_inplace(velocity, rate.dt) | ||
rate.sleep() | ||
See the ``examples/`` folder in the repository for complete use cases. | ||
|
||
.. autofunction:: pink.solve_ik.solve_ik | ||
|
||
It is also possible to ask Pink to only build the underlying inverse kinematics | ||
problem via the :func:`.build_ik` function: | ||
|
||
.. autofunction:: pink.solve_ik.build_ik |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
:github_url: https://github.com/stephane-caron/pink/tree/main/doc/limits.rst | ||
|
||
.. _Limits: | ||
|
||
****** | ||
Limits | ||
****** | ||
|
||
Definition | ||
========== | ||
|
||
.. automodule:: pink.limits.limit | ||
:members: | ||
|
||
Configuration limit | ||
=================== | ||
|
||
.. automodule:: pink.limits.configuration_limit | ||
:members: | ||
|
||
Velocity limit | ||
============== | ||
|
||
.. automodule:: pink.limits.velocity_limit | ||
:members: | ||
|
||
Acceleration limit | ||
================== | ||
|
||
.. automodule:: pink.limits.acceleration_limit | ||
:members: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
:github_url: https://github.com/stephane-caron/pink/tree/main/doc/references.rst | ||
|
||
********** | ||
References | ||
********** | ||
|
||
.. [FrameTaskJacobian] `Jacobian of a kinematic task and derivatives on manifolds <https://scaron.info/robotics/jacobian-of-a-kinematic-task-and-derivatives-on-manifolds.html>`_. S. Caron. 2023. | ||
.. [MLT] `A micro Lie theory for state estimation in robotics <https://arxiv.org/abs/1812.01537>`_. J. Solà, J. Deray, D. Atchuthan. 2018. | ||
.. [Sugihara2011] *Solvability-Unconcerned Inverse Kinematics by the Levenberg-Marquardt Method*. T. Sugihara. IEEE transactions on robotics, 2011, vol. 27, no 5, pp. 984-991. | ||
.. [Flacco2015] *Control of Redundant Robots Under Hard Joint Constraints: Saturation in the Null Space*. F. Flacco, A. De Luca and O. Khatib. IEEE Transactions on Robotics, 2015, vol. 31, no 3, pp. 637-654. | ||
.. [DelPrete2018] *Joint Position and Velocity Bounds in Discrete-Time Acceleration/Torque Control of Robot Manipulators*. A. Del Prete. IEEE Robotics and Automation Letters, 2018, vol. 3, no 1, pp. 281-288. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
:github_url: https://github.com/stephane-caron/pink/tree/main/doc/tasks.rst | ||
|
||
.. _Tasks: | ||
|
||
***** | ||
Tasks | ||
***** | ||
|
||
Definition | ||
========== | ||
|
||
.. automodule:: pink.tasks.task | ||
:members: | ||
|
||
Frame task | ||
========== | ||
|
||
.. automodule:: pink.tasks.frame_task | ||
:members: | ||
|
||
Relative frame task | ||
=================== | ||
|
||
.. automodule:: pink.tasks.relative_frame_task | ||
:members: | ||
|
||
Joint coupling task | ||
=================== | ||
|
||
.. automodule:: pink.tasks.joint_coupling_task | ||
:members: | ||
|
||
Linear holonomic task | ||
===================== | ||
|
||
.. automodule:: pink.tasks.linear_holonomic_task | ||
:members: | ||
|
||
Posture task | ||
============ | ||
|
||
.. automodule:: pink.tasks.posture_task | ||
:members: | ||
|
||
Rolling task | ||
============ | ||
|
||
.. automodule:: pink.tasks.rolling_task | ||
:members: |
Oops, something went wrong.