Skip to main content

Python library for Dobot Magician For Minitechnicus Courses

Project description

Python library for Dobot Magician

Based on Communication Protocol V1.1.5 (latest version here)

This is a Fork of Github Repo: here

Documentation: documentation

Installation

Install driver from https://www.silabs.com/products/development-tools/software/usb-to-uart-bridge-vcp-drivers.

pip install dobotWrapperPy

Example

from serial.tools import list_ports

import dobotWrapperPy

available_ports = list_ports.comports()
print(f'available ports: {[x.device for x in available_ports]}')
port = available_ports[0].device

device = dobotWrapperPy.Dobot(port=port, verbose=True)

(x, y, z, r, j1, j2, j3, j4) = device.pose()
print(f'x:{x} y:{y} z:{z} j1:{j1} j2:{j2} j3:{j3} j4:{j4}')

device.move_to(x + 20, y, z, r, wait=False)
device.move_to(x, y, z, r, wait=True)  # we wait until this movement is done before continuing

device.close()

Methods

  • Dobot(port, verbose=False) Creates an instance of dobot connected to given serial port.

    • port: string with name of serial port to connect
    • verbose: bool will print to console all serial comms
  • .pose() Returns the current pose of dobot, as a tuple (x, y, z, r, j1, j2, j3, j4)

    • x: float current x cartesian coordinate
    • y: float current y cartesian coordinate
    • z: float current z cartesian coordinate
    • r: float current effector rotation
    • j1: float current joint 1 angle
    • j2: float current joint 2 angle
    • j3: float current joint 3 angle
    • j4: float current joint 4 angle
  • .move_to(x, y, z, r, wait=False) queues a translation in dobot to given coordinates

    • x: float x cartesian coordinate to move
    • y: float y cartesian coordinate to move
    • z: float z cartesian coordinate to move
    • r: float r effector rotation
    • wait: bool waits until command has been executed to return to process
  • .speed(velocity, acceleration) changes velocity and acceleration at which the dobot moves to future coordinates

    • velocity: float desired translation velocity
    • acceleration: float desired translation acceleration
  • .suck(enable)

    • enable: bool enables/disables suction
  • .grip(enable)

    • enable: bool enables/disables gripper
  • .wait(ms) adds a waiting period to the internal queue of messages

    • ms: int number of milliseconds to wait

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

dobotwrapperpy-1.3.0.tar.gz (41.5 kB view details)

Uploaded Source

Built Distribution

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

dobotwrapperpy-1.3.0-py3-none-any.whl (40.3 kB view details)

Uploaded Python 3

File details

Details for the file dobotwrapperpy-1.3.0.tar.gz.

File metadata

  • Download URL: dobotwrapperpy-1.3.0.tar.gz
  • Upload date:
  • Size: 41.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for dobotwrapperpy-1.3.0.tar.gz
Algorithm Hash digest
SHA256 c2a9db861a50fa410e6eb2d03b182e2cadd11ee4016d9c22c262a5f5f7ca47a8
MD5 fcde0f3732b30232de99b72d83e6e181
BLAKE2b-256 9e1831943ca9d28fda1b3461f566e724584c8fd8a9168f2d3607cd5b593ba768

See more details on using hashes here.

Provenance

The following attestation bundles were made for dobotwrapperpy-1.3.0.tar.gz:

Publisher: python-publish.yml on MinitechnicusBrasov/dobotWrapperPy

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

File details

Details for the file dobotwrapperpy-1.3.0-py3-none-any.whl.

File metadata

  • Download URL: dobotwrapperpy-1.3.0-py3-none-any.whl
  • Upload date:
  • Size: 40.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for dobotwrapperpy-1.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5d2af111c68eca58b8a04c454aae1d949157c95ec6274a120ce573b1359fb607
MD5 5c353f122e0c607ab8326ed1c1d9b2ef
BLAKE2b-256 1952aeb8275e0499dedd6e962a5d75d1be378805e41f918980f251ebb9ba59cc

See more details on using hashes here.

Provenance

The following attestation bundles were made for dobotwrapperpy-1.3.0-py3-none-any.whl:

Publisher: python-publish.yml on MinitechnicusBrasov/dobotWrapperPy

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