Skip to main content

lockwire

From idea to robot: catch the error in your robot model before the real robot does.

Try it on your robot

Needs Python 3.12 or newer and uv. Point it at your URDF, xacro or SDF (nothing is written):

uvx lockwire check robot.urdf

What you see, on the public TurtleBot3 Waffle Pi URDF:

$ uvx lockwire check turtlebot3_waffle_pi.urdf
VIOLATION datasheet/turtlebot3-waffle-pi/mass_total — observed URDF sum of link masses: 1.554, expected ROBOTIS TurtleBot3 Waffle Pi
datasheet: 1.8 kg; the sheet's figure includes the battery, computer and sensors
(Δ -13.7%)
  source: https://emanual.robotis.com/docs/en/platform/turtlebot3/features/
  ...
NO-GO — 1 violation(s), 3 warning(s)
  ...
Lock it so CI catches drift: uvx lockwire start turtlebot3_waffle_pi.urdf

The model's links add up to 13.7% less than the maker's own published weight. Lockwire found that without being told, named the page it came from, and printed the next command. Errors like this are in public robot models today: the fixes sent upstream.

Lock it

uvx lockwire start robot.urdf

This writes lockwire.yaml, the robot's physics lockfile: every link's mass, centre of mass and inertia, every joint limit, and a hash of the model's structure. Commit it next to your model. From now on uvx lockwire check checks the lockfile, and a mass or joint limit edited in the model without re-locking is a NO-GO that names the value.

Run it in CI

uvx lockwire agent-setup --ci

That writes .github/workflows/lockwire.yml. Its step, with the three inputs most repos need:

- uses: actions/checkout@v4
- uses: Shivansh2703/lockwire@v0
  with:
    contract: lockwire.yaml    # the lockfile
    # model: robot.urdf        # or check a model directly, with no lockfile
    # adopt: "true"            # annotate and report, but never fail the job

A NO-GO fails the build, with annotations on the pull request and an HTML report. Every input, pre-commit and other CI systems: docs/guides/ci.md.

Let your AI agent check it

claude mcp add lockwire -- uvx --from "lockwire[mcp]" lockwire mcp
uvx lockwire agent-setup

The first line gives Claude Code the checks over MCP. agent-setup writes the agent rules into AGENTS.md and the Claude Code one, plus a pre-commit hook and the CI workflow. Cursor, Claude Desktop and other agents: docs/guides/agents.md.

No robot file? Try an example

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.

$ uvx lockwire start --example servo-bench
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
$ uvx lockwire check
VIOLATION model/joints/wrist/limits/effort — observed 0.40 N*m joint effort limit, expected <= 0.226 N*m, the feetech.scs0009
stall torque (Δ 1.8x the stall torque)
  ...
  action: ... or find a stronger servo: lockwire swap lockwire.yaml wrist
VIOLATION budgets/bud.power.servo-5v — observed 32.10 W, expected <= 15.00 W (Δ +17.10 W (+114%))
  ...
NO-GO — 2 violation(s), 0 warning(s)

The five robots (--example drone, rover, arm, quadruped, humanoid) are clean starting points; try your own robot for the catch.

Features

  • Check: see which physical numbers in your model do not add up, and the command that fixes each one.
  • Lock: keep those numbers in lockwire.yaml, so any drift is caught.
  • CI: the same check on every push, with pull-request annotations and an HTML report.
  • Agents: your AI coding agent runs the same check before it changes the robot.

Everything else (datasheet comparisons, power, torque and bus budgets, part swap, the servo recorder, drift on a single robot, the Python library): the guides. The powered-on preflight gate, ROS 2 bags and the drift ledger across units are Lockwire Pro, waitlist only: https://lockwirerobotics.com.

Download the app

The free desktop app does the same visually: latest release.

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

  • 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".
  • Linux: chmod +x Lockwire-*.AppImage, then run it. Ubuntu 22.04 needs sudo apt install libfuse2; 24.04 needs libfuse2t64.
  • Windows: not yet.

Want it installed instead of run through uvx? pip install lockwire, then drop the uvx.

Development and licence

See CONTRIBUTING.md. Apache-2.0, all of it: see LICENSE.

Metadata

Release files for lockwire 0.2.7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for lockwire 0.2.7
File Size Uploaded Provenance Actions
lockwire-0.2.7.tar.gz 3.7 MB Without provenance Details for lockwire-0.2.7.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for lockwire 0.2.7
File Interpreter ABI Platform Actions
lockwire-0.2.7-py3-none-any.whl Python 3 none any Details for lockwire-0.2.7-py3-none-any.whl

Total release size: 7.4 MB

Release files / lockwire-0.2.7.tar.gz

Download URL lockwire-0.2.7.tar.gz
Size 3.7 MB
Tags Source
SHA-256 checksum
How to use checksums
6af3b5293ffb6885ab09ff3271a58e0573b5b7a7cc78999f836575199a69de72
BLAKE2b-256 checksum
How to use checksums
5065bf84db176e74d96aaaba664003c30068430f8b84955850135429a73d7ebc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.26 {"installer":{"name":"uv","version":"0.11.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / lockwire-0.2.7-py3-none-any.whl

Download URL lockwire-0.2.7-py3-none-any.whl
Size 3.7 MB
Tags Python 3
SHA-256 checksum
How to use checksums
251e8fe07ce68ef65e448b4a07be6891805006457599ab35d8fdbbf6a9de947e
BLAKE2b-256 checksum
How to use checksums
a812067a1523bed7bd1e028327e2a09453e3186aea4515a38c14528f32f53133
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.26 {"installer":{"name":"uv","version":"0.11.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Security for lockwire 0.2.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page