Skip to main content

qubot

One Python package with the gantry and end-effector drivers for building a PUDA qubot edge. It is published as qubot-drivers and imported as qubot:

pip install qubot-drivers        # or: uv add qubot-drivers

It holds no machine settings: each edge imports the drivers it needs and configures them in its own code. Nothing in this repository is a running edge. Agents start from the qubot-driver skill. The design section explains the split. Changes are recorded in CHANGELOG.md.

  • No MACHINE_ID, NATS servers, host addresses, serial-device paths, frame limits, calibration, container config, or .env. A site edge's .env.example stays placeholders.
  • Code lives in src/qubot/. One pyproject.toml at the root; gantries and end effectors are modules, not separate packages.
  • qubot.gantry has the controllers (GrblHALController, GrblWSController, RepRapHTTPController, RepRapSerialController), shared by every gantry, and Frame, which holds one machine's axes, hardware limits, default deck, and optional home order and firmware checks. It refuses limits outside the frame.
  • qubot.end_effector has one driver per toolhead (RotatingVacuumGripper, Chamber, …). Calibration (servo pulses, waypoints, delays, force corrections, pipette pacing) is a constructor argument, and bad values raise.
  • qubot.geometry has Position. qubot.labware has StandardLabware and Deck, a few bundled labware definitions, and lets each edge add its own definitions (see Labware).
  • The qubot-driver skill has a starting-point driver.py for each known machine, with the values from the machines built so far.
  • Finished edges are not stored on main. For an edge built before the qubot modularization and the monorepo restructuring, use the legacy-edges branch.

A qubot edge's driver.py imports what it carries and configures it:

from puda import command, safety

from qubot.end_effector import RotatingVacuumGripper
from qubot.gantry import Frame, GrblHALController
from qubot.geometry import Position

FRAME = Frame(axes=("X", "Y", "Z"),
              hardware_limits={"X": (0, 830), "Y": (-280, 0), "Z": (-240, 0)},
              default_deck={"rows": 4, "cols": 8}, home_order=("Z", "X", "Y"))
GRIPPER = RotatingVacuumGripper(axis="C", yaw_pulses=[(0, 14), (-90, 124), (-180, 244)],
                                rotation_min_z_mm=-5, vacuum_on_delay_s=3, vacuum_off_delay_s=3)


class Driver:
    """Claw machine: 8-unit grblHAL pick-and-place gantry with a rotating vacuum gripper."""

    def __init__(self, gantry_port: str) -> None:
        self._gantry = GrblHALController(port_name=gantry_port)
        self._gantry.connect()
        FRAME.apply_axis_limits(self._gantry)

    def estop(self) -> bool:
        self._gantry.halt()
        return True

    @command
    @safety(summary="Collision risk from gantry motion.", hazards=["collision"], confirm=True)
    def move_absolute(self, x: float | None = None, y: float | None = None, z: float | None = None) -> dict:
        """Move to an absolute position in mm."""
        return self._gantry.move_absolute(Position(x=x, y=y, z=z)).to_dict()

Design

A qubot is one gantry plus the end effectors mounted on it, and that combination changes. The syringequbot gantry was the capper first; mounting the capper again is an import in that edge's driver.py, not a copy of another edge. So qubot stores only drivers that can be mixed, with no numbered gantries or per-machine values, and each edge in the site monorepo picks and configures its own.

flowchart TB
  subgraph sources [qubot]
    transport["qubot.gantry:<br/>grbl, grbl_ws, reprap_http controllers"]
    gantry["qubot.gantry.Frame:<br/>axes, limit checks, deck slots"]
    effector["qubot.end_effector.name:<br/>protocol, takes calibration as arguments"]
    geometry["qubot.geometry, qubot.labware:<br/>Position, Deck, labware definitions"]
  end
  config["edge driver.py:<br/>Frame and calibration constants, Driver with @command and @safety"]
  transport --> config
  gantry --> config
  effector --> config
  geometry --> config
  subgraph built [site monorepo edges]
    module["edge main.py:<br/>Config with MACHINE_ID, NATS, ports"]
    edge["edge:<br/>directory name, pinned qubot-drivers, local .env"]
    module --> edge
  end
  config --> module

Supported hardware

Gantry controllers

