pinker 0.1.0a0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- pinker-0.1.0a0/LICENSE +201 -0
- pinker-0.1.0a0/NOTICE +9 -0
- pinker-0.1.0a0/PKG-INFO +243 -0
- pinker-0.1.0a0/README.md +211 -0
- pinker-0.1.0a0/pinker/__init__.py +35 -0
- pinker-0.1.0a0/pinker/barriers/__init__.py +13 -0
- pinker-0.1.0a0/pinker/barriers/barrier.py +275 -0
- pinker-0.1.0a0/pinker/barriers/body_spherical_barrier.py +186 -0
- pinker-0.1.0a0/pinker/barriers/position_barrier.py +150 -0
- pinker-0.1.0a0/pinker/configuration.py +265 -0
- pinker-0.1.0a0/pinker/exceptions.py +113 -0
- pinker-0.1.0a0/pinker/kinematics/__init__.py +126 -0
- pinker-0.1.0a0/pinker/kinematics/_kinematics_c.c +1698 -0
- pinker-0.1.0a0/pinker/kinematics/algorithms.py +448 -0
- pinker-0.1.0a0/pinker/kinematics/geometry.py +109 -0
- pinker-0.1.0a0/pinker/kinematics/joints.py +326 -0
- pinker-0.1.0a0/pinker/kinematics/model.py +610 -0
- pinker-0.1.0a0/pinker/kinematics/robot_wrapper.py +86 -0
- pinker-0.1.0a0/pinker/kinematics/se3.py +421 -0
- pinker-0.1.0a0/pinker/kinematics/so3.py +143 -0
- pinker-0.1.0a0/pinker/kinematics/urdf.py +480 -0
- pinker-0.1.0a0/pinker/limits/__init__.py +29 -0
- pinker-0.1.0a0/pinker/limits/acceleration_limit.py +198 -0
- pinker-0.1.0a0/pinker/limits/configuration_limit.py +143 -0
- pinker-0.1.0a0/pinker/limits/floating_base_velocity_limit.py +146 -0
- pinker-0.1.0a0/pinker/limits/limit.py +42 -0
- pinker-0.1.0a0/pinker/limits/velocity_limit.py +119 -0
- pinker-0.1.0a0/pinker/loaders.py +143 -0
- pinker-0.1.0a0/pinker/solve_ik.py +262 -0
- pinker-0.1.0a0/pinker/tasks/__init__.py +33 -0
- pinker-0.1.0a0/pinker/tasks/com_task.py +156 -0
- pinker-0.1.0a0/pinker/tasks/damping_task.py +43 -0
- pinker-0.1.0a0/pinker/tasks/frame_task.py +259 -0
- pinker-0.1.0a0/pinker/tasks/joint_coupling_task.py +110 -0
- pinker-0.1.0a0/pinker/tasks/joint_velocity_task.py +110 -0
- pinker-0.1.0a0/pinker/tasks/linear_holonomic_task.py +199 -0
- pinker-0.1.0a0/pinker/tasks/low_acceleration_task.py +81 -0
- pinker-0.1.0a0/pinker/tasks/manipulability_task.py +424 -0
- pinker-0.1.0a0/pinker/tasks/omniwheel_task.py +74 -0
- pinker-0.1.0a0/pinker/tasks/posture_task.py +134 -0
- pinker-0.1.0a0/pinker/tasks/relative_frame_task.py +261 -0
- pinker-0.1.0a0/pinker/tasks/rolling_task.py +148 -0
- pinker-0.1.0a0/pinker/tasks/task.py +168 -0
- pinker-0.1.0a0/pinker/utils.py +44 -0
- pinker-0.1.0a0/pinker/visualizer.py +295 -0
- pinker-0.1.0a0/pinker.egg-info/PKG-INFO +243 -0
- pinker-0.1.0a0/pinker.egg-info/SOURCES.txt +76 -0
- pinker-0.1.0a0/pinker.egg-info/dependency_links.txt +1 -0
- pinker-0.1.0a0/pinker.egg-info/requires.txt +3 -0
- pinker-0.1.0a0/pinker.egg-info/top_level.txt +1 -0
- pinker-0.1.0a0/pyproject.toml +230 -0
- pinker-0.1.0a0/setup.cfg +4 -0
- pinker-0.1.0a0/setup.py +17 -0
- pinker-0.1.0a0/tests/test_acceleration_limit.py +147 -0
- pinker-0.1.0a0/tests/test_barrier.py +107 -0
- pinker-0.1.0a0/tests/test_body_spherical_barrier.py +82 -0
- pinker-0.1.0a0/tests/test_com_task.py +136 -0
- pinker-0.1.0a0/tests/test_configuration.py +503 -0
- pinker-0.1.0a0/tests/test_configuration_limit.py +100 -0
- pinker-0.1.0a0/tests/test_damping_task.py +35 -0
- pinker-0.1.0a0/tests/test_floating_base_velocity_limit.py +168 -0
- pinker-0.1.0a0/tests/test_frame_task.py +231 -0
- pinker-0.1.0a0/tests/test_jacobians.py +95 -0
- pinker-0.1.0a0/tests/test_joint_coupling_task.py +66 -0
- pinker-0.1.0a0/tests/test_joint_velocity_task.py +73 -0
- pinker-0.1.0a0/tests/test_limits.py +85 -0
- pinker-0.1.0a0/tests/test_linear_holonomic_task.py +96 -0
- pinker-0.1.0a0/tests/test_loaders.py +96 -0
- pinker-0.1.0a0/tests/test_low_acceleration_task.py +39 -0
- pinker-0.1.0a0/tests/test_manipulability_task.py +400 -0
- pinker-0.1.0a0/tests/test_omniwheel_task.py +40 -0
- pinker-0.1.0a0/tests/test_position_barrier.py +87 -0
- pinker-0.1.0a0/tests/test_posture_task.py +96 -0
- pinker-0.1.0a0/tests/test_relative_frame_task.py +260 -0
- pinker-0.1.0a0/tests/test_rolling_task.py +42 -0
- pinker-0.1.0a0/tests/test_solve_ik.py +494 -0
- pinker-0.1.0a0/tests/test_utils.py +24 -0
- pinker-0.1.0a0/tests/test_velocity_limit.py +59 -0
pinker-0.1.0a0/LICENSE
ADDED
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or
|
|
95
|
+
Derivative Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for reasonable and customary use in describing the
|
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
+
or other liability obligations and/or rights consistent with this
|
|
169
|
+
License. However, in accepting such obligations, You may act only
|
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
+
of your accepting any such warranty or additional liability.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
+
|
|
180
|
+
To apply the Apache License to your work, attach the following
|
|
181
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
182
|
+
replaced with your own identifying information. (Don't include
|
|
183
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
+
comment syntax for the file format. We also recommend that a
|
|
185
|
+
file or class name and description of purpose be included on the
|
|
186
|
+
same "printed page" as the copyright notice for easier
|
|
187
|
+
identification within third-party archives.
|
|
188
|
+
|
|
189
|
+
Copyright [yyyy] [name of copyright owner]
|
|
190
|
+
|
|
191
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
+
you may not use this file except in compliance with the License.
|
|
193
|
+
You may obtain a copy of the License at
|
|
194
|
+
|
|
195
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
+
|
|
197
|
+
Unless required by applicable law or agreed to in writing, software
|
|
198
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
200
|
+
See the License for the specific language governing permissions and
|
|
201
|
+
limitations under the License.
|
pinker-0.1.0a0/NOTICE
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
Pinker includes contributions made under the following copyrights:
|
|
2
|
+
|
|
3
|
+
- Copyright 2022 Stéphane Caron
|
|
4
|
+
- Copyright 2023-2025 Inria
|
|
5
|
+
- Copyright 2024 Ivan Domrachev, Simeon Nedelchev
|
|
6
|
+
- Copyright 2026 Stéphane Caron
|
|
7
|
+
- Copyright 2026 CNRS
|
|
8
|
+
|
|
9
|
+
The project includes code derived from Pink (https://github.com/pink-kinematics/pink), which is licensed under the Apache License 2.0.
|
pinker-0.1.0a0/PKG-INFO
ADDED
|
@@ -0,0 +1,243 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: pinker
|
|
3
|
+
Version: 0.1.0a0
|
|
4
|
+
Summary: Python inverse kinematics for embedded robots
|
|
5
|
+
Author-email: Stéphane Caron <stephane.caron@normalesup.org>
|
|
6
|
+
Maintainer-email: Stéphane Caron <stephane.caron@normalesup.org>
|
|
7
|
+
License-Expression: Apache-2.0
|
|
8
|
+
Project-URL: Homepage, https://pink-kinematics.github.io/pinker/
|
|
9
|
+
Project-URL: Documentation, https://pink-kinematics.github.io/pinker/
|
|
10
|
+
Project-URL: Source, https://github.com/pink-kinematics/pinker
|
|
11
|
+
Project-URL: Tracker, https://github.com/pink-kinematics/pinker/issues
|
|
12
|
+
Project-URL: Changelog, https://github.com/pink-kinematics/pinker/blob/main/CHANGELOG.md
|
|
13
|
+
Keywords: inverse,kinematics,pink
|
|
14
|
+
Classifier: Development Status :: 3 - Alpha
|
|
15
|
+
Classifier: Framework :: Robot Framework :: Library
|
|
16
|
+
Classifier: Intended Audience :: Developers
|
|
17
|
+
Classifier: Intended Audience :: Science/Research
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
22
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
23
|
+
Classifier: Topic :: Scientific/Engineering
|
|
24
|
+
Requires-Python: >=3.10
|
|
25
|
+
Description-Content-Type: text/markdown
|
|
26
|
+
License-File: LICENSE
|
|
27
|
+
License-File: NOTICE
|
|
28
|
+
Requires-Dist: numpy>=1.19.0
|
|
29
|
+
Requires-Dist: qpsolvers>=4.3.1
|
|
30
|
+
Requires-Dist: typing-extensions
|
|
31
|
+
Dynamic: license-file
|
|
32
|
+
|
|
33
|
+
# Pinker
|
|
34
|
+
|
|
35
|
+
[](https://github.com/pink-kinematics/pinker/actions)
|
|
36
|
+
[](https://pink-kinematics.github.io/pinker/)
|
|
37
|
+
|
|
38
|
+
**P**ython **in**verse **k**inematics for **e**mbedded **r**obots.
|
|
39
|
+
|
|
40
|
+
Pinker is a leaner version of [Pink](https://github.com/pink-kinematics/pink/) for single-board computers. Two dependencies, one C file, and it takes 5 seconds to build from source on a Raspberry Pi 4. But it doesn't implement collision avoidance.
|
|
41
|
+
|
|
42
|
+
## Installation
|
|
43
|
+
|
|
44
|
+
You can install the library from PyPI:
|
|
45
|
+
|
|
46
|
+
```console
|
|
47
|
+
pip install pinker
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
You can also clone the repository and run it locally:
|
|
51
|
+
|
|
52
|
+
```bash
|
|
53
|
+
git clone https://github.com/pink-kinematics/pinker.git && cd pinker
|
|
54
|
+
uv run examples/g1_com_tracking.py
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
## Usage
|
|
58
|
+
|
|
59
|
+
Pinker solves differential inverse kinematics by [weighted tasks](https://scaron.info/robot-locomotion/inverse-kinematics.html). A task is defined by a *residual* function $e(q)$ of the robot configuration $q \in \mathcal{C}$ to be driven to zero. For instance, putting a foot position $p_{foot}(q)$ at a given target $p_{foot}^{\star}$ can be described by the position residual:
|
|
60
|
+
|
|
61
|
+
$$
|
|
62
|
+
e(q) = p_{foot}^{\star} - p_{foot}(q)
|
|
63
|
+
$$
|
|
64
|
+
|
|
65
|
+
In differential inverse kinematics, we compute a velocity $v \in \mathfrak{c}$ that satisfies the first-order differential equation:
|
|
66
|
+
|
|
67
|
+
$$
|
|
68
|
+
J_e(q) v = \dot{e}(q) = -\alpha e(q)
|
|
69
|
+
$$
|
|
70
|
+
|
|
71
|
+
where $J\_e(q) := \frac{\partial e}{\partial q}$ is the [task Jacobian](https://scaron.info/robotics/jacobian-of-a-kinematic-task-and-derivatives-on-manifolds.html). We can define multiple tasks, but some of them will come into conflict if they can't be all fully achieved at the same time. Conflicts are resolved by casting all objectives to a common unit, and weighing these normalized objectives relative to each other. We also include configuration and velocity limits, making our overall optimization problem a quadratic program:
|
|
72
|
+
|
|
73
|
+
$$
|
|
74
|
+
\begin{align}
|
|
75
|
+
\underset{v \in \mathfrak{c}}{\text{minimize}} \ & \sum_{\text{task } e} \Vert J_e(q) v + \alpha e(q) \Vert^2_{W_e} \\
|
|
76
|
+
\text{subject to} \ & v_{\text{min}}(q) \leq v \leq v_{\text{max}}(q)
|
|
77
|
+
\end{align}
|
|
78
|
+
$$
|
|
79
|
+
|
|
80
|
+
Pinker provides an API to describe the problem as tasks with targets, and automatically build and solve the underlying quadratic program.
|
|
81
|
+
|
|
82
|
+
### Task costs
|
|
83
|
+
|
|
84
|
+
Here is the example of a biped robot that controls the position and orientation of its base, left and right contact frames. A fourth "posture" task, giving a preferred angle for each joint, is added for regularization:
|
|
85
|
+
|
|
86
|
+
```python
|
|
87
|
+
from pinker.tasks import FrameTask, PostureTask
|
|
88
|
+
|
|
89
|
+
tasks = {
|
|
90
|
+
"base": FrameTask(
|
|
91
|
+
"base",
|
|
92
|
+
position_cost=1.0, # [cost] / [m]
|
|
93
|
+
orientation_cost=1.0, # [cost] / [rad]
|
|
94
|
+
),
|
|
95
|
+
"left_contact": FrameTask(
|
|
96
|
+
"left_contact",
|
|
97
|
+
position_cost=[0.1, 0.0, 0.1], # [cost] / [m]
|
|
98
|
+
orientation_cost=0.0, # [cost] / [rad]
|
|
99
|
+
),
|
|
100
|
+
"right_contact": FrameTask(
|
|
101
|
+
"right_contact",
|
|
102
|
+
position_cost=[0.1, 0.0, 0.1], # [cost] / [m]
|
|
103
|
+
orientation_cost=0.0, # [cost] / [rad]
|
|
104
|
+
),
|
|
105
|
+
"posture": PostureTask(
|
|
106
|
+
cost=1e-3, # [cost] / [rad]
|
|
107
|
+
),
|
|
108
|
+
}
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
Orientation (similarly position) costs can be scalars or 3D vectors. They specify how much each radian of angular error "costs" in the overall normalized objective. When using 3D vectors, components are weighted anisotropically along each axis of the body frame.
|
|
112
|
+
|
|
113
|
+
### Task targets
|
|
114
|
+
|
|
115
|
+
Aside from their costs, most tasks take a second set of parameters called *target*. For example, a frame task aims for a target transform, while a posture task aims for a target configuration vector. Targets are set by the `set_target` function:
|
|
116
|
+
|
|
117
|
+
```python
|
|
118
|
+
tasks["posture"].set_target(
|
|
119
|
+
[1.0, 0.0, 0.0, 0.0] + # floating base quaternion
|
|
120
|
+
[0.0, 0.0, 0.0] + # floating base position
|
|
121
|
+
[0.0, 0.2, 0.0, 0.0, -0.2, 0.0] # joint angles
|
|
122
|
+
)
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
Body tasks can be initialized, for example, from the robot's neutral configuration:
|
|
126
|
+
|
|
127
|
+
```python
|
|
128
|
+
from pinker import Configuration, load_robot_description, solve_ik
|
|
129
|
+
|
|
130
|
+
robot = load_robot_description("ur3_official_description")
|
|
131
|
+
configuration = Configuration(robot.model, robot.data, robot.q0)
|
|
132
|
+
for body, task in tasks.items():
|
|
133
|
+
if type(task) is FrameTask:
|
|
134
|
+
task.set_target(configuration.get_transform_frame_to_world(body))
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
A task can be added to the inverse kinematics once both its cost and target (if applicable) are defined.
|
|
138
|
+
|
|
139
|
+
### Differential inverse kinematics
|
|
140
|
+
|
|
141
|
+
Pinker solves differential inverse kinematics, meaning it outputs a velocity that steers the robot towards achieving all tasks at best. If we keep integrating that velocity, and task targets don't change over time, we will converge to a stationary configuration:
|
|
142
|
+
|
|
143
|
+
```python
|
|
144
|
+
dt = 6e-3 # [s]
|
|
145
|
+
for t in np.arange(0.0, 42.0, dt):
|
|
146
|
+
velocity = solve_ik(configuration, tasks.values(), dt, solver="quadprog")
|
|
147
|
+
configuration.integrate_inplace(velocity, dt)
|
|
148
|
+
time.sleep(dt)
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
If task targets are continuously updated, there will be no stationary solution to converge to, but the model will keep on tracking each target at best. By default, `solve_ik` will take into account both joint limits and velocity limits read from the robot model.
|
|
152
|
+
|
|
153
|
+
## Compatibility
|
|
154
|
+
|
|
155
|
+
Pinker is API-compatible with **Pink 4.4.0**, with the following exceptions:
|
|
156
|
+
|
|
157
|
+
- Default limits live on the configuration, as `configuration.default_limits`, rather than being cached on the robot model. Add your own, for instance a `FloatingBaseVelocityLimit`, by appending to that list.
|
|
158
|
+
- `Configuration.integrate` returns a new `Configuration` rather than a configuration vector. Its vector is `configuration.integrate(v, dt).q`.
|
|
159
|
+
- Functions and methods of the kinematics backend follow Python naming, so `model.getFrameId` is `model.get_frame_id` and `model.lowerPositionLimit` is `model.lower_position_limit`. Model getters raise rather than returning the sentinel index Pinocchio returns when a name is not found.
|
|
160
|
+
|
|
161
|
+
Pinker is a standalone replacement for Pink where kinematics are carried out by `pinker.kinematics`, a backend written as a single C extension with a thin Python layer. Tasks, limits, barriers, the `Configuration` class and `solve_ik`, is the same as in Pink, and differential IK problems are still solved through [qpsolvers](https://github.com/qpsolvers/qpsolvers).
|
|
162
|
+
|
|
163
|
+
## Examples
|
|
164
|
+
|
|
165
|
+
The `examples/` directory mirrors Pink's examples, ported to the `pinker.kinematics` backend with [Viser](https://viser.studio) visualization. Each one is named `<robot>_<task>.py`, after the robot description it loads and what it does with it:
|
|
166
|
+
|
|
167
|
+
```console
|
|
168
|
+
pixi run -e examples python examples/ur3_end_effector_tracking.py
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
Each example can also be run standalone with [uv](https://docs.astral.sh/uv/):
|
|
172
|
+
|
|
173
|
+
```console
|
|
174
|
+
uv run examples/ur3_end_effector_tracking.py
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
- **Single arms:** [Panda](https://github.com/pink-kinematics/pinker/tree/main/examples#panda-end-effector-tracking), [UR5](https://github.com/pink-kinematics/pinker/tree/main/examples#ur5-end-effector-tracking), [UR5 with end-effector limits](https://github.com/pink-kinematics/pinker/tree/main/examples#ur5-position-barrier)
|
|
178
|
+
- **Humanoid:** [Draco 3](https://github.com/pink-kinematics/pinker/tree/main/examples#draco-3-reaching)
|
|
179
|
+
- **Mobile base:** [Stretch R1](https://github.com/pink-kinematics/pinker/tree/main/examples#stretch-world-target)
|
|
180
|
+
- **Quadruped:** [Go2 squatting with floating-base limits](https://github.com/pink-kinematics/pinker/tree/main/examples#go2-squat-barrier)
|
|
181
|
+
- **Floating base:** [Clamp free-flyer velocities](https://github.com/pink-kinematics/pinker/blob/main/examples/upkie_floating_base_velocity_limit.py)
|
|
182
|
+
- **Wheeled biped:** [Upkie rolling without slipping](https://github.com/pink-kinematics/pinker/tree/main/examples#upkie-rolling)
|
|
183
|
+
|
|
184
|
+
Check out the [examples](https://github.com/pink-kinematics/pinker/tree/main/examples) directory for more.
|
|
185
|
+
|
|
186
|
+
## Limitations
|
|
187
|
+
|
|
188
|
+
- No collision support: Pink's `SelfCollisionBarrier` is not available, and
|
|
189
|
+
neither `Configuration` nor `RobotWrapper` carries a collision model or
|
|
190
|
+
collision data. Use Pink if you need collision-avoidance tasks.
|
|
191
|
+
- One visualizer: Pinker works with [Viser](https://viser.studio), which
|
|
192
|
+
handles both visualization and user inputs. If you would rather use (the
|
|
193
|
+
older) MeshCat, head over to Pink, which is compatible with it.
|
|
194
|
+
- The `pinker.kinematics` backend is not type-checked yet: mypy is disabled on
|
|
195
|
+
it in `pyproject.toml`. Enabling it is a matter of shipping a
|
|
196
|
+
`_kinematics_c.pyi` stub for the C extension, annotating the arrays cached in
|
|
197
|
+
`Model._packed` and the optional values the URDF parser reads, then removing
|
|
198
|
+
the override.
|
|
199
|
+
|
|
200
|
+
## Benchmark
|
|
201
|
+
|
|
202
|
+
Pinker and Pink can be compared using [pinker_benchmark](https://github.com/pink-kinematics/pinker_benchmark), a standalone pixi project that runs a collection of arm and humanoid examples. On a Raspberry Pi 4 Model B:
|
|
203
|
+
|
|
204
|
+
```
|
|
205
|
+
TODO: benchmark results
|
|
206
|
+
```
|
|
207
|
+
|
|
208
|
+
See the readme and data files in the benchmark repository for more details.
|
|
209
|
+
|
|
210
|
+
## Citation
|
|
211
|
+
|
|
212
|
+
If you use Pinker in your scientific works, please cite it *e.g.* as follows:
|
|
213
|
+
|
|
214
|
+
```bibtex
|
|
215
|
+
@software{pinker,
|
|
216
|
+
title = {{Pinker: Python inverse kinematics for embedded robots}},
|
|
217
|
+
author = {Caron, Stéphane and De Mont-Marin, Yann and Budhiraja, Rohan and Bang, Seung Hyeon and Domrachev, Ivan and Nedelchev, Simeon and Du, Peter and Escande, Adrien and Vaillant, Joris and Wingo, Bruce and Patapati, Santosh and San José Pro, Daniel and Marticorena Vidal, Nicolas Guillermo},
|
|
218
|
+
license = {Apache-2.0},
|
|
219
|
+
url = {https://github.com/pink-kinematics/pinker},
|
|
220
|
+
version = {0.1.0},
|
|
221
|
+
year = {2026}
|
|
222
|
+
}
|
|
223
|
+
```
|
|
224
|
+
|
|
225
|
+
Don't forget to add yourself to the BibTeX above and to `CITATION.cff` if you contribute to this repository.
|
|
226
|
+
|
|
227
|
+
## See also
|
|
228
|
+
|
|
229
|
+
Software:
|
|
230
|
+
|
|
231
|
+
- [Jink.jl](https://github.com/adubredu/Jink.jl): Julia package for differential multi-task inverse kinematics.
|
|
232
|
+
- [mink](https://github.com/kevinzakka/mink): differential inverse kinematics in Python, based on the MuJoCo physics engine.
|
|
233
|
+
- [Pink](https://github.com/pink-kinematics/pink/): precursor to Pinker based on Pinocchio.
|
|
234
|
+
- [Pinocchio](https://github.com/stack-of-tasks/pinocchio): C++ rigid body dynamics algorithms library and reference implementation for the C kinematics backend of Pinker.
|
|
235
|
+
- [PlaCo](https://github.com/rhoban/placo): C++ differential multi-task inverse kinematics based on Pinocchio.
|
|
236
|
+
- [pymanoid](https://github.com/stephane-caron/pymanoid): precursor to Pink and Pinker based on OpenRAVE.
|
|
237
|
+
- [TSID](https://github.com/stack-of-tasks/tsid): C++ inverse kinematics based on Pinocchio.
|
|
238
|
+
|
|
239
|
+
Technical notes:
|
|
240
|
+
|
|
241
|
+
- [Inverse kinematics](https://scaron.info/robotics/inverse-kinematics.html): a general introduction to differential inverse kinematics.
|
|
242
|
+
- [Jacobian of a kinematic task and derivatives on manifolds](https://scaron.info/robotics/jacobian-of-a-kinematic-task-and-derivatives-on-manifolds.html).
|
|
243
|
+
- [Control Barrier Functions](https://web.archive.org/web/20241125170734/https://simeon-ned.com/blog/2024/cbf/).
|
pinker-0.1.0a0/README.md
ADDED
|
@@ -0,0 +1,211 @@
|
|
|
1
|
+
# Pinker
|
|
2
|
+
|
|
3
|
+
[](https://github.com/pink-kinematics/pinker/actions)
|
|
4
|
+
[](https://pink-kinematics.github.io/pinker/)
|
|
5
|
+
|
|
6
|
+
**P**ython **in**verse **k**inematics for **e**mbedded **r**obots.
|
|
7
|
+
|
|
8
|
+
Pinker is a leaner version of [Pink](https://github.com/pink-kinematics/pink/) for single-board computers. Two dependencies, one C file, and it takes 5 seconds to build from source on a Raspberry Pi 4. But it doesn't implement collision avoidance.
|
|
9
|
+
|
|
10
|
+
## Installation
|
|
11
|
+
|
|
12
|
+
You can install the library from PyPI:
|
|
13
|
+
|
|
14
|
+
```console
|
|
15
|
+
pip install pinker
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
You can also clone the repository and run it locally:
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
git clone https://github.com/pink-kinematics/pinker.git && cd pinker
|
|
22
|
+
uv run examples/g1_com_tracking.py
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## Usage
|
|
26
|
+
|
|
27
|
+
Pinker solves differential inverse kinematics by [weighted tasks](https://scaron.info/robot-locomotion/inverse-kinematics.html). A task is defined by a *residual* function $e(q)$ of the robot configuration $q \in \mathcal{C}$ to be driven to zero. For instance, putting a foot position $p_{foot}(q)$ at a given target $p_{foot}^{\star}$ can be described by the position residual:
|
|
28
|
+
|
|
29
|
+
$$
|
|
30
|
+
e(q) = p_{foot}^{\star} - p_{foot}(q)
|
|
31
|
+
$$
|
|
32
|
+
|
|
33
|
+
In differential inverse kinematics, we compute a velocity $v \in \mathfrak{c}$ that satisfies the first-order differential equation:
|
|
34
|
+
|
|
35
|
+
$$
|
|
36
|
+
J_e(q) v = \dot{e}(q) = -\alpha e(q)
|
|
37
|
+
$$
|
|
38
|
+
|
|
39
|
+
where $J\_e(q) := \frac{\partial e}{\partial q}$ is the [task Jacobian](https://scaron.info/robotics/jacobian-of-a-kinematic-task-and-derivatives-on-manifolds.html). We can define multiple tasks, but some of them will come into conflict if they can't be all fully achieved at the same time. Conflicts are resolved by casting all objectives to a common unit, and weighing these normalized objectives relative to each other. We also include configuration and velocity limits, making our overall optimization problem a quadratic program:
|
|
40
|
+
|
|
41
|
+
$$
|
|
42
|
+
\begin{align}
|
|
43
|
+
\underset{v \in \mathfrak{c}}{\text{minimize}} \ & \sum_{\text{task } e} \Vert J_e(q) v + \alpha e(q) \Vert^2_{W_e} \\
|
|
44
|
+
\text{subject to} \ & v_{\text{min}}(q) \leq v \leq v_{\text{max}}(q)
|
|
45
|
+
\end{align}
|
|
46
|
+
$$
|
|
47
|
+
|
|
48
|
+
Pinker provides an API to describe the problem as tasks with targets, and automatically build and solve the underlying quadratic program.
|
|
49
|
+
|
|
50
|
+
### Task costs
|
|
51
|
+
|
|
52
|
+
Here is the example of a biped robot that controls the position and orientation of its base, left and right contact frames. A fourth "posture" task, giving a preferred angle for each joint, is added for regularization:
|
|
53
|
+
|
|
54
|
+
```python
|
|
55
|
+
from pinker.tasks import FrameTask, PostureTask
|
|
56
|
+
|
|
57
|
+
tasks = {
|
|
58
|
+
"base": FrameTask(
|
|
59
|
+
"base",
|
|
60
|
+
position_cost=1.0, # [cost] / [m]
|
|
61
|
+
orientation_cost=1.0, # [cost] / [rad]
|
|
62
|
+
),
|
|
63
|
+
"left_contact": FrameTask(
|
|
64
|
+
"left_contact",
|
|
65
|
+
position_cost=[0.1, 0.0, 0.1], # [cost] / [m]
|
|
66
|
+
orientation_cost=0.0, # [cost] / [rad]
|
|
67
|
+
),
|
|
68
|
+
"right_contact": FrameTask(
|
|
69
|
+
"right_contact",
|
|
70
|
+
position_cost=[0.1, 0.0, 0.1], # [cost] / [m]
|
|
71
|
+
orientation_cost=0.0, # [cost] / [rad]
|
|
72
|
+
),
|
|
73
|
+
"posture": PostureTask(
|
|
74
|
+
cost=1e-3, # [cost] / [rad]
|
|
75
|
+
),
|
|
76
|
+
}
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
Orientation (similarly position) costs can be scalars or 3D vectors. They specify how much each radian of angular error "costs" in the overall normalized objective. When using 3D vectors, components are weighted anisotropically along each axis of the body frame.
|
|
80
|
+
|
|
81
|
+
### Task targets
|
|
82
|
+
|
|
83
|
+
Aside from their costs, most tasks take a second set of parameters called *target*. For example, a frame task aims for a target transform, while a posture task aims for a target configuration vector. Targets are set by the `set_target` function:
|
|
84
|
+
|
|
85
|
+
```python
|
|
86
|
+
tasks["posture"].set_target(
|
|
87
|
+
[1.0, 0.0, 0.0, 0.0] + # floating base quaternion
|
|
88
|
+
[0.0, 0.0, 0.0] + # floating base position
|
|
89
|
+
[0.0, 0.2, 0.0, 0.0, -0.2, 0.0] # joint angles
|
|
90
|
+
)
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
Body tasks can be initialized, for example, from the robot's neutral configuration:
|
|
94
|
+
|
|
95
|
+
```python
|
|
96
|
+
from pinker import Configuration, load_robot_description, solve_ik
|
|
97
|
+
|
|
98
|
+
robot = load_robot_description("ur3_official_description")
|
|
99
|
+
configuration = Configuration(robot.model, robot.data, robot.q0)
|
|
100
|
+
for body, task in tasks.items():
|
|
101
|
+
if type(task) is FrameTask:
|
|
102
|
+
task.set_target(configuration.get_transform_frame_to_world(body))
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
A task can be added to the inverse kinematics once both its cost and target (if applicable) are defined.
|
|
106
|
+
|
|
107
|
+
### Differential inverse kinematics
|
|
108
|
+
|
|
109
|
+
Pinker solves differential inverse kinematics, meaning it outputs a velocity that steers the robot towards achieving all tasks at best. If we keep integrating that velocity, and task targets don't change over time, we will converge to a stationary configuration:
|
|
110
|
+
|
|
111
|
+
```python
|
|
112
|
+
dt = 6e-3 # [s]
|
|
113
|
+
for t in np.arange(0.0, 42.0, dt):
|
|
114
|
+
velocity = solve_ik(configuration, tasks.values(), dt, solver="quadprog")
|
|
115
|
+
configuration.integrate_inplace(velocity, dt)
|
|
116
|
+
time.sleep(dt)
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
If task targets are continuously updated, there will be no stationary solution to converge to, but the model will keep on tracking each target at best. By default, `solve_ik` will take into account both joint limits and velocity limits read from the robot model.
|
|
120
|
+
|
|
121
|
+
## Compatibility
|
|
122
|
+
|
|
123
|
+
Pinker is API-compatible with **Pink 4.4.0**, with the following exceptions:
|
|
124
|
+
|
|
125
|
+
- Default limits live on the configuration, as `configuration.default_limits`, rather than being cached on the robot model. Add your own, for instance a `FloatingBaseVelocityLimit`, by appending to that list.
|
|
126
|
+
- `Configuration.integrate` returns a new `Configuration` rather than a configuration vector. Its vector is `configuration.integrate(v, dt).q`.
|
|
127
|
+
- Functions and methods of the kinematics backend follow Python naming, so `model.getFrameId` is `model.get_frame_id` and `model.lowerPositionLimit` is `model.lower_position_limit`. Model getters raise rather than returning the sentinel index Pinocchio returns when a name is not found.
|
|
128
|
+
|
|
129
|
+
Pinker is a standalone replacement for Pink where kinematics are carried out by `pinker.kinematics`, a backend written as a single C extension with a thin Python layer. Tasks, limits, barriers, the `Configuration` class and `solve_ik`, is the same as in Pink, and differential IK problems are still solved through [qpsolvers](https://github.com/qpsolvers/qpsolvers).
|
|
130
|
+
|
|
131
|
+
## Examples
|
|
132
|
+
|
|
133
|
+
The `examples/` directory mirrors Pink's examples, ported to the `pinker.kinematics` backend with [Viser](https://viser.studio) visualization. Each one is named `<robot>_<task>.py`, after the robot description it loads and what it does with it:
|
|
134
|
+
|
|
135
|
+
```console
|
|
136
|
+
pixi run -e examples python examples/ur3_end_effector_tracking.py
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
Each example can also be run standalone with [uv](https://docs.astral.sh/uv/):
|
|
140
|
+
|
|
141
|
+
```console
|
|
142
|
+
uv run examples/ur3_end_effector_tracking.py
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
- **Single arms:** [Panda](https://github.com/pink-kinematics/pinker/tree/main/examples#panda-end-effector-tracking), [UR5](https://github.com/pink-kinematics/pinker/tree/main/examples#ur5-end-effector-tracking), [UR5 with end-effector limits](https://github.com/pink-kinematics/pinker/tree/main/examples#ur5-position-barrier)
|
|
146
|
+
- **Humanoid:** [Draco 3](https://github.com/pink-kinematics/pinker/tree/main/examples#draco-3-reaching)
|
|
147
|
+
- **Mobile base:** [Stretch R1](https://github.com/pink-kinematics/pinker/tree/main/examples#stretch-world-target)
|
|
148
|
+
- **Quadruped:** [Go2 squatting with floating-base limits](https://github.com/pink-kinematics/pinker/tree/main/examples#go2-squat-barrier)
|
|
149
|
+
- **Floating base:** [Clamp free-flyer velocities](https://github.com/pink-kinematics/pinker/blob/main/examples/upkie_floating_base_velocity_limit.py)
|
|
150
|
+
- **Wheeled biped:** [Upkie rolling without slipping](https://github.com/pink-kinematics/pinker/tree/main/examples#upkie-rolling)
|
|
151
|
+
|
|
152
|
+
Check out the [examples](https://github.com/pink-kinematics/pinker/tree/main/examples) directory for more.
|
|
153
|
+
|
|
154
|
+
## Limitations
|
|
155
|
+
|
|
156
|
+
- No collision support: Pink's `SelfCollisionBarrier` is not available, and
|
|
157
|
+
neither `Configuration` nor `RobotWrapper` carries a collision model or
|
|
158
|
+
collision data. Use Pink if you need collision-avoidance tasks.
|
|
159
|
+
- One visualizer: Pinker works with [Viser](https://viser.studio), which
|
|
160
|
+
handles both visualization and user inputs. If you would rather use (the
|
|
161
|
+
older) MeshCat, head over to Pink, which is compatible with it.
|
|
162
|
+
- The `pinker.kinematics` backend is not type-checked yet: mypy is disabled on
|
|
163
|
+
it in `pyproject.toml`. Enabling it is a matter of shipping a
|
|
164
|
+
`_kinematics_c.pyi` stub for the C extension, annotating the arrays cached in
|
|
165
|
+
`Model._packed` and the optional values the URDF parser reads, then removing
|
|
166
|
+
the override.
|
|
167
|
+
|
|
168
|
+
## Benchmark
|
|
169
|
+
|
|
170
|
+
Pinker and Pink can be compared using [pinker_benchmark](https://github.com/pink-kinematics/pinker_benchmark), a standalone pixi project that runs a collection of arm and humanoid examples. On a Raspberry Pi 4 Model B:
|
|
171
|
+
|
|
172
|
+
```
|
|
173
|
+
TODO: benchmark results
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
See the readme and data files in the benchmark repository for more details.
|
|
177
|
+
|
|
178
|
+
## Citation
|
|
179
|
+
|
|
180
|
+
If you use Pinker in your scientific works, please cite it *e.g.* as follows:
|
|
181
|
+
|
|
182
|
+
```bibtex
|
|
183
|
+
@software{pinker,
|
|
184
|
+
title = {{Pinker: Python inverse kinematics for embedded robots}},
|
|
185
|
+
author = {Caron, Stéphane and De Mont-Marin, Yann and Budhiraja, Rohan and Bang, Seung Hyeon and Domrachev, Ivan and Nedelchev, Simeon and Du, Peter and Escande, Adrien and Vaillant, Joris and Wingo, Bruce and Patapati, Santosh and San José Pro, Daniel and Marticorena Vidal, Nicolas Guillermo},
|
|
186
|
+
license = {Apache-2.0},
|
|
187
|
+
url = {https://github.com/pink-kinematics/pinker},
|
|
188
|
+
version = {0.1.0},
|
|
189
|
+
year = {2026}
|
|
190
|
+
}
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
Don't forget to add yourself to the BibTeX above and to `CITATION.cff` if you contribute to this repository.
|
|
194
|
+
|
|
195
|
+
## See also
|
|
196
|
+
|
|
197
|
+
Software:
|
|
198
|
+
|
|
199
|
+
- [Jink.jl](https://github.com/adubredu/Jink.jl): Julia package for differential multi-task inverse kinematics.
|
|
200
|
+
- [mink](https://github.com/kevinzakka/mink): differential inverse kinematics in Python, based on the MuJoCo physics engine.
|
|
201
|
+
- [Pink](https://github.com/pink-kinematics/pink/): precursor to Pinker based on Pinocchio.
|
|
202
|
+
- [Pinocchio](https://github.com/stack-of-tasks/pinocchio): C++ rigid body dynamics algorithms library and reference implementation for the C kinematics backend of Pinker.
|
|
203
|
+
- [PlaCo](https://github.com/rhoban/placo): C++ differential multi-task inverse kinematics based on Pinocchio.
|
|
204
|
+
- [pymanoid](https://github.com/stephane-caron/pymanoid): precursor to Pink and Pinker based on OpenRAVE.
|
|
205
|
+
- [TSID](https://github.com/stack-of-tasks/tsid): C++ inverse kinematics based on Pinocchio.
|
|
206
|
+
|
|
207
|
+
Technical notes:
|
|
208
|
+
|
|
209
|
+
- [Inverse kinematics](https://scaron.info/robotics/inverse-kinematics.html): a general introduction to differential inverse kinematics.
|
|
210
|
+
- [Jacobian of a kinematic task and derivatives on manifolds](https://scaron.info/robotics/jacobian-of-a-kinematic-task-and-derivatives-on-manifolds.html).
|
|
211
|
+
- [Control Barrier Functions](https://web.archive.org/web/20241125170734/https://simeon-ned.com/blog/2024/cbf/).
|