lockwire 0.2.5__tar.gz → 0.2.7__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.
Files changed (107) hide show
  1. lockwire-0.2.7/LICENSE +202 -0
  2. lockwire-0.2.7/NOTICE +4 -0
  3. lockwire-0.2.7/PKG-INFO +163 -0
  4. lockwire-0.2.7/README.md +123 -0
  5. {lockwire-0.2.5 → lockwire-0.2.7}/pyproject.toml +33 -11
  6. lockwire-0.2.7/src/lockwire/__init__.py +46 -0
  7. {lockwire-0.2.5 → lockwire-0.2.7}/src/lockwire/__main__.py +2 -2
  8. lockwire-0.2.7/src/lockwire/agent_setup.py +133 -0
  9. {lockwire-0.2.5 → lockwire-0.2.7}/src/lockwire/api.py +65 -10
  10. {lockwire-0.2.5 → lockwire-0.2.7}/src/lockwire/api_payload.py +80 -1
  11. lockwire-0.2.7/src/lockwire/catalog.py +288 -0
  12. lockwire-0.2.7/src/lockwire/catalog_robots.yaml +136 -0
  13. {lockwire-0.2.5 → lockwire-0.2.7}/src/lockwire/catalog_seed.yaml +226 -0
  14. lockwire-0.2.7/src/lockwire/check_sim.py +396 -0
  15. {lockwire-0.2.5 → lockwire-0.2.7}/src/lockwire/checks.py +2692 -166
  16. {lockwire-0.2.5 → lockwire-0.2.7}/src/lockwire/cli.py +801 -79
  17. {lockwire-0.2.5 → lockwire-0.2.7}/src/lockwire/cli_line.py +24 -5
  18. {lockwire-0.2.5 → lockwire-0.2.7}/src/lockwire/copy.py +1 -0
  19. lockwire-0.2.7/src/lockwire/drift.py +97 -0
  20. {lockwire-0.2.5 → lockwire-0.2.7}/src/lockwire/edit.py +69 -112
  21. lockwire-0.2.7/src/lockwire/examples/arm/contract.yaml +335 -0
  22. lockwire-0.2.7/src/lockwire/examples/arm/plan.yaml +11 -0
  23. {lockwire-0.2.5 → lockwire-0.2.7}/src/lockwire/examples/drone/contract.yaml +6 -107
  24. lockwire-0.2.7/src/lockwire/examples/drone/plan.yaml +10 -0
  25. {lockwire-0.2.5 → lockwire-0.2.7}/src/lockwire/examples/drone/scene.glb +0 -0
  26. lockwire-0.2.7/src/lockwire/examples/humanoid/contract.yaml +1780 -0
  27. lockwire-0.2.7/src/lockwire/examples/humanoid/plan.yaml +11 -0
  28. lockwire-0.2.7/src/lockwire/examples/quadruped/contract.yaml +490 -0
  29. lockwire-0.2.7/src/lockwire/examples/rover/contract.yaml +322 -0
  30. lockwire-0.2.7/src/lockwire/examples/servo-bench.yaml +156 -0
  31. lockwire-0.2.7/src/lockwire/fieldpath.py +96 -0
  32. lockwire-0.2.7/src/lockwire/hook_check.py +114 -0
  33. lockwire-0.2.7/src/lockwire/mcp_server.py +527 -0
  34. {lockwire-0.2.5 → lockwire-0.2.7}/src/lockwire/mesh_simple.py +3 -1
  35. {lockwire-0.2.5 → lockwire-0.2.7}/src/lockwire/page.py +114 -22
  36. {lockwire-0.2.5 → lockwire-0.2.7}/src/lockwire/parts_list.py +12 -2
  37. {lockwire-0.2.5 → lockwire-0.2.7}/src/lockwire/plan.py +6 -7
  38. {lockwire-0.2.5 → lockwire-0.2.7}/src/lockwire/plan_payload.py +11 -0
  39. {lockwire-0.2.5 → lockwire-0.2.7}/src/lockwire/plugins.py +13 -0
  40. {lockwire-0.2.5 → lockwire-0.2.7}/src/lockwire/report.py +192 -14
  41. {lockwire-0.2.5 → lockwire-0.2.7}/src/lockwire/report_html.py +1 -1
  42. {lockwire-0.2.5 → lockwire-0.2.7}/src/lockwire/report_json.py +39 -2
  43. {lockwire-0.2.5 → lockwire-0.2.7}/src/lockwire/scene_import.py +2 -2
  44. {lockwire-0.2.5 → lockwire-0.2.7}/src/lockwire/scene_urdf.py +53 -17
  45. {lockwire-0.2.5 → lockwire-0.2.7}/src/lockwire/schema.py +246 -26
  46. {lockwire-0.2.5 → lockwire-0.2.7}/src/lockwire/sdf.py +126 -3
  47. {lockwire-0.2.5 → lockwire-0.2.7}/src/lockwire/serve.py +94 -8
  48. lockwire-0.2.7/src/lockwire/servo_bus.py +240 -0
  49. lockwire-0.2.7/src/lockwire/servo_bus_dxl.py +135 -0
  50. lockwire-0.2.7/src/lockwire/start_operation.py +459 -0
  51. {lockwire-0.2.5 → lockwire-0.2.7}/src/lockwire/statics.py +30 -21
  52. lockwire-0.2.7/src/lockwire/swap.py +382 -0
  53. lockwire-0.2.7/src/lockwire/thrust.py +77 -0
  54. lockwire-0.2.7/src/lockwire/thrust_tables.yaml +133 -0
  55. {lockwire-0.2.5 → lockwire-0.2.7}/src/lockwire/urdf.py +213 -51
  56. lockwire-0.2.5/PKG-INFO +0 -306
  57. lockwire-0.2.5/README.md +0 -272
  58. lockwire-0.2.5/src/lockwire/__init__.py +0 -9
  59. lockwire-0.2.5/src/lockwire/catalog.py +0 -100
  60. lockwire-0.2.5/src/lockwire/examples/arm/contract.yaml +0 -311
  61. lockwire-0.2.5/src/lockwire/examples/arm/plan.yaml +0 -9
  62. lockwire-0.2.5/src/lockwire/examples/drone/plan.yaml +0 -10
  63. lockwire-0.2.5/src/lockwire/examples/humanoid/contract.yaml +0 -1695
  64. lockwire-0.2.5/src/lockwire/examples/humanoid/plan.yaml +0 -10
  65. lockwire-0.2.5/src/lockwire/examples/quadruped/contract.yaml +0 -491
  66. lockwire-0.2.5/src/lockwire/examples/rover/contract.yaml +0 -322
  67. lockwire-0.2.5/src/lockwire/examples/servo-bench.yaml +0 -113
  68. lockwire-0.2.5/src/lockwire/mcp_server.py +0 -298
  69. lockwire-0.2.5/src/lockwire/start_operation.py +0 -180
  70. {lockwire-0.2.5 → lockwire-0.2.7}/src/lockwire/_filelock.py +0 -0
  71. {lockwire-0.2.5 → lockwire-0.2.7}/src/lockwire/advice.py +0 -0
  72. {lockwire-0.2.5 → lockwire-0.2.7}/src/lockwire/bench.py +0 -0
  73. {lockwire-0.2.5 → lockwire-0.2.7}/src/lockwire/blame.py +0 -0
  74. {lockwire-0.2.5 → lockwire-0.2.7}/src/lockwire/confine.py +0 -0
  75. {lockwire-0.2.5 → lockwire-0.2.7}/src/lockwire/constraints.py +0 -0
  76. {lockwire-0.2.5 → lockwire-0.2.7}/src/lockwire/describe.py +0 -0
  77. {lockwire-0.2.5 → lockwire-0.2.7}/src/lockwire/emit_ts.py +0 -0
  78. {lockwire-0.2.5 → lockwire-0.2.7}/src/lockwire/examples/arm/LICENSE +0 -0
  79. {lockwire-0.2.5 → lockwire-0.2.7}/src/lockwire/examples/arm/NOTICE +0 -0
  80. {lockwire-0.2.5 → lockwire-0.2.7}/src/lockwire/examples/arm/scene.glb +0 -0
  81. {lockwire-0.2.5 → lockwire-0.2.7}/src/lockwire/examples/arm/starter.json +0 -0
  82. {lockwire-0.2.5 → lockwire-0.2.7}/src/lockwire/examples/drone/starter.json +0 -0
  83. {lockwire-0.2.5 → lockwire-0.2.7}/src/lockwire/examples/humanoid/NOTICE +0 -0
  84. {lockwire-0.2.5 → lockwire-0.2.7}/src/lockwire/examples/humanoid/scene.glb +0 -0
  85. {lockwire-0.2.5 → lockwire-0.2.7}/src/lockwire/examples/humanoid/starter.json +0 -0
  86. {lockwire-0.2.5 → lockwire-0.2.7}/src/lockwire/examples/quadruped/NOTICE +0 -0
  87. {lockwire-0.2.5 → lockwire-0.2.7}/src/lockwire/examples/quadruped/plan.yaml +0 -0
  88. {lockwire-0.2.5 → lockwire-0.2.7}/src/lockwire/examples/quadruped/scene.glb +0 -0
  89. {lockwire-0.2.5 → lockwire-0.2.7}/src/lockwire/examples/quadruped/starter.json +0 -0
  90. {lockwire-0.2.5 → lockwire-0.2.7}/src/lockwire/examples/rover/NOTICE +0 -0
  91. {lockwire-0.2.5 → lockwire-0.2.7}/src/lockwire/examples/rover/plan.yaml +0 -0
  92. {lockwire-0.2.5 → lockwire-0.2.7}/src/lockwire/examples/rover/scene.glb +0 -0
  93. {lockwire-0.2.5 → lockwire-0.2.7}/src/lockwire/examples/rover/starter.json +0 -0
  94. {lockwire-0.2.5 → lockwire-0.2.7}/src/lockwire/export_mhs.py +0 -0
  95. {lockwire-0.2.5 → lockwire-0.2.7}/src/lockwire/factdiff.py +0 -0
  96. {lockwire-0.2.5 → lockwire-0.2.7}/src/lockwire/forces.py +0 -0
  97. {lockwire-0.2.5 → lockwire-0.2.7}/src/lockwire/gitref.py +0 -0
  98. {lockwire-0.2.5 → lockwire-0.2.7}/src/lockwire/hw.py +0 -0
  99. {lockwire-0.2.5 → lockwire-0.2.7}/src/lockwire/mechanism.py +0 -0
  100. {lockwire-0.2.5 → lockwire-0.2.7}/src/lockwire/mesh_dae.py +0 -0
  101. {lockwire-0.2.5 → lockwire-0.2.7}/src/lockwire/review_draft.py +0 -0
  102. {lockwire-0.2.5 → lockwire-0.2.7}/src/lockwire/scan.py +0 -0
  103. {lockwire-0.2.5 → lockwire-0.2.7}/src/lockwire/scene.py +0 -0
  104. {lockwire-0.2.5 → lockwire-0.2.7}/src/lockwire/scene_view.py +0 -0
  105. {lockwire-0.2.5 → lockwire-0.2.7}/src/lockwire/units.py +0 -0
  106. {lockwire-0.2.5 → lockwire-0.2.7}/src/lockwire/vcs.py +0 -0
  107. {lockwire-0.2.5 → lockwire-0.2.7}/src/lockwire/whatif.py +0 -0
