Skip to main content

robot_models

Generic physical models of robot part types (no maker, no SKU): each type is a ladder of models from ideal to learned, and every rung states its parameters, its equation and its references.

robot_msgs ← robot_models ← robot_parts ← robot_descriptions,   with sim2real on top
  • robot_msgs: the message types this package builds on.
  • sim2real: the outer API (twins, calibration) over the stack.
  • robot_parts (robotparts, private): the part catalogue, whose parts point at these types and rungs.
  • Type data only: parameter names, SI units, definitions, equations. Never a value measured on one unit.

Usage

from robot_models.ladder import ladders, needs

servo = ladders()["integrated_servo"]
servo.parameters("M3.stribeck")     # what the rung needs, inherited names included:
# ('output_inertia', 'gear_ratio', 'coulomb_friction', 'viscous_friction', 'breakaway_torque', 'stribeck_velocity')
servo.holds("M3.stribeck")          # ... plus what it reads when a source states it
servo.fallback("M3.lugre")          # the chain it falls back down:
# ('M3.lugre', 'M3.stribeck', 'M2.coulomb_viscous', 'M1.datasheet', 'M0.ideal')
servo.canonical("frictionloss_nm")  # 'coulomb_friction': any other name resolves to the type's own
servo.unpack("thermal_r_c")         # ('thermal_resistance', 'thermal_time_constant'): a packed array
servo.rung("M3.stribeck").equation  # 'tau_r = (coulomb_friction + (breakaway_torque − coulomb_friction)·exp(...)'
needs(ladders(), "integrated_servo", "M4.drivetrain")  # {type: names}, the composed driver's included
  • A rung key is M{level}.{name}: M0 ideal, M1 datasheet, M2 Coulomb + viscous, M3 state-dependent friction, M4 drivetrain, M5 electrics and heat, M6 grey-box residual, M7 learned net; .wear variants grow a parameter with use.
  • Each ladder is a tree of explicit bases; a rung needs everything its base needs.
  • Every other name for a quantity is an Alias (with a note when it is not the same quantity one for one) or a Packed array; what a deployment sets (gains, caps) is DeploymentOnly, never on a rung.
  • Spec: PEP 0004.

The 12 types (84 rungs)

type folder (src/robot_models/…) rungs what it is
integrated_servo actuators/servo/ 14 A joint in one housing: motor, drive, reducer or none, encoder
bldc_motor actuators/servo/bldc/ 9 A brushless motor alone, at its shaft
gearbox actuators/servo/gearbox/ 8 A gear stage between a motor and its load
foc_controller actuators/servo/foc_controller/ 6 A field-oriented-control motor drive board
encoder sensors/encoder/ 4 An angle sensor on a shaft
camera sensors/camera/ 6 A frame camera's colour image: projection, distortion, exposure
depth_camera sensors/rgbd/ 5 A stereo depth camera: depth on top of a colour stream
hyperspectral_camera sensors/hyperspectral_camera/ 5 A line-scan spectral camera over a belt
rigid_body_chain arms/rigid_body_chain/ 10 A chain of rigid links and joints, open or closed: an arm, a wrist, a five-bar
gripper end_effectors/gripper/ 6 An end effector that grasps, on a chain's flange
conveyor conveyors/conveyor/ 7 A belt driven through a drum
aruco_marker markers/aruco_marker/ 4 A printed sheet carrying ArUco markers rigidly

Each folder holds one ladder.py; ladders() finds them by walking the package (no registry). The integrated servo's eight rung folders (actuators/rungs/<rung>/: model.json, a README, and Python + JavaScript code where the rung has its own) are byte-pinned, so a downstream copy can be checked against them.

Other modules

  • robot_models.datasheet: typed part fields, and a part's values resolved from one Python file per raw source (PEP 0003). Stdlib only.
  • robot_models.actuators.servo: the servo type tree (IntegratedServo, BldcMotor, Gearbox), the typed fields each ladder's M1 states.
  • robot_models.homing: the homing stop core: stops, the backlash ladder, stall evidence, the pure fit, the bench's five metrics (PEP 0001, PEP 0002). numpy + robot_msgs only; exact mesh contact (homing.contact, homing.cad_bundle) is the contact extra.
  • The ladder core (robot_models.ladder) and the citable works (robot_models.references) are stdlib only.

Install

pip install robot-model-ladders
uv add robot-model-ladders
  • The PyPI name is robot-model-ladders (robot-models is taken by a near-identical name); you still import robot_models.
  • robot-msgs 0.3.0 or later comes with it. The ladders and the datasheets import neither robot_msgs nor numpy.
  • Mesh contact for homing: add the extra, robot-model-ladders[contact].
  • Python 3.11 to 3.14.

Tests

From a clone (--no-sources because [tool.uv.sources] names the author's local robot_msgs checkout):

uv run --isolated --no-sources --extra test python -m pytest -q --ignore=tests/test_fit_ruler.py --ignore=tests/test_stop_ruler.py
  • That is what CI runs (.github/workflows/test.yml, Python 3.11–3.14).
  • tests/test_fit_ruler.py and tests/test_stop_ruler.py read CAD bundles from a local, unpublished cache (ROBOT_MODELS_CAD_BUNDLES, default ~/.cache/cad2robot-build/bundles); with that cache, drop the two --ignores.
  • PYTHONDONTWRITEBYTECODE=1 keeps __pycache__/ out of the rung folders, which robotparts vendors byte for byte.

Design records

docs/peps/, each a decision with its undo:

  • 0001: the homing stop core lives in robot_models
  • 0002: the homing bench's pure parts: five metrics, two seams
  • 0003: typed datasheets, resolved from one Python file per source
  • 0004: model ladders by type: one vocabulary per type, rungs as a tree of bases

License

MIT, see LICENSE.

Metadata

Release files for robot-model-ladders 0.2.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 robot-model-ladders 0.2.0
File Size Uploaded Provenance Actions
robot_model_ladders-0.2.0.tar.gz 509.6 kB Without provenance Details for robot_model_ladders-0.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for robot-model-ladders 0.2.0
File Interpreter ABI Platform Actions
robot_model_ladders-0.2.0-py3-none-any.whl Python 3 none any Details for robot_model_ladders-0.2.0-py3-none-any.whl

Total release size: 714.7 kB

Release files / robot_model_ladders-0.2.0.tar.gz

Download URL robot_model_ladders-0.2.0.tar.gz
Size 509.6 kB
Tags Source
SHA-256 checksum
How to use checksums
ac23b93cc00036a19e9566381a1f8e39bd9ef3293a106c21cd9aeb5ccaca2e24
BLAKE2b-256 checksum
How to use checksums
53285c7fd8467285c23af4654dbef9b5f4827518cf710a5338ef705d7a0c6100
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.9 {"installer":{"name":"uv","version":"0.13.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / robot_model_ladders-0.2.0-py3-none-any.whl

Download URL robot_model_ladders-0.2.0-py3-none-any.whl
Size 205.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c6a227462f2ac94ee28fc40ab5a367b85e3b5d62b48fa12cc965ef163479c399
BLAKE2b-256 checksum
How to use checksums
ee36cd94b68887ab4f8e806adaacc745e00879b8b566bed39a0c3e3d488ab3e4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.9 {"installer":{"name":"uv","version":"0.13.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for robot-model-ladders 0.2.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.

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.

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files No provenance

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