Skip to main content

screws

DOI

Robotics in Python, built on screw theory: every rigid-body motion is a screw motion, the exponential of a twist, and an open chain is a product of such exponentials. Kinematics, Jacobians and dynamics all follow from that. The notation is that of Lynch and Park, Modern Robotics (MR).

  • The mathematics. Rotations and rigid-body motions with their exponentials and logarithms; twists, wrenches and adjoints; forward and inverse kinematics; space and body Jacobians; manipulability and force ellipsoids; Newton-Euler dynamics; trajectories.
  • Robots. A Robot class that carries M, the screw axes and the link inertias, a URDF loader, and three robots ready to use: a UR5, an RRP arm and a planar 2R arm.
  • Formulas. screws.symbolic does the same computations in SymPy, so the product of exponentials, the Jacobians and the equations of motion come out in the joint variables.
  • Pictures. screws.viz draws a robot with its screw axes, animates screw motions, and shows Jacobians and manipulability ellipsoids, still or while the robot moves, with joint sliders in a notebook.
  • Simulation. screws.coppelia drives CoppeliaSim: read a robot off a scene, command it by position, velocity or torque, log and plot the run, and record a movie.
  • Checks. screws.testing compares your own implementation of a function with the library's.

A UR5 in CoppeliaSim, driven by screws, swings a putter through a golf ball and sinks the putt

A UR5 sinks a putt in CoppeliaSim, driven through screws.coppelia. The package's own pictures, of screw axes, screw motions, Jacobians and manipulability ellipsoids, are on the Examples page, each with the lines that draw it.

screws started from the MR code library, and all of that library is still here: each function under a snake_case name, with MR's name kept as an alias (screws.FKinSpace is screws.fk_space). The tests run every example in MR's docstrings through those aliases.

Install

One or the other:

uv add screws                 # the mathematics only; numpy and SymPy are the dependencies
uv add "screws[coppelia]"     # the same, plus the CoppeliaSim ZMQ remote API client

Extras for the bridge: screws[plot] (matplotlib, for Log.plot) and screws[video] (imageio and ffmpeg, for Recorder). uv add "screws[coppelia,plot,video]" takes all three.

Four lines

import screws

ur5 = screws.robots.ur5()                          # M, screw axes, inertias from the textbook's URDF
T = ur5.fk([0.3, -1.2, 0.8, -0.4, 1.1, 0.2])         # a reachable, non-singular pose
result = ur5.ik(T, theta0=[0.1, -1.4, 0.1, 0.1, 1.4, 0.1])   # result.theta, result.converged, result.history

Documentation

The guide and the API reference are at https://ricopicone.github.io/screws/:

Help, contributing and citing

Questions and bug reports go in the issues; how to report one well, and how to propose a change, is in CONTRIBUTING.md. What each release changed is in CHANGELOG.md. To cite screws, use CITATION.cff, or GitHub's "Cite this repository" button, which reads it. Zenodo archives every release: the DOI 10.5281/zenodo.23873253 stands for screws as a whole and leads to the latest version, and each version has a DOI of its own on that page.

Licence

MIT. Portions derived from the Modern Robotics code library, copyright 2018 Huan Weng, Bill Hunt, Jarvis Schultz and Mikhail Todes, MIT licence; see LICENSE.

Metadata

Release files for screws 0.10.0

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

Source distribution (sdist)

Source distribution for screws 0.10.0
File Size Uploaded Provenance Actions
screws-0.10.0.tar.gz 356.9 kB With provenance Details for screws-0.10.0.tar.gz

Built distribution (wheel)

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

Total release size: 451.7 kB

Release files / screws-0.10.0.tar.gz

Download URL screws-0.10.0.tar.gz
Size 356.9 kB
Tags Source
SHA-256 checksum
How to use checksums
ee53f0ed9c326743e4c27d0799e00d8d9fbc12aa89045ec4aa931ffdddeda411
BLAKE2b-256 checksum
How to use checksums
7c86cdaeb8e0311a91e0fef5c5f460f4c996827b3620afc53d548903de236775
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 2, 2026.

Transparency log

Release files / screws-0.10.0-py3-none-any.whl

Download URL screws-0.10.0-py3-none-any.whl
Size 94.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c236241c67c9deada7db892ec1182df916fffa1ee4fd94ca0a557a34b0651413
BLAKE2b-256 checksum
How to use checksums
9b1877229edfb9facc972577a3055df1e5a09935725c3dd347f3b137b47927eb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 2, 2026.

Transparency log

Security for screws 0.10.0

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.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for screws-0.10.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 2, 2026.

Transparency log

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