lockwire-0.2.7/LICENSE ADDED
@@ -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.
lockwire-0.2.7/NOTICE ADDED
@@ -0,0 +1,4 @@
1
+ Lockwire
2
+ Copyright 2026 Shivansh
3
+
4
+ This product includes software developed by Shivansh (lockwire).
@@ -0,0 +1,163 @@
1
+ Metadata-Version: 2.4
2
+ Name: lockwire
3
+ Version: 0.2.7
4
+ Summary: The physical-assumption contract for robots: checks that a robot's declared parts (power, weight, bus, torque) add up
5
+ Keywords: robotics,urdf,ros,preflight,lockfile,ci,hardware,drone
6
+ Author: Shivansh
7
+ License-Expression: Apache-2.0
8
+ License-File: LICENSE
9
+ License-File: NOTICE
10
+ Classifier: Development Status :: 3 - Alpha
11
+ Classifier: Intended Audience :: Manufacturing
12
+ Classifier: Intended Audience :: Science/Research
13
+ Classifier: Programming Language :: Python :: 3.12
14
+ Classifier: Programming Language :: Python :: 3.13
15
+ Classifier: Topic :: Scientific/Engineering
16
+ Classifier: Topic :: Software Development :: Quality Assurance
17
+ Classifier: Topic :: Software Development :: Testing
18
+ Requires-Dist: numpy>=2.5.1
19
+ Requires-Dist: pydantic>=2.13.4,<3
20
+ Requires-Dist: rich>=15.0.0
21
+ Requires-Dist: ruamel-yaml>=0.19.1,<0.20
22
+ Requires-Dist: typer>=0.26.8,<0.29
23
+ Requires-Dist: xacro>=2.1.1
24
+ Requires-Dist: pyserial>=3.5 ; extra == 'bus'
25
+ Requires-Dist: mcp>=2.2.0,<3 ; extra == 'mcp'
26
+ Requires-Dist: pyjwt>=2.15 ; extra == 'mcp'
27
+ Requires-Dist: robot-descriptions>=3.3.0,<4 ; extra == 'robots'
28
+ Requires-Dist: xacrodoc>=2.0.1 ; extra == 'robots'
29
+ Requires-Dist: fastapi>=0.141.1 ; extra == 'serve'
30
+ Requires-Dist: uvicorn>=0.52.4 ; extra == 'serve'
31
+ Requires-Python: >=3.12
32
+ Project-URL: Homepage, https://github.com/Shivansh2703/lockwire
33
+ Project-URL: Repository, https://github.com/Shivansh2703/lockwire
34
+ Project-URL: Issues, https://github.com/Shivansh2703/lockwire/issues
35
+ Provides-Extra: bus
36
+ Provides-Extra: mcp
37
+ Provides-Extra: robots
38
+ Provides-Extra: serve
39
+ Description-Content-Type: text/markdown
40
+
41
+ <p align="center">
42
+ <picture>
43
+ <source media="(prefers-color-scheme: dark)" srcset="docs/img/logo-dark.svg">
44
+ <img src="docs/img/logo-light.svg" alt="lockwire" height="64">
45
+ </picture>
46
+ </p>
47
+
48
+ **From idea to robot: catch the error in your robot model before the real robot does.**
49
+
50
+ ## Try it on your robot
51
+
52
+ Needs Python 3.12 or newer and [uv](https://docs.astral.sh/uv/). Point it at your URDF, xacro or SDF (nothing is written):
53
+
54
+ ```bash
55
+ uvx lockwire check robot.urdf
56
+ ```
57
+
58
+ What you see, on the public TurtleBot3 Waffle Pi URDF:
59
+
60
+ ```console
61
+ $ uvx lockwire check turtlebot3_waffle_pi.urdf
62
+ VIOLATION datasheet/turtlebot3-waffle-pi/mass_total — observed URDF sum of link masses: 1.554, expected ROBOTIS TurtleBot3 Waffle Pi
63
+ datasheet: 1.8 kg; the sheet's figure includes the battery, computer and sensors
64
+ (Δ -13.7%)
65
+ source: https://emanual.robotis.com/docs/en/platform/turtlebot3/features/
66
+ ...
67
+ NO-GO — 1 violation(s), 3 warning(s)
68
+ ...
69
+ Lock it so CI catches drift: uvx lockwire start turtlebot3_waffle_pi.urdf
70
+ ```
71
+
72
+ The model's links add up to 13.7% less than the maker's own published weight. Lockwire found
73
+ that without being told, named the page it came from, and printed the next command. Errors like
74
+ this are in public robot models today: [the fixes sent upstream](docs/ledger.md).
75
+
76
+ ## Lock it
77
+
78
+ ```bash
79
+ uvx lockwire start robot.urdf
80
+ ```
81
+
82
+ This writes `lockwire.yaml`, the robot's physics lockfile: every link's mass, centre of mass and
83
+ inertia, every joint limit, and a hash of the model's structure. Commit it next to your model.
84
+ From now on `uvx lockwire check` checks the lockfile, and a mass or joint limit edited in the
85
+ model without re-locking is a NO-GO that names the value.
86
+
87
+ ## Run it in CI
88
+
89
+ ```bash
90
+ uvx lockwire agent-setup --ci
91
+ ```
92
+
93
+ That writes `.github/workflows/lockwire.yml`. Its step, with the three inputs most repos need:
94
+
95
+ ```yaml
96
+ - uses: actions/checkout@v4
97
+ - uses: Shivansh2703/lockwire@v0
98
+ with:
99
+ contract: lockwire.yaml # the lockfile
100
+ # model: robot.urdf # or check a model directly, with no lockfile
101
+ # adopt: "true" # annotate and report, but never fail the job
102
+ ```
103
+
104
+ A NO-GO fails the build, with annotations on the pull request and an HTML report.
105
+ Every input, pre-commit and other CI systems: [docs/guides/ci.md](docs/guides/ci.md).
106
+
107
+ ## Let your AI agent check it
108
+
109
+ ```bash
110
+ claude mcp add lockwire -- uvx --from "lockwire[mcp]" lockwire mcp
111
+ uvx lockwire agent-setup
112
+ ```
113
+
114
+ The first line gives Claude Code the checks over MCP. `agent-setup` writes the agent rules into
115
+ AGENTS.md and the Claude Code one, plus a pre-commit hook and the CI workflow.
116
+ Cursor, Claude Desktop and other agents: [docs/guides/agents.md](docs/guides/agents.md).
117
+
118
+ ## No robot file? Try an example
119
+
120
+ servo-bench is built to fail: a 5 V rail overloaded and a wrist servo too weak, on purpose, so you can see what a catch looks like.
121
+
122
+ ```console
123
+ $ uvx lockwire start --example servo-bench
124
+ wrote lockwire.yaml — example servo-bench (built to fail: a 5 V rail overloaded and a wrist servo too weak, on purpose, so you can see what a catch looks like). Next: uvx lockwire check lockwire.yaml
125
+ $ uvx lockwire check
126
+ VIOLATION model/joints/wrist/limits/effort — observed 0.40 N*m joint effort limit, expected <= 0.226 N*m, the feetech.scs0009
127
+ stall torque (Δ 1.8x the stall torque)
128
+ ...
129
+ action: ... or find a stronger servo: lockwire swap lockwire.yaml wrist
130
+ VIOLATION budgets/bud.power.servo-5v — observed 32.10 W, expected <= 15.00 W (Δ +17.10 W (+114%))
131
+ ...
132
+ NO-GO — 2 violation(s), 0 warning(s)
133
+ ```
134
+
135
+ The five robots (`--example drone`, `rover`, `arm`, `quadruped`, `humanoid`) are clean
136
+ starting points; try your own robot for the catch.
137
+
138
+ ### Features
139
+
140
+ - **Check:** see which physical numbers in your model do not add up, and the command that fixes each one.
141
+ - **Lock:** keep those numbers in `lockwire.yaml`, so any drift is caught.
142
+ - **CI:** the same check on every push, with pull-request annotations and an HTML report.
143
+ - **Agents:** your AI coding agent runs the same check before it changes the robot.
144
+
145
+ Everything else (datasheet comparisons, power, torque and bus budgets, part swap, the servo
146
+ recorder, drift on a single robot, the Python library): [the guides](docs/guides/index.md). The powered-on
147
+ preflight gate, ROS 2 bags and the drift ledger across units are Lockwire Pro, waitlist only: https://lockwirerobotics.com.
148
+
149
+ ## Download the app
150
+
151
+ The free desktop app does the same visually: [latest release](https://github.com/Shivansh2703/lockwire/releases/latest).
152
+
153
+ ![Open the app, pick the Rover example, and the Check screen shows the TurtleBot3 in 3D with a GO with notes verdict: 0 problems, 4 checks not compared yet](docs/img/try-example.gif)
154
+
155
+ - **macOS (Apple silicon):** unzip, open Lockwire. The app is not notarized, so the first open warns: open System Settings, Privacy & Security, and click "Open Anyway".
156
+ - **Linux:** `chmod +x Lockwire-*.AppImage`, then run it. Ubuntu 22.04 needs `sudo apt install libfuse2`; 24.04 needs `libfuse2t64`.
157
+ - **Windows:** not yet.
158
+
159
+ Want it installed instead of run through uvx? `pip install lockwire`, then drop the `uvx`.
160
+
161
+ ## Development and licence
162
+
163
+ See [CONTRIBUTING.md](CONTRIBUTING.md). Apache-2.0, all of it: see [LICENSE](LICENSE).
@@ -0,0 +1,123 @@
1
+ <p align="center">
2
+ <picture>
3
+ <source media="(prefers-color-scheme: dark)" srcset="docs/img/logo-dark.svg">
4
+ <img src="docs/img/logo-light.svg" alt="lockwire" height="64">
5
+ </picture>
6
+ </p>
7
+
8
+ **From idea to robot: catch the error in your robot model before the real robot does.**
9
+
10
+ ## Try it on your robot
11
+
12
+ Needs Python 3.12 or newer and [uv](https://docs.astral.sh/uv/). Point it at your URDF, xacro or SDF (nothing is written):
13
+
14
+ ```bash
15
+ uvx lockwire check robot.urdf
16
+ ```
17
+
18
+ What you see, on the public TurtleBot3 Waffle Pi URDF:
19
+
20
+ ```console
21
+ $ uvx lockwire check turtlebot3_waffle_pi.urdf
22
+ VIOLATION datasheet/turtlebot3-waffle-pi/mass_total — observed URDF sum of link masses: 1.554, expected ROBOTIS TurtleBot3 Waffle Pi
23
+ datasheet: 1.8 kg; the sheet's figure includes the battery, computer and sensors
24
+ (Δ -13.7%)
25
+ source: https://emanual.robotis.com/docs/en/platform/turtlebot3/features/
26
+ ...
27
+ NO-GO — 1 violation(s), 3 warning(s)
28
+ ...
29
+ Lock it so CI catches drift: uvx lockwire start turtlebot3_waffle_pi.urdf
30
+ ```
31
+
32
+ The model's links add up to 13.7% less than the maker's own published weight. Lockwire found
33
+ that without being told, named the page it came from, and printed the next command. Errors like
34
+ this are in public robot models today: [the fixes sent upstream](docs/ledger.md).
35
+
36
+ ## Lock it
37
+
38
+ ```bash
39
+ uvx lockwire start robot.urdf
40
+ ```
41
+
42
+ This writes `lockwire.yaml`, the robot's physics lockfile: every link's mass, centre of mass and
43
+ inertia, every joint limit, and a hash of the model's structure. Commit it next to your model.
44
+ From now on `uvx lockwire check` checks the lockfile, and a mass or joint limit edited in the
45
+ model without re-locking is a NO-GO that names the value.
46
+
47
+ ## Run it in CI
48
+
49
+ ```bash
50
+ uvx lockwire agent-setup --ci
51
+ ```
52
+
53
+ That writes `.github/workflows/lockwire.yml`. Its step, with the three inputs most repos need:
54
+
55
+ ```yaml
56
+ - uses: actions/checkout@v4
57
+ - uses: Shivansh2703/lockwire@v0
58
+ with:
59
+ contract: lockwire.yaml # the lockfile
60
+ # model: robot.urdf # or check a model directly, with no lockfile
61
+ # adopt: "true" # annotate and report, but never fail the job
62
+ ```
63
+
64
+ A NO-GO fails the build, with annotations on the pull request and an HTML report.
65
+ Every input, pre-commit and other CI systems: [docs/guides/ci.md](docs/guides/ci.md).
66
+
67
+ ## Let your AI agent check it
68
+
69
+ ```bash
70
+ claude mcp add lockwire -- uvx --from "lockwire[mcp]" lockwire mcp
71
+ uvx lockwire agent-setup
72
+ ```
73
+
74
+ The first line gives Claude Code the checks over MCP. `agent-setup` writes the agent rules into
75
+ AGENTS.md and the Claude Code one, plus a pre-commit hook and the CI workflow.
76
+ Cursor, Claude Desktop and other agents: [docs/guides/agents.md](docs/guides/agents.md).
77
+
78
+ ## No robot file? Try an example
79
+
80
+ servo-bench is built to fail: a 5 V rail overloaded and a wrist servo too weak, on purpose, so you can see what a catch looks like.
81
+
82
+ ```console
83
+ $ uvx lockwire start --example servo-bench
84
+ wrote lockwire.yaml — example servo-bench (built to fail: a 5 V rail overloaded and a wrist servo too weak, on purpose, so you can see what a catch looks like). Next: uvx lockwire check lockwire.yaml
85
+ $ uvx lockwire check
86
+ VIOLATION model/joints/wrist/limits/effort — observed 0.40 N*m joint effort limit, expected <= 0.226 N*m, the feetech.scs0009
87
+ stall torque (Δ 1.8x the stall torque)
88
+ ...
89
+ action: ... or find a stronger servo: lockwire swap lockwire.yaml wrist
90
+ VIOLATION budgets/bud.power.servo-5v — observed 32.10 W, expected <= 15.00 W (Δ +17.10 W (+114%))
91
+ ...
92
+ NO-GO — 2 violation(s), 0 warning(s)
93
+ ```
94
+
95
+ The five robots (`--example drone`, `rover`, `arm`, `quadruped`, `humanoid`) are clean
96
+ starting points; try your own robot for the catch.
97
+
98
+ ### Features
99
+
100
+ - **Check:** see which physical numbers in your model do not add up, and the command that fixes each one.
101
+ - **Lock:** keep those numbers in `lockwire.yaml`, so any drift is caught.
102
+ - **CI:** the same check on every push, with pull-request annotations and an HTML report.
103
+ - **Agents:** your AI coding agent runs the same check before it changes the robot.
104
+
105
+ Everything else (datasheet comparisons, power, torque and bus budgets, part swap, the servo
106
+ recorder, drift on a single robot, the Python library): [the guides](docs/guides/index.md). The powered-on
107
+ preflight gate, ROS 2 bags and the drift ledger across units are Lockwire Pro, waitlist only: https://lockwirerobotics.com.
108
+
109
+ ## Download the app
110
+
111
+ The free desktop app does the same visually: [latest release](https://github.com/Shivansh2703/lockwire/releases/latest).
112
+
113
+ ![Open the app, pick the Rover example, and the Check screen shows the TurtleBot3 in 3D with a GO with notes verdict: 0 problems, 4 checks not compared yet](docs/img/try-example.gif)
114
+
115
+ - **macOS (Apple silicon):** unzip, open Lockwire. The app is not notarized, so the first open warns: open System Settings, Privacy & Security, and click "Open Anyway".
116
+ - **Linux:** `chmod +x Lockwire-*.AppImage`, then run it. Ubuntu 22.04 needs `sudo apt install libfuse2`; 24.04 needs `libfuse2t64`.
117
+ - **Windows:** not yet.
118
+
119
+ Want it installed instead of run through uvx? `pip install lockwire`, then drop the `uvx`.
120
+
121
+ ## Development and licence
122
+
123
+ See [CONTRIBUTING.md](CONTRIBUTING.md). Apache-2.0, all of it: see [LICENSE](LICENSE).
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "lockwire"
3
- version = "0.2.5"
3
+ version = "0.2.7"
4
4
  description = "The physical-assumption contract for robots: checks that a robot's declared parts (power, weight, bus, torque) add up"
5
5
  readme = "README.md"
6
6
  authors = [
@@ -8,10 +8,11 @@ authors = [
8
8
  ]
9
9
  requires-python = ">=3.12"
10
10
  license = "Apache-2.0"
11
+ license-files = ["LICENSE", "NOTICE"]
12
+ # No "License ::" classifier: PEP 639 supersedes it with `license`, and backends refuse both.
11
13
  keywords = ["robotics", "urdf", "ros", "preflight", "lockfile", "ci", "hardware", "drone"]
12
14
  classifiers = [
13
15
  "Development Status :: 3 - Alpha",
14
- "License :: OSI Approved :: Apache Software License",
15
16
  "Intended Audience :: Manufacturing",
16
17
  "Intended Audience :: Science/Research",
17
18
  "Programming Language :: Python :: 3.12",
@@ -22,28 +23,41 @@ classifiers = [
22
23
  ]
23
24
  dependencies = [
24
25
  "numpy>=2.5.1",
25
- "pydantic>=2.13.4",
26
+ "pydantic>=2.13.4,<3",
26
27
  "rich>=15.0.0",
27
- "ruamel-yaml>=0.19.1",
28
- "typer>=0.26.8",
28
+ "ruamel-yaml>=0.19.1,<0.20", # 0.x: a minor bump may break the round-trip API
29
+ # typer 0.29 breaks click Argument handling (AttributeError: TyperArgument has no attribute type); lift the cap once the code is fixed
30
+ "typer>=0.26.8,<0.29",
29
31
  "xacro>=2.1.1",
30
32
  ]
31
33
 
32
34
  [project.optional-dependencies]
33
- # Serving lockwire over MCP to an agent. Optional for the same reason as `ros2bag`:
34
- # a plain install must stay lean, and the SDK is only needed by `lockwire mcp`.
35
+ # Reading a Feetech STS/SCS servo bus (`lockwire record-servos`); read-only.
36
+ bus = [
37
+ "pyserial>=3.5",
38
+ ]
39
+ # Serving lockwire over MCP to an agent. Optional: a plain install must stay lean, and the SDK is only needed by `lockwire mcp`.
35
40
  mcp = [
36
- "mcp>=2.2.0",
41
+ "mcp>=2.2.0,<3",
37
42
  "pyjwt>=2.15", # direct floor: a fresh lock must not resolve below the fixed release
38
43
  ]
39
44
  # The Electron app's sidecar: `lockwire serve` over local HTTP. Optional for the
40
- # same reason as `desktop`/`ros2bag`/`mcp` — a plain CLI install stays lean; only the
45
+ # same reason as `mcp` — a plain CLI install stays lean; only the
41
46
  # packaged app build and anyone running the sidecar by hand need these. Versions are
42
47
  # today's PyPI current stable (measured, E1-a).
43
48
  serve = [
44
49
  "fastapi>=0.141.1",
45
50
  "uvicorn>=0.52.4",
46
51
  ]
52
+ # `lockwire check go2`: a robot by name from robot_descriptions (Apache-2.0), which
53
+ # git-clones the description repo once into ~/.cache/robot_descriptions; xacrodoc (MIT)
54
+ # is what it expands xacro descriptions with, no ROS needed. Optional: it pulls
55
+ # GitPython and needs `git`, which a plain install must not. <4: lockwire calls its
56
+ # `_xacro.get_urdf_path`.
57
+ robots = [
58
+ "robot_descriptions>=3.3.0,<4",
59
+ "xacrodoc>=2.0.1",
60
+ ]
47
61
 
48
62
  [project.urls]
49
63
  Homepage = "https://github.com/Shivansh2703/lockwire"
@@ -57,13 +71,17 @@ lockwire = "lockwire:main"
57
71
  requires = ["uv_build>=0.11.26,<0.12.0"]
58
72
  build-backend = "uv_build"
59
73
 
74
+ # plugin with the recording commands (preflight, baseline, health...), loaded via its entry point.
60
75
  [tool.uv.build-backend]
76
+ module-name = "lockwire"
61
77
 
62
78
  [dependency-groups]
63
79
  dev = [
64
- "mcp>=2.2.0",
80
+ "mcp>=2.2.0,<3",
81
+ # The packaging gate claims `serial` (bus extra); dev env must import it.
82
+ "pyserial>=3.5",
65
83
  # tests/test_serve.py needs the sidecar (`lockwire serve`) importable and
66
- # runnable as a subprocess. Same reasoning as `mcp`/`mcap` above: CI's
84
+ # runnable as a subprocess. Same reasoning as `mcp` above: CI's
67
85
  # `test` job runs a plain `uv sync --dev`, so without these here that
68
86
  # whole test file would silently never run. Dev-only: the runtime `serve`
69
87
  # extra above stays optional so a plain install stays lean.
@@ -74,6 +92,10 @@ dev = [
74
92
  # it is a build tool, never imported at runtime — and `tests/test_cli.py` imports it to
75
93
  # anchor the uvicorn hidden-import test against uvicorn's real module list (box e1-d2).
76
94
  "pyinstaller>=6.21.0",
95
+ # The `robots` extra, for the same reason: require_extras claims it, and
96
+ # tests/test_packaging_extras.py asserts every claimed module imports here.
97
+ "robot_descriptions>=3.3.0,<4",
98
+ "xacrodoc>=2.0.1",
77
99
  "pytest>=9.1.1",
78
100
  "pytest-xdist>=3.6.1",
79
101
  "ruff>=0.15.20,<0.16", # 0.17 changes default rules
@@ -0,0 +1,46 @@
1
+ """Lockwire — the physical-assumption contract for robots, enforced in CI and at preflight."""
2
+
3
+ __version__ = "0.2.7"
4
+
5
+
6
+ def main() -> None:
7
+ import sys
8
+
9
+ from lockwire.catalog import PrivatePartsError
10
+ from lockwire.cli import app
11
+ from lockwire.schema import ContractError
12
+
13
+ for stream in (sys.stdout, sys.stderr): # a cp1252 Windows console cannot print Δ, →, ✓
14
+ if hasattr(stream, "reconfigure"):
15
+ stream.reconfigure(errors="replace")
16
+ try:
17
+ app()
18
+ except PrivatePartsError as error: # one line, not a traceback
19
+ from rich.console import Console
20
+ from rich.markup import escape
21
+
22
+ Console(stderr=True).print(f"[red]private parts file broken:[/] {escape(str(error))}")
23
+ sys.exit(2)
24
+ except ContractError as error: # the user's lockfile, not a bug: plain lines, no traceback
25
+ from rich.console import Console
26
+ from rich.markup import escape
27
+
28
+ Console(stderr=True).print(escape(str(error)), soft_wrap=True, highlight=False)
29
+ sys.exit(2)
30
+ except OSError as error: # a file-system problem, not a lockwire bug: one plain line
31
+ from rich.console import Console
32
+ from rich.markup import escape
33
+
34
+ from lockwire.cli import plain_os_error
35
+
36
+ Console(stderr=True).print(escape(plain_os_error(error)), soft_wrap=True, highlight=False)
37
+ sys.exit(2)
38
+ except Exception as error: # a crash is a bug, never a verdict: REFUSED (2), not NO-GO (1)
39
+ from rich.console import Console
40
+ from rich.markup import escape
41
+
42
+ Console(stderr=True).print(
43
+ f"[red]lockwire stopped: {type(error).__name__}: {escape(str(error))} "
44
+ "— this is a bug in lockwire, not a verdict[/]"
45
+ )
46
+ sys.exit(2)
@@ -4,6 +4,6 @@ Exists so ``jobs.py`` can start a run as an argv list against ``sys.executable``
4
4
  without depending on a console script being on PATH.
5
5
  """
6
6
 
7
- from lockwire.cli import app
7
+ import lockwire
8
8
 
9
- app()
9
+ lockwire.main()