pydobotlab¶
Python control for the Dobot Magician. pydobotlab implements the 28 Python functions of the DobotLab Magician manual with the same names and arguments, and adds waiting and alarm handling, command batching, and pose streaming. All ten ptp modes are supported. See DobotLab compatibility.
It communicates over serial with pyserial using the Dobot Communication Protocol V1.1.5. No vendor library or DobotStudio installation is required.
Scripts connect through the desktop control panel, so a script and the panel control the same arm at the same time. A simulator allows use without hardware.
# Recommended, with the control panel:
python -m pip install "pydobotlab[gui]"
# Without the control panel; scripts then open the serial port directly:
python -m pip install pydobotlab
Contents¶
- Getting Started: installation, connecting to an arm, a first program, and the simulator.
- User Guide: workspace, motion patterns, alarm recovery, and pose streaming.
- API Reference: every public class, method, and function.
- Control Panel & Broker: the PySide6 panel and the TCP broker that lets the panel and a script share one arm.
- Protocol Reference: frame format, control byte, command IDs, and the method-to-command mapping.
The table of contents lists every page.
Architecture¶
┌───────────────────────────────┐ ┌────────────────────────────┐
│ script (Magician API) │ │ ControlPanel (PySide6) │
└───────────────┬───────────────┘ └──────────────┬─────────────┘
│ │
└──────────────┬────────────────────┘
▼
┌─────────────────────┐
│ DobotBroker │ TCP 127.0.0.1:8765
│ (per-port refcnt) │ (auto-spawned by panel)
└──────────┬──────────┘
▼
┌─────────────────────┐
│ SerialTransport │
└──────────┬──────────┘
▼
┌─────────────────────┐
│ Dobot V1.1.5 wire │
└─────────────────────┘
Scripts and the panel both use the Magician class. The broker relays their commands so that both can drive one arm. When the panel is installed, a script requires it to be running. Without the panel installed, a script opens the serial port directly when no panel is running.