dora-openarm-kinematics 0.1.1__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.
@@ -0,0 +1,202 @@
1
+
2
+ Apache License
3
+ Version 2.0, January 2004
4
+ http://www.apache.org/licenses/
5
+
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by
14
+ the copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all
17
+ other entities that control, are controlled by, or are under common
18
+ control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the
20
+ direction or management of such entity, whether by contract or
21
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+ outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity
25
+ exercising permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation
29
+ source, and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the work
39
+ (an example is provided in the Appendix below).
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based on (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, patent, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" text file as part of its
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding those notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
176
+
177
+ END OF TERMS AND CONDITIONS
178
+
179
+ APPENDIX: How to apply the Apache License to your work.
180
+
181
+ To apply the Apache License to your work, attach the following
182
+ boilerplate notice, with the fields enclosed by brackets "[]"
183
+ replaced with your own identifying information. (Don't include
184
+ the brackets!) The text should be enclosed in the appropriate
185
+ comment syntax for the file format. We also recommend that a
186
+ file or class name and description of purpose be included on the
187
+ same "printed page" as the copyright notice for easier
188
+ identification within third-party archives.
189
+
190
+ Copyright [yyyy] [name of copyright owner]
191
+
192
+ Licensed under the Apache License, Version 2.0 (the "License");
193
+ you may not use this file except in compliance with the License.
194
+ You may obtain a copy of the License at
195
+
196
+ http://www.apache.org/licenses/LICENSE-2.0
197
+
198
+ Unless required by applicable law or agreed to in writing, software
199
+ distributed under the License is distributed on an "AS IS" BASIS,
200
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201
+ See the License for the specific language governing permissions and
202
+ limitations under the License.
@@ -0,0 +1,117 @@
1
+ Metadata-Version: 2.4
2
+ Name: dora-openarm-kinematics
3
+ Version: 0.1.1
4
+ Summary: dora-rs nodes for forward and inverse kinematics on OpenArm
5
+ Author: Enactic, Inc.
6
+ Maintainer: Enactic, Inc.
7
+ License: Apache-2.0
8
+ Project-URL: Changelog, https://github.com/enactic/dora-openarm-kinematics/releases
9
+ Project-URL: Issues, https://github.com/enactic/dora-openarm-kinematics/issues
10
+ Project-URL: Repository, https://github.com/enactic/dora-openarm-kinematics
11
+ Requires-Python: >=3.11
12
+ Description-Content-Type: text/markdown
13
+ License-File: LICENSE
14
+ Requires-Dist: dora-rs>=0.5.0
15
+ Requires-Dist: openarm-control
16
+ Requires-Dist: pyarrow
17
+ Dynamic: license-file
18
+
19
+ # dora-openarm-kinematics
20
+
21
+ Dora nodes for forward and inverse kinematics on the OpenArm bimanual robot, backed by MuJoCo and [mink](https://github.com/kevinzakka/mink). FK/IK logic lives in the [`openarm_control`](https://github.com/enactic/openarm_control) package, imported as `control`.
22
+
23
+
24
+ ## Install
25
+
26
+ ```bash
27
+ uv sync
28
+ ```
29
+
30
+ ## Dora Nodes
31
+
32
+
33
+ ### `dora-openarm-fk` — Forward Kinematics
34
+
35
+ Converts per-arm joint angles to end-effector poses via `mj_forward`.
36
+
37
+
38
+ | | |
39
+ |---|---|
40
+ | **Inputs** | `position_right` `float32[8]`, `position_left` `float32[8]` — joints 1–7 + gripper |
41
+ | **Outputs** | `pose_right` `float32[7]`, `pose_left` `float32[7]` — `[px, py, pz, qw, qx, qy, qz]` |
42
+
43
+ ```
44
+ --mode right | left | bimanual (default: bimanual)
45
+ --frame-right MuJoCo site/body/geom name for right EE (default: right_ee_control_point)
46
+ --frame-left MuJoCo site/body/geom name for left EE (default: left_ee_control_point)
47
+ --frame-type-* body | site | geom (default: site)
48
+ --keyframe initial keyframe name (default: home)
49
+ --xml MJCF scene file
50
+ ```
51
+
52
+ ---
53
+
54
+ ### `dora-openarm-ik` — Differential IK
55
+
56
+ Solves joint angles from EE pose targets using mink's QP-based differential IK. Both arms share one `mink.Configuration` and are solved in a single QP per step. DOFs not driven by IK outputs are frozen (finger joints, lifter).
57
+
58
+ | | |
59
+ |---|---|
60
+ | **Inputs** | `target_right` `float32[7]`, `target_left` `float32[7]` — EE pose targets; `position` `float32[16]` — optional joint-state sync; `trigger_right` / `trigger_left` `float32[1]` — gripper pass-through |
61
+ | **Outputs** | `position_right` `float32[8]`, `position_left` `float32[8]` |
62
+
63
+ ```
64
+ --mode right | left | bimanual (default: bimanual)
65
+ --max-iters IK iterations per event (default: 5)
66
+ --dt integration timestep per iteration (default: 0.5)
67
+ --damping global Tikhonov regularization (default: 1e-3)
68
+ --lm-damping per-task LM damping (default: 1e-4)
69
+ --posture-cost posture task weight, 0 = disabled (default: 0.0)
70
+ --pos-cost position task cost (default: 1.0)
71
+ --ori-cost orientation task cost (default: 1.0)
72
+ --solver QP backend (default: daqp)
73
+ --frame-right site/body name for right EE (default: right_ee_control_point)
74
+ --frame-left site/body name for left EE (default: left_ee_control_point)
75
+ --keyframe initial keyframe (default: home)
76
+ --xml MJCF scene file
77
+ ```
78
+
79
+ ## Quick Start
80
+
81
+ ### FK — visualise leader arm poses
82
+
83
+ Reads joint angles from a physical leader arm and publishes end-effector poses. Requires a connected leader device.
84
+
85
+ ```bash
86
+ uv run dora build example/dataflow-dummy-fk.yaml --uv
87
+ uv run dora run example/dataflow-dummy-fk.yaml --uv
88
+ ```
89
+
90
+ ---
91
+
92
+ ### FK → IK roundtrip
93
+
94
+ Pipes FK output directly back into IK to verify the solver round-trips correctly. No physical hardware needed beyond the leader.
95
+
96
+ ```bash
97
+ uv run dora build example/dataflow-dummy-ik.yaml --uv
98
+ uv run dora run example/dataflow-dummy-ik.yaml --uv
99
+ ```
100
+
101
+ **Dataflow:** `leader` → `fk` (joints → poses) → `ik` (poses → joints) → `viewer`
102
+
103
+ Tune the ik solver parameters in:
104
+
105
+ ```yaml
106
+ args: "--mode bimanual --max-iters 5 --dt 0.1 --damping 0.25 --posture-cost 0.01 --lm-damping 0.01"
107
+ ```
108
+
109
+ ## License
110
+
111
+ Licensed under the Apache License 2.0. See [LICENSE](LICENSE) for details.
112
+
113
+ Copyright 2026 Enactic, Inc.
114
+
115
+ ## Code of Conduct
116
+
117
+ All participation in the OpenArm project is governed by our [Code of Conduct](CODE_OF_CONDUCT.md).
@@ -0,0 +1,99 @@
1
+ # dora-openarm-kinematics
2
+
3
+ Dora nodes for forward and inverse kinematics on the OpenArm bimanual robot, backed by MuJoCo and [mink](https://github.com/kevinzakka/mink). FK/IK logic lives in the [`openarm_control`](https://github.com/enactic/openarm_control) package, imported as `control`.
4
+
5
+
6
+ ## Install
7
+
8
+ ```bash
9
+ uv sync
10
+ ```
11
+
12
+ ## Dora Nodes
13
+
14
+
15
+ ### `dora-openarm-fk` — Forward Kinematics
16
+
17
+ Converts per-arm joint angles to end-effector poses via `mj_forward`.
18
+
19
+
20
+ | | |
21
+ |---|---|
22
+ | **Inputs** | `position_right` `float32[8]`, `position_left` `float32[8]` — joints 1–7 + gripper |
23
+ | **Outputs** | `pose_right` `float32[7]`, `pose_left` `float32[7]` — `[px, py, pz, qw, qx, qy, qz]` |
24
+
25
+ ```
26
+ --mode right | left | bimanual (default: bimanual)
27
+ --frame-right MuJoCo site/body/geom name for right EE (default: right_ee_control_point)
28
+ --frame-left MuJoCo site/body/geom name for left EE (default: left_ee_control_point)
29
+ --frame-type-* body | site | geom (default: site)
30
+ --keyframe initial keyframe name (default: home)
31
+ --xml MJCF scene file
32
+ ```
33
+
34
+ ---
35
+
36
+ ### `dora-openarm-ik` — Differential IK
37
+
38
+ Solves joint angles from EE pose targets using mink's QP-based differential IK. Both arms share one `mink.Configuration` and are solved in a single QP per step. DOFs not driven by IK outputs are frozen (finger joints, lifter).
39
+
40
+ | | |
41
+ |---|---|
42
+ | **Inputs** | `target_right` `float32[7]`, `target_left` `float32[7]` — EE pose targets; `position` `float32[16]` — optional joint-state sync; `trigger_right` / `trigger_left` `float32[1]` — gripper pass-through |
43
+ | **Outputs** | `position_right` `float32[8]`, `position_left` `float32[8]` |
44
+
45
+ ```
46
+ --mode right | left | bimanual (default: bimanual)
47
+ --max-iters IK iterations per event (default: 5)
48
+ --dt integration timestep per iteration (default: 0.5)
49
+ --damping global Tikhonov regularization (default: 1e-3)
50
+ --lm-damping per-task LM damping (default: 1e-4)
51
+ --posture-cost posture task weight, 0 = disabled (default: 0.0)
52
+ --pos-cost position task cost (default: 1.0)
53
+ --ori-cost orientation task cost (default: 1.0)
54
+ --solver QP backend (default: daqp)
55
+ --frame-right site/body name for right EE (default: right_ee_control_point)
56
+ --frame-left site/body name for left EE (default: left_ee_control_point)
57
+ --keyframe initial keyframe (default: home)
58
+ --xml MJCF scene file
59
+ ```
60
+
61
+ ## Quick Start
62
+
63
+ ### FK — visualise leader arm poses
64
+
65
+ Reads joint angles from a physical leader arm and publishes end-effector poses. Requires a connected leader device.
66
+
67
+ ```bash
68
+ uv run dora build example/dataflow-dummy-fk.yaml --uv
69
+ uv run dora run example/dataflow-dummy-fk.yaml --uv
70
+ ```
71
+
72
+ ---
73
+
74
+ ### FK → IK roundtrip
75
+
76
+ Pipes FK output directly back into IK to verify the solver round-trips correctly. No physical hardware needed beyond the leader.
77
+
78
+ ```bash
79
+ uv run dora build example/dataflow-dummy-ik.yaml --uv
80
+ uv run dora run example/dataflow-dummy-ik.yaml --uv
81
+ ```
82
+
83
+ **Dataflow:** `leader` → `fk` (joints → poses) → `ik` (poses → joints) → `viewer`
84
+
85
+ Tune the ik solver parameters in:
86
+
87
+ ```yaml
88
+ args: "--mode bimanual --max-iters 5 --dt 0.1 --damping 0.25 --posture-cost 0.01 --lm-damping 0.01"
89
+ ```
90
+
91
+ ## License
92
+
93
+ Licensed under the Apache License 2.0. See [LICENSE](LICENSE) for details.
94
+
95
+ Copyright 2026 Enactic, Inc.
96
+
97
+ ## Code of Conduct
98
+
99
+ All participation in the OpenArm project is governed by our [Code of Conduct](CODE_OF_CONDUCT.md).
@@ -0,0 +1,59 @@
1
+ # Copyright 2026 Enactic, Inc.
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ [build-system]
16
+ requires = ["setuptools>=64", "wheel"]
17
+ build-backend = "setuptools.build_meta"
18
+
19
+ [project]
20
+ name = "dora-openarm-kinematics"
21
+ version = "0.1.1"
22
+ authors = [{name = "Enactic, Inc."}]
23
+ description = "dora-rs nodes for forward and inverse kinematics on OpenArm"
24
+ license = {text = "Apache-2.0"}
25
+ maintainers = [{name = "Enactic, Inc."}]
26
+ readme = "README.md"
27
+ requires-python = ">=3.11"
28
+ dependencies = [
29
+ "dora-rs>=0.5.0",
30
+ "openarm-control",
31
+ "pyarrow",
32
+ ]
33
+
34
+ [dependency-groups]
35
+ dev = [
36
+ "dora-rs-cli>=0.5.0",
37
+ "ruff==0.14.11", # sync with .pre-commit-config.yaml
38
+ ]
39
+
40
+ [project.urls]
41
+ Changelog = "https://github.com/enactic/dora-openarm-kinematics/releases"
42
+ Issues = "https://github.com/enactic/dora-openarm-kinematics/issues"
43
+ Repository = "https://github.com/enactic/dora-openarm-kinematics"
44
+
45
+ [project.scripts]
46
+ dora-openarm-fk = "dora_openarm_kinematics.fk:main"
47
+ dora-openarm-ik = "dora_openarm_kinematics.ik:main"
48
+
49
+ [tool.setuptools]
50
+ package-dir = {"" = "src"}
51
+
52
+ [tool.setuptools.packages.find]
53
+ where = ["src"]
54
+
55
+ [tool.ruff.lint]
56
+ extend-select = [
57
+ "D", # pydocstyle
58
+ "UP"
59
+ ]
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1,27 @@
1
+ # Copyright 2026 Enactic, Inc.
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ """dora-rs nodes for inverse and forward kinematics on OpenArm."""
16
+
17
+ import os
18
+
19
+ # Define the path to the README file relative to the package directory
20
+ readme_path = os.path.join(os.path.dirname(os.path.dirname(__file__)), "README.md")
21
+
22
+ # Read the content of the README file
23
+ try:
24
+ with open(readme_path, encoding="utf-8") as f:
25
+ __doc__ = f.read()
26
+ except FileNotFoundError:
27
+ __doc__ = "README file not found."
@@ -0,0 +1,106 @@
1
+ # Copyright 2026 Enactic, Inc.
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ """Dora node: forward kinematics for OpenArm bimanual setup.
16
+
17
+ Receives per-arm 8-value joint position arrays and publishes the
18
+ end-effector pose for the arm that was updated.
19
+
20
+ Inputs:
21
+ position_right – float32[8] right arm joints 1–7 + gripper
22
+ position_left – float32[8] left arm joints 1–7 + gripper
23
+
24
+ Outputs:
25
+ pose_right – float32[7] [px, py, pz, qw, qx, qy, qz]
26
+ pose_left – float32[7] [px, py, pz, qw, qx, qy, qz]
27
+ status – ["ready"] on startup
28
+ """
29
+
30
+ import argparse
31
+ import time
32
+
33
+ import dora
34
+ import numpy as np
35
+ import pyarrow as pa
36
+
37
+ from openarm_control import Kinematics, register_common_args, setup_from_args
38
+
39
+
40
+ def _run(args: argparse.Namespace) -> None:
41
+ kin = Kinematics(setup_from_args(args))
42
+
43
+ node = dora.Node()
44
+ node.send_output("status", pa.array(["ready"]))
45
+
46
+ step_count = 0
47
+ t_loop_start = time.perf_counter()
48
+
49
+ for event in node:
50
+ if event["type"] != "INPUT":
51
+ continue
52
+
53
+ eid = event["id"]
54
+ if eid == "position_right" and "right" in kin.setup.sides:
55
+ values = np.array(event["value"], dtype=np.float32)
56
+ if values.shape != (8,):
57
+ print(
58
+ f"Warning: expected position_right[8], got {values.shape}. Skipping."
59
+ )
60
+ continue
61
+ t0 = time.perf_counter()
62
+ pose = kin.fk("right", values)
63
+ node.send_output(
64
+ "pose_right",
65
+ pa.array(pose, type=pa.float32()),
66
+ {"timestamp": time.time_ns()},
67
+ )
68
+
69
+ elif eid == "position_left" and "left" in kin.setup.sides:
70
+ values = np.array(event["value"], dtype=np.float32)
71
+ if values.shape != (8,):
72
+ print(
73
+ f"Warning: expected position_left[8], got {values.shape}. Skipping."
74
+ )
75
+ continue
76
+ t0 = time.perf_counter()
77
+ pose = kin.fk("left", values)
78
+ node.send_output(
79
+ "pose_left",
80
+ pa.array(pose, type=pa.float32()),
81
+ {"timestamp": time.time_ns()},
82
+ )
83
+
84
+ else:
85
+ continue
86
+
87
+ step_count += 1
88
+ step_ms = (time.perf_counter() - t0) * 1e3
89
+ elapsed = time.perf_counter() - t_loop_start
90
+ hz = step_count / elapsed if elapsed > 0 else 0.0
91
+ if step_count % 2000 == 0:
92
+ print(f"[fk] step={step_count:5d} step={step_ms:.2f}ms hz={hz:.1f}")
93
+
94
+
95
+ def main() -> None:
96
+ """Forward kinematics for OpenArm."""
97
+ parser = argparse.ArgumentParser(
98
+ description="FK dora node – OpenArm end-effector poses from joint angles"
99
+ )
100
+ register_common_args(parser)
101
+ args = parser.parse_args()
102
+ _run(args)
103
+
104
+
105
+ if __name__ == "__main__":
106
+ main()
@@ -0,0 +1,128 @@
1
+ # Copyright 2026 Enactic, Inc.
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ """Dora node: mink-based differential IK solver for OpenArm.
16
+
17
+ Accepts end-effector pose targets and solves joint angles via mink's QP-based
18
+ differential IK. Both arms share one mink.Configuration and one QP solve per
19
+ step.
20
+
21
+ Pose convention (inputs and outputs): float32[7] = [px, py, pz, qw, qx, qy, qz]
22
+ Inputs:
23
+ target_right – float32[7] right EE target pose
24
+ target_left – float32[7] left EE target pose
25
+ position – float32[16] current joint state right[8]+left[8] (optional sync)
26
+
27
+ Outputs:
28
+ position_right – float32[8] solved right arm joint angles
29
+ position_left – float32[8] solved left arm joint angles
30
+ status – ["ready"] on startup
31
+ """
32
+
33
+ from __future__ import annotations
34
+
35
+ import argparse
36
+ import time
37
+
38
+ import dora
39
+ import numpy as np
40
+ import pyarrow as pa
41
+
42
+ from openarm_control import (
43
+ Kinematics,
44
+ register_common_args,
45
+ register_ik_args,
46
+ ik_params_from_args,
47
+ setup_from_args,
48
+ )
49
+
50
+
51
+ def _map_trigger_to_gripper(trigger: float, side: str) -> float:
52
+ """Trigger 0.0~1.0 → gripper angle."""
53
+ if side == "right":
54
+ return (-1.57 / 2.0) * (1.0 - trigger) # 0→-1.57, 1→0
55
+ else:
56
+ return (1.57 / 2.0) * (1.0 - trigger) # 0→ 1.57, 1→0
57
+
58
+
59
+ def _run(args: argparse.Namespace) -> None:
60
+ kin = Kinematics(setup_from_args(args), ik_params_from_args(args))
61
+
62
+ node = dora.Node()
63
+ node.send_output("status", pa.array(["ready"]))
64
+
65
+ for event in node:
66
+ if event["type"] != "INPUT":
67
+ continue
68
+
69
+ eid = event["id"]
70
+ values = np.array(event["value"], dtype=np.float32)
71
+
72
+ if eid == "position":
73
+ if values.shape == (16,):
74
+ kin.sync(values)
75
+ continue
76
+
77
+ if eid == "target_right" and "right" in kin.setup.sides:
78
+ if values.shape != (7,):
79
+ print(
80
+ f"Warning: expected target_right[7], got {values.shape}. Skipping."
81
+ )
82
+ continue
83
+ kin.set_target("right", values)
84
+
85
+ elif eid == "target_left" and "left" in kin.setup.sides:
86
+ if values.shape != (7,):
87
+ print(
88
+ f"Warning: expected target_left[7], got {values.shape}. Skipping."
89
+ )
90
+ continue
91
+ kin.set_target("left", values)
92
+
93
+ elif eid == "trigger_right":
94
+ kin.set_gripper("right", _map_trigger_to_gripper(float(values[0]), "right"))
95
+ continue
96
+
97
+ elif eid == "trigger_left":
98
+ kin.set_gripper("left", _map_trigger_to_gripper(float(values[0]), "left"))
99
+ continue
100
+
101
+ else:
102
+ continue
103
+
104
+ if not kin.ready():
105
+ continue
106
+
107
+ result = kin.solve()
108
+ if result is None:
109
+ continue
110
+
111
+ ts = {"timestamp": time.time_ns()}
112
+ node.send_output("position_right", pa.array(result[:8], type=pa.float32()), ts)
113
+ node.send_output("position_left", pa.array(result[8:16], type=pa.float32()), ts)
114
+
115
+
116
+ def main() -> None:
117
+ """Inverse kinematics for OpenArm."""
118
+ parser = argparse.ArgumentParser(
119
+ description="Mink IK dora node – OpenArm end-effector pose → joint angles"
120
+ )
121
+ register_common_args(parser)
122
+ register_ik_args(parser)
123
+ args = parser.parse_args()
124
+ _run(args)
125
+
126
+
127
+ if __name__ == "__main__":
128
+ main()
@@ -0,0 +1,117 @@
1
+ Metadata-Version: 2.4
2
+ Name: dora-openarm-kinematics
3
+ Version: 0.1.1
4
+ Summary: dora-rs nodes for forward and inverse kinematics on OpenArm
5
+ Author: Enactic, Inc.
6
+ Maintainer: Enactic, Inc.
7
+ License: Apache-2.0
8
+ Project-URL: Changelog, https://github.com/enactic/dora-openarm-kinematics/releases
9
+ Project-URL: Issues, https://github.com/enactic/dora-openarm-kinematics/issues
10
+ Project-URL: Repository, https://github.com/enactic/dora-openarm-kinematics
11
+ Requires-Python: >=3.11
12
+ Description-Content-Type: text/markdown
13
+ License-File: LICENSE
14
+ Requires-Dist: dora-rs>=0.5.0
15
+ Requires-Dist: openarm-control
16
+ Requires-Dist: pyarrow
17
+ Dynamic: license-file
18
+
19
+ # dora-openarm-kinematics
20
+
21
+ Dora nodes for forward and inverse kinematics on the OpenArm bimanual robot, backed by MuJoCo and [mink](https://github.com/kevinzakka/mink). FK/IK logic lives in the [`openarm_control`](https://github.com/enactic/openarm_control) package, imported as `control`.
22
+
23
+
24
+ ## Install
25
+
26
+ ```bash
27
+ uv sync
28
+ ```
29
+
30
+ ## Dora Nodes
31
+
32
+
33
+ ### `dora-openarm-fk` — Forward Kinematics
34
+
35
+ Converts per-arm joint angles to end-effector poses via `mj_forward`.
36
+
37
+
38
+ | | |
39
+ |---|---|
40
+ | **Inputs** | `position_right` `float32[8]`, `position_left` `float32[8]` — joints 1–7 + gripper |
41
+ | **Outputs** | `pose_right` `float32[7]`, `pose_left` `float32[7]` — `[px, py, pz, qw, qx, qy, qz]` |
42
+
43
+ ```
44
+ --mode right | left | bimanual (default: bimanual)
45
+ --frame-right MuJoCo site/body/geom name for right EE (default: right_ee_control_point)
46
+ --frame-left MuJoCo site/body/geom name for left EE (default: left_ee_control_point)
47
+ --frame-type-* body | site | geom (default: site)
48
+ --keyframe initial keyframe name (default: home)
49
+ --xml MJCF scene file
50
+ ```
51
+
52
+ ---
53
+
54
+ ### `dora-openarm-ik` — Differential IK
55
+
56
+ Solves joint angles from EE pose targets using mink's QP-based differential IK. Both arms share one `mink.Configuration` and are solved in a single QP per step. DOFs not driven by IK outputs are frozen (finger joints, lifter).
57
+
58
+ | | |
59
+ |---|---|
60
+ | **Inputs** | `target_right` `float32[7]`, `target_left` `float32[7]` — EE pose targets; `position` `float32[16]` — optional joint-state sync; `trigger_right` / `trigger_left` `float32[1]` — gripper pass-through |
61
+ | **Outputs** | `position_right` `float32[8]`, `position_left` `float32[8]` |
62
+
63
+ ```
64
+ --mode right | left | bimanual (default: bimanual)
65
+ --max-iters IK iterations per event (default: 5)
66
+ --dt integration timestep per iteration (default: 0.5)
67
+ --damping global Tikhonov regularization (default: 1e-3)
68
+ --lm-damping per-task LM damping (default: 1e-4)
69
+ --posture-cost posture task weight, 0 = disabled (default: 0.0)
70
+ --pos-cost position task cost (default: 1.0)
71
+ --ori-cost orientation task cost (default: 1.0)
72
+ --solver QP backend (default: daqp)
73
+ --frame-right site/body name for right EE (default: right_ee_control_point)
74
+ --frame-left site/body name for left EE (default: left_ee_control_point)
75
+ --keyframe initial keyframe (default: home)
76
+ --xml MJCF scene file
77
+ ```
78
+
79
+ ## Quick Start
80
+
81
+ ### FK — visualise leader arm poses
82
+
83
+ Reads joint angles from a physical leader arm and publishes end-effector poses. Requires a connected leader device.
84
+
85
+ ```bash
86
+ uv run dora build example/dataflow-dummy-fk.yaml --uv
87
+ uv run dora run example/dataflow-dummy-fk.yaml --uv
88
+ ```
89
+
90
+ ---
91
+
92
+ ### FK → IK roundtrip
93
+
94
+ Pipes FK output directly back into IK to verify the solver round-trips correctly. No physical hardware needed beyond the leader.
95
+
96
+ ```bash
97
+ uv run dora build example/dataflow-dummy-ik.yaml --uv
98
+ uv run dora run example/dataflow-dummy-ik.yaml --uv
99
+ ```
100
+
101
+ **Dataflow:** `leader` → `fk` (joints → poses) → `ik` (poses → joints) → `viewer`
102
+
103
+ Tune the ik solver parameters in:
104
+
105
+ ```yaml
106
+ args: "--mode bimanual --max-iters 5 --dt 0.1 --damping 0.25 --posture-cost 0.01 --lm-damping 0.01"
107
+ ```
108
+
109
+ ## License
110
+
111
+ Licensed under the Apache License 2.0. See [LICENSE](LICENSE) for details.
112
+
113
+ Copyright 2026 Enactic, Inc.
114
+
115
+ ## Code of Conduct
116
+
117
+ All participation in the OpenArm project is governed by our [Code of Conduct](CODE_OF_CONDUCT.md).
@@ -0,0 +1,12 @@
1
+ LICENSE
2
+ README.md
3
+ pyproject.toml
4
+ src/dora_openarm_kinematics/__init__.py
5
+ src/dora_openarm_kinematics/fk.py
6
+ src/dora_openarm_kinematics/ik.py
7
+ src/dora_openarm_kinematics.egg-info/PKG-INFO
8
+ src/dora_openarm_kinematics.egg-info/SOURCES.txt
9
+ src/dora_openarm_kinematics.egg-info/dependency_links.txt
10
+ src/dora_openarm_kinematics.egg-info/entry_points.txt
11
+ src/dora_openarm_kinematics.egg-info/requires.txt
12
+ src/dora_openarm_kinematics.egg-info/top_level.txt
@@ -0,0 +1,3 @@
1
+ [console_scripts]
2
+ dora-openarm-fk = dora_openarm_kinematics.fk:main
3
+ dora-openarm-ik = dora_openarm_kinematics.ik:main
@@ -0,0 +1,3 @@
1
+ dora-rs>=0.5.0
2
+ openarm-control
3
+ pyarrow