Skip to main content

Control a Dobot v1 arm (2016) with motion planning in Python. Based on open-dobot by maxosprojects.

Project description

Dobot1-Control (v1.4.0)

PyPI Package latest release Commits since latest release License Supported versions PyPI Wheel Weekly PyPI downloads Continuous Integration and Deployment Status Coverage report

Control a Dobot v1 arm (2016 model) with Python, based on the work (and requires the firmware) of open-dobot by maxosprojects. Now including motion planning, limits and flexible accelerometers support, tested with SCA1000 additionally.

This is a further development of the DobotSDK package. Tested and developed with the original FPGA hardware and the open-dobot firmware.

Installation

pip install dobot1-control

You can also install the in-development version with:

pip install git+https://github.com/ibressler/dobot1-control.git@main

Documentation

https://ibressler.github.io/dobot1-control

Usage

Motion planning

The arm should move through a series of points with the highest possible speed allowed by the given maximum velocity and acceleration, full stops on direction changes only. For a circular path like the one below, it should try to maintain a continuous motion.

Circle positions

This is what the actual motion looks like now, with the actual speed of each joint over time (steps taken per interval of 50 ms):

Steps taken along circle

This example can be found in the dobot example moves.ipynb notebook.

Free Accelerometer Conversion

As it seems, the dobot arm was shipped with different accelerometer ICs at different production batches. The previously hardcoded conversion factors were not accurate for the SCA1000 accelerometers found in some Dobot v1 arms. Additionally, the sensor offsets need to be determined for each accelerometer anyway.

To move the arm tool as precisely as its mechanical capabilities allow along a straight line parallel to a flat surface, such as a table, calibrate the accelerometer offsets and conversion factor. The determined values need to be provided to the Dobot() constructor:

Dobot("/dev/ttyACM0",
      endEffectorOffset=(49., 64.),
      accelOffset=(1016.39, 1009.08),
      accelConversion=509.00)

Accelerometer Calibration

The scripts/calibrate-accelerometers.py tool helps in finding offsets and conversion factors for the installed accelerometers. Once the package was installed, the tool can be run as follows:

Usage

dobot-calibrate-accelerometers [mode] [options]

Modes

  • continuous (default): Continuously reports accelerometer data and calculated angles.
  • positions: Calculates sensor offsets and conversion factors based on two measured positions.

Positions Mode Options

  • --pos1 X Y Z: First position for calibration (default: 120 0 0).
  • --pos2 X Y Z: Second position for calibration (default: 320 0 0).
  • --offset H V: End effector offset: horizontal and vertical distance of the mounted tool from joint 3 (default: 51 15).

Follow the procedure below to enable the accelerometer reporting mode on FPGA. No action is required on the RAMPS as GY-521 accelerometers can be read at any time there.

  1. Turn off power on the arm and disconnect USB cable
  2. Connect USB cable
  3. Enable the accelerometer reporting mode:
    1. Press and hold the "Sensor Calibration" button on the FPGA version or ground pin D23 on AUX-4 on the RAMPS version
    2. Press and release the "Reset" button
    3. Start this tool (still holding the "Sensor Calibration" button on the FPGA version or keeping pin D23 grounded on the RAMPS)
    4. Once the constructor ran (or the accelerometer data starts flowing on your console in continuous mode),
    5. Release the "Sensor Calibration" button
  4. Move the arm around to the positions prompted by the tool.
  5. Finally, note the accelerometer offsets and conversion factor values reported on the console. Those are your accelerometers' offsets to be supplied to the Dobot() constructor.
  6. Disconnect USB cable again to reinit with the new values.

Development

Testing

This project uses pytest for testing and tox for running them in a reproducible environment.

See which tests are available (arguments after -- get passed to pytest which runs the tests):

tox -e py -- --co

Run a specific test only:

tox -e py -- -k <test_name from listing before>

Run all tests with:

tox -e py

Package Version

Get the next version number and how the GIT history would be interpreted for that:

pip install python-semantic-release
semantic-release -v version --print

This prints its interpretation of the commits in detail. Make sure to supply the --print argument to not raise the version number which is done automatically by the release job of the GitHub Action Workflows.

Project template

Update the project configuration from the copier template and make sure the required packages are installed:

pip install copier jinja2-time
copier update --trust --skip-answered

Copyright

  • Copyright © 2016 maxosprojects (original).
  • Copyright © 2026 Ingo Breßler (fork).
  • Licensed under the MIT License — see LICENSE.

CHANGELOG

v1.4.0 (2026-05-13)

