Skip to main content

pydobotlab

This project was created out of necessity as an alternative to the heavy DobotLab software officially provided by Dobot. It is designed specifically for the Dobot Magician and provides full coverage of the 28 Python API entries documented in the official DobotLab Magician manual. It uses the documented function names and arguments for motion, I/O, sensors, end effectors, the slideway, and the conveyor. It runs on Windows and Linux (tested on Ubuntu 24 and 26), and may also run on macOS, although macOS has not yet been tested.

The official DobotLab software, which is implemented with compiled DLLs, is heavy and creates an unfriendly barrier to accessing the robot for educational purposes. This project implements the available commands directly in pure Python using the original protocol (Dobot Communication Protocol V1.1.5). Because the robot connects via USB, the project can run on any operating system that supports Python and can communicate with the robot.

This project uses pyserial to communicate with the robot, so no vendor DLL or DobotStudio installation is required. Arm specifications and workspace information are available in the Dobot Magician V2 User Guide (DobotLab-based) V2.3.1.

In addition, this project:

  • Provides a Qt-based panel that mimics the DobotLab control panel and operates without interfering with other programs communicating with the robot.
  • Supports communication with one robot or more, allowing several robots to be controlled from a single workstation.
  • Implements a simulator that can be used to test the robot's behavior without having one connected.

Documentation & homepage · API reference · GitHub · Changelog · Report an issue

Installation

Requires Python 3.11 or newer. Install in a virtual environment:

python -m pip install pydobotlab

For the optional PySide6 desktop panel:

python -m pip install "pydobotlab[gui]"
pydobotlab-panel

The base library requires only pyserial; Qt is installed only with the gui extra. Default settings are read from a per-user configuration file. See the installation guide for virtual environments, Windows drivers, and Linux serial-port permissions. The project has been used on Ubuntu and Windows; macOS hardware has not been verified.

Quick start

With the arm connected and its workspace clear:

from pydobotlab import Magician

with Magician() as robot:  # auto-discover; or specify "/dev/ttyUSB0" / "COM3"
    robot.clear_alarm()
    robot.set_home()
    robot.ptp(mode=1, x=220, y=0, z=50, r=0)  # MOVJ_XYZ; returns when the arm arrives
    pose = robot.get_pose()
    print(pose)

print(pose) displays x, y, z, r, and all four joint angles:

Pose(x=220.00, y=0.00, z=50.00, r=0.00, joints=[0.00, 30.00, 45.00, 0.00])

The values above illustrate the format; actual joint angles depend on the robot's pose. Access individual values with pose.x, pose.y, pose.z, pose.r, or pose.joints. Positions are in millimetres and angles are in degrees.

Dobot is also available as an alias for Magician. The documented DobotLab method names and parameters are preserved for existing scripts.

As in DobotLab, ptp and the other commands return True once the arm has executed them, so each command starts after the previous one has ended. When the arm reports an alarm, such as an unreachable target, the command raises an exception that names the alarm and its fix, and the program stops.

with Magician() as robot:
    robot.ptp(mode=1, x=220, y=0, z=50, r=0)  # MOVJ_XYZ
    robot.ptp(mode=2, x=220, y=40, z=50, r=0)  # MOVL_XYZ
    robot.set_endeffector_suctioncup(enable=True, on=True)

See DobotLab compatibility for the complete function list and return-value conventions.

Try it without hardware

pydobotlab-panel --simulator

Or use the simulator from Python:

from pydobotlab import Magician
from pydobotlab.simulator import install_simulator, stop_all

install_simulator(arms=1)
try:
    with Magician("/dev/sim0", via_broker=False) as robot:
        robot.ptp(mode=1, x=220, y=0, z=50, r=0)  # MOVJ_XYZ
        print(robot.get_pose())
finally:
    stop_all()

The simulator supports offline examples and tests. It approximates motion and firmware behavior; it does not validate a real robot's trajectory.

Features and examples

  • Cartesian and joint motion, jogging, homing, speed settings, and continuous paths.
  • Suction cup, gripper, laser, digital I/O, sensors, and conveyor commands.
  • Structured alarms, motion-failure exceptions, and live pose streaming.
  • Firmware queue control and with robot.batch() for accumulating commands.
  • Multiple robot connections and a local broker for sharing a port between the GUI and scripts.

Start with pick and place, smiley drawing, or two arms with live panels. The user guide covers the API, control panel, broker, and wire protocol.

License

MIT.

Maintained by Tal Eylon, taleylon1@gmail.com.

Metadata

Release files for pydobotlab 0.2

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

Source distribution (sdist)

Source distribution for pydobotlab 0.2
File Size Uploaded
pydobotlab-0.2.tar.gz 149.8 kB Details

Built distribution (wheel)

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

Total release size: 224.8 kB

Release files / pydobotlab-0.2.tar.gz

Download URL pydobotlab-0.2.tar.gz
Size 149.8 kB
Tags Source
SHA-256 checksum
How to use checksums
68ba13fba9a8c1d124632dbf01ef9e643b17207cbf0a2eb1d375cfd811ea9668
BLAKE2b-256 checksum
How to use checksums
769f9c96b67201c377ffeee2a482785e1b600eb4341f5211badcf279234d0e48
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Oct 12, 2026.

Transparency log

Release files / pydobotlab-0.2-py3-none-any.whl

Download URL pydobotlab-0.2-py3-none-any.whl
Size 75.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
950a2fb79c102ddd87e48508034e65bf2c74c85bf4c888246032c45b1943e117
BLAKE2b-256 checksum
How to use checksums
ea58bb14b9688c162f79ceb9d3bd9d76ecf024ffbe114d2a24c6a680cdc9281c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Oct 12, 2026.

Transparency log

Release history Release notifications | RSS feed

0.2.1

2 release files

This release

0.2 This release

2 release files

0.1.0

2 release 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