Skip to main content

botrail-logo

Beyond motion planning. Build robot cells as code.

Documentation: https://botrail.github.io/botrail/ · Live Demo: https://botrail.github.io/botrail/demo/

botrail-demo

pip install botrail, a few lines of Python, and you get an interactive 3D studio in your browser for building robot cells — robots, obstacles, conveyors, sensors, and PLC-style sequences. The core is written in Rust — no ROS, no system dependencies, no GPU.

A cell in botrail is text (Python / .botrail JSON / USD): it diffs in git, it bakes into a bit-identical timeline every run, and it regression-tests in CI. Motions are planned, not taught point by point, so moving a pallet or a sensor doesn't break the cell — re-simulate and read the new cycle time.

Highlights

  • Robots from URDF, Xacro, or USD — including Isaac Sim articulations (bt.Robot.from_usd("franka.usd")), rendered at full visual fidelity with three-usd-robot. Mimic joints (URDF <mimic>, USD PhysxMimicJointAPI) are followed, so a two-finger gripper costs one DOF, not two. Multiple robots per cell, with tick-checked inter-robot collisions and zone interlocks.
  • USD scene import (usda/usdc/usdz, references, variants, instancing) — stages become obstacles and named mount frames, normalized to meters / Z-up.
  • Environments that behave — a PLC-style step sequencer (entry actions + transition conditions on a fixed scan cycle), zone/beam sensors, conveyors and linear axes, and conveyor tracking: taught poses ride the moving part, so the belt never stops for the pick.
  • Deterministic bakesimulate_sequence() turns Scene + Sequence into a bit-identical SequenceTimeline: cycle time, step spans, signal waveforms, object tracks.
  • Assertable timelinesstep_span() / signal() / min_clearance() turn a bake into pytest-able cell checks (cycle budgets, sensor timing, safety margins) that run in CI.
  • Open deliverables — USD animation (plays in usdview / Omniverse / Blender), CSV/JSON, robot programs (URScript), Python code generation — and Isaac Sim recordings play back through the same pipeline.
  • Interactive posing — draggable TCP gizmo with live IK, joint sliders.
  • Collision checking — primitives and STL/OBJ meshes (cached VHACD convex decomposition), live highlighting, clearance readout.
  • Motion planning & authoring — RRT-Connect with time parameterization, waypoint motions with Cartesian-line segments and path constraints, trajectory playback in the studio.
  • Portable projects — save/load .botrail files (meshes and USD stages bundled), regenerate any scene as a Python script.
  • Runs entirely in the browser — the wasm build serves the full studio as a static page, no server; drop a USD file straight into the viewport.

Try it