Bug fixes

  • notebook: update initialization with new parameters accelOffset and accelConversion (8df0afa)

  • calibration: show help message and exit when no arguments are provided (0e9792e)

  • calibration: improve device port detection for cross-platform support (1c47b3a)

  • DobotDriver: replace sca1000Sensors parameter by free accelConversion (340f967)

  • DobotDriver: replace math constant (a283dc8)

  • DobotSDK: refine slice skipping logic (d87df6b)

  • DobotSDK: joint limits for Dobot with SCA1000 accelerometers (1209fac)

  • DobotSDK: clip joint velocity and acceleration limits to feasible ranges (a5673a6)

  • notebook: adjust to updated constructor arguments (9d003ea)

  • DobotSDK: suppress debug output when disabled (f62e318)

  • notebook: adapt Dobot init() for SCA1000 sensors and end effector offsets (08d65d4)

  • DobotSDK: check for empty data arrays to prevent runtime errors in plotting (d994972)

  • calibrate-accelerometers: add units (°, mm) to printed outputs for clarity (204d3ff)

  • calibrate-accel: glob serial device name on linux (70de135)

  • SegmentParams._solve_common: mismatch factor calculation (5800f37)

  • Dobot._prepareAnglesSlice: order of step arithmetic for possibly negative step diffs (0b59af4)

  • DobotSDK.MoveWithSpeed: skip calculation for zero distance, prevent div-by-zero err (f5721a3)

Code style

  • notebook: disable debug output, fix comments and formatting (88c4bec)

  • DobotSDK: improve comment clarity (d5acf75)

  • DobotSDK, DobotKinematics: simplify debug methods by unifying print logic (a326e8d)

  • DobotKinematics: simplify debug method with improved string formatting (cce40d4)

  • DobotKinematics: fix spelling, improve formatting, and add static methods (d876f09)

  • DobotKinematics: indenting: tabs to spaces (ad4eb26)

  • DobotDriver: black formatting consistency (47acbe9)

  • DobotSDK: improve string formatting consistency and minor grammar fix (faf4f66)

  • DobotDriver+SDK: convert indents to spaces (2b4618a)

  • DobotDriver: consistent formatting and minor spelling corrections (9d067e2)

  • style: spelling (e63e525)

Continuous integration

  • ci: publish job with pypi environment (07ac694)

  • ci: set Python version to 3.14 (d333a81)

Documentation

  • Project: update image URLs, improve instructions, and refine templates (faa7d6d)

  • LICENSE: minor formatting (608f279)

  • README: Update from project template (651e1b6)

  • license: add MIT License and update copyright information in README (4456257)

  • README: clarify source and firmware requirement (1c815d4)

  • README: add detailed instructions for enabling accelerometer reporting mode (3ef1c26)

  • README: adjust circle path image size (ecd5a2a)

  • README: update with motion planning, accelerometer calibration, and usage details (7a32c79)

  • README: typo (6daf0fb)

  • README: fix broken links to maxosprojects repository (1248840)

  • README: fix broken links to maxosprojects repository (6af60d8)

  • README: fix broken links to maxosprojects repository (77e1169)

  • docs: add initial README for Dobot v1 Control (620cfee)

  • docs: author list updated (ced77dd)

  • notebook: comments added debug output disabled (1acbd7e)

  • docs: improve grammar, consistency, and clarity in comments and docstrings (de05319)

  • calibrate-accelerometers: improve instructions formatting and grammar adjustments (01bed53)

  • DobotDriver: fix and add docstrings for all methods and their parameters (27112ca)

  • DobotDriver: add comprehensive docstring for class initialization parameters (f53659f)

  • DobotSDK.init: add detailed docstring for class initialization parameters (d2399eb)

Features

  • calibration: add CLI option for end effector offset (dc9e38b)

  • calibration: refine accelerometer calibration with detailed offsets and conversion calculation (8ea7f7b)

  • calibration: add CLI options for first and second calibration positions (0c16710)

  • calibration: add positions mode (0742986)

  • DobotSDK: add accelOffset parameter and pass to driver for accelerometer configuration (f6a3bf9)

  • DobotKinematics: add unit tests for kinematics and improve documentation (3553123)

  • DobotSDK: add posAngles property for joint angle position (daa8585)

  • DobotSDK: add static method to format positional data (8cbfabd)

  • DobotSDK: introduce configurable angular limits for joints (4f041f6)

  • DobotSDK: add configurable joint velocity and acceleration limits with updated docstrings (2c25e71)

  • DobotKinematics, DobotSDK: add configurable end effector offset with updated docstrings (b3cf044)

  • DobotDriver: add support for SCA1000-D01 sensors with configurable accel conversion (bc377b4)

  • calibrate-accel: limit sensor queries to 4 per seconds (53174d4)

  • notebook: jupyter notebook for testing SDK and movements semi-interactively (628725e)

  • DobotSDK: omit debug output in non-debug mode (fad4182)

  • DobotSDK: Dobot.pos remembers own absolute coordinates (1c73253)