Controller Import Firmware and link Used on
GrblHALController from qubot.gantry import GrblHALController GRBL 1.1 and grblHAL over USB serial. Feed-hold with realtime !. miniqubot, pipqubot-mof, claw-machine, dancefloor, overkill2, photoreactor, eis-qubot
GrblWSController from qubot.gantry import GrblWSController GRBL over WebSocket (ws://<host>:81). grblHAL gantries with a network board
RepRapSerialController from qubot.gantry import RepRapSerialController RepRapFirmware over USB serial (G-code, M114 position, M400 move wait). first (puda-eletrochem)
RepRapHTTPController from qubot.gantry import RepRapHTTPController RepRapFirmware over HTTP (rr_gcode, rr_status). Supports set_pin. syringequbot, pipqubot-xl

Each controller is paired with a Frame (from qubot.gantry import Frame) that holds the machine's axes, travel, and deck. The defining modules (qubot.gantry.grbl, …) still work as import paths; the short form is preferred.

End effectors

End effector Import What it is Link Used on
Sartorius rLine 50-1000 µL from qubot.end_effector import rline_50_1000, then rline_50_1000.connect(port) Pipette, 2.5 µL/step, six preset speeds. Serial pipqubot-mof, pipqubot-xl
Sartorius rLine 50-1000 µL, multistep from qubot.end_effector import rline_50_1000_multistep Same pipette, with any aspirate/dispense speed up to 1120 µL/s made from paced preset moves. Serial overkill2
A-axis capper from qubot.end_effector import Capper Capping tool driven by gantry axis A. Gantry axis pipqubot-xl
Autosampler syringe from qubot.end_effector import narrow_z Passive syringe; narrows Z travel by its length. Liquid handling is on a separate pump edge. None syringequbot
Rotating vacuum gripper from qubot.end_effector import RotatingVacuumGripper Vacuum cup (coolant valve) and yaw servo (spindle PWM). Gantry GRBL port claw-machine
Vacuum chamber from qubot.end_effector import Chamber Chamber valve and lid waypoints, with closed/vented interlocks. Gantry GRBL port dancefloor
Orion 4-channel LED from qubot.end_effector import LedBoard Four-channel UV LED board, write-only line protocol. Serial, 9600 baud photoreactor
Parallel force actuators from qubot.end_effector import ParallelFingers Linear actuators with force sensing, one port each. Serial, 115200 baud eis-qubot

The two rLine pipettes are imported as modules because both define connect and SatoriusController. Lower-level pieces: qubot.end_effector.satorius / satorius_multistep (SatoriusController), RLineModel and RLINE_SPECS (rLine 5-200, 50-1000, 100-5000 µL spec table, from qubot.end_effector import RLineModel), and qubot.serialcontroller (SerialController base).

Labware

from qubot.labware import Deck, StandardLabware

deck = Deck.from_frame(FRAME, labware_paths=[Path(__file__).parent / "labware"])
deck.load_labware("A1", "opentrons_96_tiprack_300ul")   # bundled
deck.load_labware("B1", "my_reservoir")                  # edges/<one-qubot>/labware/my_reservoir.json
deck.load_labware("A2", StandardLabware.from_definition("probe_block", definition_dict))

Definitions are Opentrons-style JSON (wells, ordering, dimensions) plus insert_depth. Loading by name searches the edge's labware_paths first, then the bundled qubot/labware/definitions/, so an edge can add new labware or override a bundled one without changing qubot. get_available_labware(paths) lists both. Bundled: opentrons_96_tiprack_300ul, sartorious_96_tiprack_1000ul, polyelectric_96_wellplate_330ul, polyelectric_8_wellplate_30000ul, bioshake, MEA_cell_MTP, trash_bin_mof, trash_bin_create.

Build a site edge

Follow the qubot-driver skill: answer its edge checklist, scaffold from edge-python-template, pin qubot-drivers (a release, or qubot-drivers @ git+https://github.com/PUDAP/qubot@<ref>), and start driver.py from the matching reference driver. The edge lives in the site monorepo's edges/, not in this repository. Build only when that machine is allowed to move.

Offline checks

uv sync --group dev
uv run pytest

Metadata

Release files for qubot-drivers 0.1.1

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

Source distribution (sdist)

Source distribution for qubot-drivers 0.1.1
File Size Uploaded Provenance Actions
qubot_drivers-0.1.1.tar.gz 858.5 kB With provenance Details for qubot_drivers-0.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for qubot-drivers 0.1.1
File Interpreter ABI Platform Actions
qubot_drivers-0.1.1-py3-none-any.whl Python 3 none any Details for qubot_drivers-0.1.1-py3-none-any.whl

Total release size: 932.3 kB

Release files / qubot_drivers-0.1.1.tar.gz

Download URL qubot_drivers-0.1.1.tar.gz
Size 858.5 kB
Tags Source
SHA-256 checksum
How to use checksums
1d75af19e60d4789892c847a6d2812897fb87e2812bb6e6e717a8eb571c9e3ef
BLAKE2b-256 checksum
How to use checksums
e7d92a480fb5747e5fcda797d5453cfdcdc6428cac171edbfe52bb9017a87286
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 26, 2026.

Transparency log

Release files / qubot_drivers-0.1.1-py3-none-any.whl

Download URL qubot_drivers-0.1.1-py3-none-any.whl
Size 73.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
00ab14f37f13c076d9047840f36e9961b6de944e258e7c50942bc15cbefd6ff8
BLAKE2b-256 checksum
How to use checksums
d37d9663223ec379861552a4f72dc3bb6731f2ce7e67e0333c3a07459f917d08
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 26, 2026.

Transparency log

Security for qubot-drivers 0.1.1

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

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for qubot_drivers-0.1.1.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 26, 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