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.8+ 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 the robot
robot = Dobot(ip="192.168.5.1", port=29999)
robot.Connect()
# Enable robot and parse response
(err, rsp, cmd) = robot.EnableRobot()
print(f" Error code: {err}")
print(f" Response: {rsp}")
print(f" Command: {cmd}")
# Move robot with joint motion to pose
robot.MovJ("pose={0,0,0,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.
Version Changelog
- v1.0.0 (17.01.2025): Initial release based on TCP protocol v4.5.0
- v1.1.0 (20.01.2025):
- Update library based on new TCP protocol v4.6.0. Some new commands may require the robot controller version to be updated to V4.6.0.
- Add module docstring and parsing functions
- v1.1.1 (27.01.2025): Various bug fixes
- v1.1.2 (31.01.2025): Fixes bugs when parsing robot responses
- v1.1.3 (16.06.2025): Fixes bug with incorrect init file
- v1.1.4 (27.06.2025): Fixes bugs with Flexgripper class
- v1.1.5 (15.01.2026): Fixes typos in relative motion commands
- v1.1.5 (15.01.2026): Fixe naming mismatch
Contributing
Feel free to contribute to the project by submitting issues or pull requests.
License
This project is licensed under the MIT License.
Metadata
Release files for DobotTCP 1.1.6
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| dobottcp-1.1.6.tar.gz | 23.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| dobottcp-1.1.6-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 47.2 kB
Release files / dobottcp-1.1.6.tar.gz
| Download URL | dobottcp-1.1.6.tar.gz |
|---|---|
| Size | 23.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9c52ac8f38df568fd5d07c25146579d553f7542db774ab3fbcec664f91eeaad5
|
|
BLAKE2b-256 checksum How to use checksums |
26832326043b9f973ff4cf15264c1aa2f93d183479fc59c249227962b0efe761
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.0.1 CPython/3.12.5
|
Release files / dobottcp-1.1.6-py3-none-any.whl
| Download URL | dobottcp-1.1.6-py3-none-any.whl |
|---|---|
| Size | 23.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6eda550cfd6c16b64ec40f6d1e579ec9fd3c45ae6e4892cf52174099abe3c833
|
|
BLAKE2b-256 checksum How to use checksums |
48f302ca2cb26b9299c75f12bb93931b28b7ef3cc78e09d77682dadf57e2521f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.0.1 CPython/3.12.5
|