Refactoring

  • docs/codebase: standardize author/license fields, remove unused docs (abbd27c)

  • Codebase: align formatting to PEP8, improve readability (934f6de)

  • Project: file structure standardized, tool config added (2096409)

  • Dobot: remove joint angle limits, revert 4f041f60 (f111647)

  • DobotSDK: move valueToStr and arrayToStr to DobotBase (03c74eb)

  • DobotSDK: move accel offset to driver (4c1bb09)

  • DobotBase: centralize axes/joint names for consistency (08bdbf0)

  • DobotSDK: remove unused code; fix debug output (8fe79a2)

  • DobotKinematics: return NumPy arrays (3f23766)

  • DobotSDK: move utility functions for array debugging and printing (f6525cd)

  • DobotSDK, DobotKinematics, DobotDriver: introduce to centralize debugging functionality (e6adbc6)

  • DobotKinematics: remove unused function and constants (053f192)

  • DobotDriver: remove accel*ToAngle() (ca090ea)

  • Dobot.InitializeAccelerometers: new _get_accelerometers_raw() used by fpga & non-fpga variant (5a0ca9a)

  • DobotSDK._moveToAnglesSlice: enable skipping of zero-step slices (cece309)

  • DobotSDK.MoveWithSpeed: precise motion planning and velocity synchronization across multiple segments (a6faae2)

  • DobotSDK.MoveWithSpeed: synchronize joint-indiv. acceleration and deceleration phases for multiple segments (4a5b237)

  • DobotDriver: replace exit with sys.exit for clearer intent and consistency (e60c006)

  • DobotSDK.MoveWithSpeed: optimize motion planning with lookahead waypoint speed profiling (89be1df)

  • DobotKinematics.anglesFromCoordinates: add debug flag and expect vector input (13ab38b)

  • DobotSDK.MoveWithSpeed: vectorize target position (92afda0)

  • notebook: remove lower-level driver control, adjust high-level control (aa0e18a)

  • DobotSDK, DobotDriver: streamline joint commands and plotting logic with vectorized data structures (3141874)

  • DobotSDK.MoveWithSpeed: vectorize step calculations using NumPy for cleaner logic (88d02f8)

  • notebook: comment on device permissions and usage (0fb9e0c)

  • DobotSDK: consolidate coordinate tracking logic and enhance plotting with slice data visualization (e783709)

  • DobotSDK: introduce DobotPlotter class for enhanced plotting and clean up legacy code (84b5df4)

  • DobotSDK: clean up unused methods, improve formatting, and fix minor issues (55d3983)

  • DobotDriver: update timeout parameter and remove unused methods (da627a6)

Unknown Scope

  • let git ignore python temp files (749f87a)

v1.3.0 (2026-03-31)

Unknown Scope

  • initial import of original code from maxosprojects/open-dobot (357d3f8)

Project details


Download files

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

Source Distribution

dobot1_control-1.4.0.tar.gz (264.1 kB view details)

Uploaded Source

Built Distribution

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

dobot1_control-1.4.0-py3-none-any.whl (35.7 kB view details)

Uploaded Python 3

File details

Details for the file dobot1_control-1.4.0.tar.gz.

File metadata

  • Download URL: dobot1_control-1.4.0.tar.gz
  • Upload date:
  • Size: 264.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for dobot1_control-1.4.0.tar.gz
Algorithm Hash digest
SHA256 9abff0fbe73c9519e26bbcc283084933ec5f749323c455c0573bc8d8aacde8f8
MD5 b85f3213b5b1be68df5b39748b75396e
BLAKE2b-256 90a20dc567e702086f41a52dc02ef083f11f308c5bf144da03f4f6dcbe698c9d

See more details on using hashes here.

Provenance

The following attestation bundles were made for dobot1_control-1.4.0.tar.gz:

Publisher: ci-cd.yml on ibressler/dobot1-control

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

File details

Details for the file dobot1_control-1.4.0-py3-none-any.whl.

File metadata

  • Download URL: dobot1_control-1.4.0-py3-none-any.whl
  • Upload date:
  • Size: 35.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for dobot1_control-1.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 56243c78946d090a910fcd112513f3b8cf60f7f6ea7d5d6c2ed36efd3f21c09d
MD5 f57782dd3868b3d082ff863938e2521e
BLAKE2b-256 e8b3ff5714b90c186562bf9409e7b69aab859e4a2a2fd09a91e784f54f69e85e

See more details on using hashes here.

Provenance

The following attestation bundles were made for dobot1_control-1.4.0-py3-none-any.whl:

Publisher: ci-cd.yml on ibressler/dobot1-control

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

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page