Skip to main content

A library to control Dobot robots via TCP

Project description

DobotTCP Library

DobotTCP is a Python library to control the Dobot robot range via its TCP interface. The library provides functions for managing motion, I/O, and configuration of the Dobot robot. It was specially developed with the Dobot MagicianE6 in mind.

Installation

Install the library via pip:

pip install DobotTCP

Ensure Python 3.6+ is installed. Install dependencies if not automatically installed:

pip install multipledispatch

Import the library in your project:

from DobotTCP import Dobot

Basic Usage

Example

from DobotTCP import Dobot

# Connect and enable the robot
robot = Dobot(ip="192.168.5.1", port=29999)
robot.Connect()
robot.EnableRobot()

# Move robot with joint motion to pose
MovJ("pose={200,200,200,0,0,0}")

# Home robot
robot.Home()

robot.Disconnect()

Included Classes

Addidtional classes for robot accessories have been added

Flexible Gripper

Basic controls for a flexible gripper

from DobotTCP import Dobot, FlexGripper

robot = Dobot()
gripper = FlexGripper(robot)
gripper.Open()
gripper.Close()

Servo Gripper

Basic controls for a servo gripper (IO mode)

from DobotTCP import Dobot, ServoGripper

robot = Dobot()
servo_gripper = ServoGripper(robot)
servo_gripper.SetState(1)  # Open
servo_gripper.SetState(2)  # Close

Feedback

This class was implemented to receive feedback from the robot via TCP.

from DobotTCP import Dobot, Feedback

robot = Dobot()
feedback = Feedback(robot)
feedback.Connect()
feedback.Get()
print(feedback.data.get("RobotType"))

Notes

  • This class was written with the intention to stay as close to the syntax formatting of the original Dobot TCP protocol. Therefore, not all python style guides are followed. For example function names start with a capital letter.

  • Since method overloading is not trivial in python, some functions had to be changed in order to make them work in python. This is especially the case for the tray functions.

Contributing

Feel free to contribute to the project by submitting issues or pull requests.

License

This project is licensed under the MIT License.

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

dobottcp-1.0.0.tar.gz (17.9 kB view details)

Uploaded Source

Built Distribution

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

dobottcp-1.0.0-py3-none-any.whl (18.5 kB view details)

Uploaded Python 3

File details

Details for the file dobottcp-1.0.0.tar.gz.

File metadata

  • Download URL: dobottcp-1.0.0.tar.gz
  • Upload date:
  • Size: 17.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.12.5

File hashes

Hashes for dobottcp-1.0.0.tar.gz
Algorithm Hash digest
SHA256 2b86ab4dcd8cb377a2d502911a5bf5a573670f6928f9786ca722260bda7bbf2b
MD5 0f5e08745513c539c855e958b2c921d2
BLAKE2b-256 5fc5078a6fae9ea0c8127aeb582696e49fd07eb4e29feec048f9da71b108e0fc

See more details on using hashes here.

File details

Details for the file dobottcp-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: dobottcp-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 18.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.12.5

File hashes

Hashes for dobottcp-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a4b1c561921c8a83e2abf08da1c7cdf14ed180162e5bc444118d9d13fab222cd
MD5 52eb2198f7c590e94db35daf88a59d25
BLAKE2b-256 f9c5cfc81924e612343f7c7f764f9b34164c5932f093a7789f2e13a1135269b4

See more details on using hashes here.

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