Run the bundled demos — a Franka Panda in a small USD factory cell (the first run downloads NVIDIA's official Franka asset, ~10 MB):

python examples/demo.py           # interactive studio: pose, plan, play
python examples/sequence_demo.py  # 13-step cell: conveyor feed → tracked pick
                                  # → pallet; prints the cycle time, exports USD
python examples/dual_cell_demo.py # two arms sharing one infeed, arbitrated by a
                                  # zone interlock; --clash shows what happens
                                  # without it
python examples/sweep_demo.py     # parameter sweep: belt speed × lane position
                                  # vs cycle time and clearance (no downloads)
python examples/play_record.py \
       cell_dual.usda             # replay a baked USD in the studio (any of
                                  # the recordings above; omit for cell_seq)

Or try the browser-only build (deployed from main, or build it locally):

./scripts/build_wasm_demo.sh          # needs wasm-pack + wasm32 target
python -m http.server -d studio/dist-wasm 8899

Quickstart

import botrail as bt

robot = bt.Robot.from_urdf("robot.urdf")   # or from_xacro(...) / from_usd(...)
scene = bt.Scene(robot)

scene.load_usd("cell.usda", prefix="env")                # obstacles + frames
scene.set_robot_base_pose(*scene.frame("env/World/mount"))
scene.add_box("table", size=(0.6, 0.6, 0.05), position=(0.4, 0.0, 0.0))

bt.studio(scene)  # opens the 3D studio in your browser

Everything you do in the studio is mirrored in Python, and vice versa:

scene.set_tcp_target((0.3, 0.1, 0.5))         # live IK, pushed to the browser
scene.in_collision()                          # False
scene.min_obstacle_distance()                 # clearance in meters

traj = scene.plan_to_pose((0.4, 0.1, 0.3))    # IK, then RRT-Connect + time param
traj.export_csv("motion.csv", dt=0.008)

scene.save_project("cell.botrail")            # meshes/USD bundled when needed
print(scene.generate_python())                # script reproducing the scene

Verify the cell, not just the trajectory

Give the environment behavior, write the process as steps, and bake:

scene.add_box("crate", size=(0.04, 0.04, 0.04), position=(-0.5, 0.6, 0.3))
scene.add_conveyor("belt", zone_position=(-0.2, 0.6, 0.3),
                   zone_size=(1.2, 0.3, 0.3), velocity=(0.25, 0.0, 0.0),
                   running=False)
scene.add_beam_sensor("eye", frm=(0.0, 0.4, 0.3), to=(0.0, 0.8, 0.3))
scene.add_segment("approach", goal=[0.6, -0.5, 0.8, 0.0, 0.4, 0.0])

sq = scene.sequence("cycle")
sq.step("feed", actions=[bt.seq.start("belt")], transition=bt.seq.signal("eye"))
sq.step("stop", actions=[bt.seq.stop("belt")])
sq.step("pick", actions=[bt.seq.motion("approach")])

tl = scene.simulate_sequence("cycle")   # deterministic: bit-identical every run
print(tl.duration)                      # cycle time in seconds
tl.export_usd("cycle.usda", fps=60)     # replay in usdview / Omniverse / Blender

Because the bake is deterministic, the same numbers are regression tests — the workflow botrail exists for:

def test_cell_cycle():
    tl = build_cell().simulate_sequence("cycle")
    assert tl.duration <= 8.0                # cycle-time budget
    assert tl.step_span("feed").end <= 2.0   # the crate arrives on time
    assert tl.signal("eye").rising_edges()   # the handshake happened
    assert tl.min_clearance() > 0.05         # closest approach, meters

Move the beam sensor 0.25 m downstream and the cycle grows by exactly 1.0 s — a layout edit becomes a failing test instead of a shop-floor surprise. This repository runs such a cell in its own CI (python/tests/test_cell_regression.py), and examples/sweep_demo.py runs the same loop as a parameter study (belt speed moves the cycle; lane position eats the clearance).

Development

Requirements: Rust (stable), Python >= 3.9, maturin, uv, Node 20+ with pnpm.

./scripts/build_studio.sh                 # build the studio UI into the package
uv venv .venv && source .venv/bin/activate
maturin develop --uv
python examples/demo.py

Tests:

cargo test                                # Rust workspace
python -m pytest python/tests             # Python bindings

Docs (mkdocs, published at the link above):

uv pip install --group docs
mkdocs serve                              # needs `maturin develop` first

Contributor notes are in the Contributing page.

License

MIT

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

botrail-0.4.0.tar.gz (281.1 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

botrail-0.4.0-cp39-abi3-win_amd64.whl (4.8 MB view details)

Uploaded CPython 3.9+Windows x86-64

botrail-0.4.0-cp39-abi3-manylinux_2_35_x86_64.whl (5.9 MB view details)

Uploaded CPython 3.9+manylinux: glibc 2.35+ x86-64

botrail-0.4.0-cp39-abi3-manylinux_2_34_x86_64.whl (5.4 MB view details)

Uploaded CPython 3.9+manylinux: glibc 2.34+ x86-64

botrail-0.4.0-cp39-abi3-macosx_11_0_arm64.whl (4.9 MB view details)

Uploaded CPython 3.9+macOS 11.0+ ARM64

File details

Details for the file botrail-0.4.0.tar.gz.

File metadata

  • Download URL: botrail-0.4.0.tar.gz
  • Upload date:
  • Size: 281.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for botrail-0.4.0.tar.gz
Algorithm Hash digest
SHA256 e7b5152dba51fd6e03918fc53bbbe3ae828c52f134f2b1eec54eb9cda6098919
MD5 2950027d4b6b3199e96fb10336fab953
BLAKE2b-256 d447cb491bbe7153d8f455694bc6e935d30807b13e0ac9a0ab36d1d9fa89012c

See more details on using hashes here.

Provenance

The following attestation bundles were made for botrail-0.4.0.tar.gz:

Publisher: release.yml on botrail/botrail

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file botrail-0.4.0-cp39-abi3-win_amd64.whl.

File metadata

  • Download URL: botrail-0.4.0-cp39-abi3-win_amd64.whl
  • Upload date:
  • Size: 4.8 MB
  • Tags: CPython 3.9+, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for botrail-0.4.0-cp39-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 01985b52ca06672c87016d1b6b6a7c1c3f259394dc6bb4a36f1216805e3b9501
MD5 cb09982b0921c3b2fac3dbfa0fce36c6
BLAKE2b-256 d7e81a2b2467dbdc1f15e164a04e47b0609e9c00fb9f8f6a544e03f2ba90791a

See more details on using hashes here.

Provenance

The following attestation bundles were made for botrail-0.4.0-cp39-abi3-win_amd64.whl:

Publisher: release.yml on botrail/botrail

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file botrail-0.4.0-cp39-abi3-manylinux_2_35_x86_64.whl.

File metadata

File hashes

Hashes for botrail-0.4.0-cp39-abi3-manylinux_2_35_x86_64.whl
Algorithm Hash digest
SHA256 1ef33c5fd016fb97e0d63dbae7b6e362e596a4abeec785c0717606a089b8ed40
MD5 644e758000eca7b98801a52a719a2c3b
BLAKE2b-256 7620414f4d2ca9e4ec0df7eda91f35e62682e949647523389f41ae5d6ea9ac56

See more details on using hashes here.

Provenance

The following attestation bundles were made for botrail-0.4.0-cp39-abi3-manylinux_2_35_x86_64.whl:

Publisher: release.yml on botrail/botrail

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file botrail-0.4.0-cp39-abi3-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for botrail-0.4.0-cp39-abi3-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 d3de45114f1df2451f429bc9eb33c5b141cba3bc67675790ba0fde2b6c401f01
MD5 9bb2e318fb7cebbe01bb7889d767ac66
BLAKE2b-256 63724f1e297a1a730cec9516f70a6df83cc231df27189862362eb3fafb08dd0a

See more details on using hashes here.

Provenance

The following attestation bundles were made for botrail-0.4.0-cp39-abi3-manylinux_2_34_x86_64.whl:

Publisher: release.yml on botrail/botrail

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file botrail-0.4.0-cp39-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for botrail-0.4.0-cp39-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 b9e858d85bde3f600ea683582236d499a3adafee3370d08772701c54eeb2e0af
MD5 9a7081eb476a48cf2f93bda6ae51fca4
BLAKE2b-256 530ac8eb654dcfac04a770862b4fec5d096c1a08528c5112d671cadeaa75a4d4

See more details on using hashes here.

Provenance

The following attestation bundles were made for botrail-0.4.0-cp39-abi3-macosx_11_0_arm64.whl:

Publisher: release.yml on botrail/botrail

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

0.8.0

4 files

0.7.0

4 files

0.6.0

4 files

This release

0.4.0 This release

5 files

0.3.0

4 files

0.2.0

4 files

0.1.1

4 files

0.1.0

4 files

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