The ur_module repository is a comprehensive robotics control package centered around a modernized UR Interface. It replaces the legacy driver system with a Python-based interface built on madsci infrastructure and includes tooling for motion control, tool management, and integration with external systems. It supports direct robot control through UR Dashboard and URX, and also provides keyboard-based teleoperation.
The UR interface offers a unified API to:
-
Initialize Robot via UR Dashboard
- Power on/off
- Load and run
.urpprograms - Set operational modes
- Clear faults
-
Motion Control Using Updated URX
- Cartesian and joint-space control
- Speed and acceleration tuning
- Safe motion state checking
-
Tool Control
- Support for a variety of end-tools, including:
- Robotiq Gripper (Modbus TCP/IP)
- TriContenent Pipette (RS485)
- Robotiq Screwdriver (Interpreter Socket)
- Robotiq Vacuum Gripper (Interpreter Socket)
- OpenTrone Pipette (PyEpics)
- ATI Tool Changer (PyEpics)
- Support for a variety of end-tools, including:
-
I/O Digital Output Handling
- Set digital pins to open/close connected tools or devices
-
Keyboard Control (Jogging)
- Use keyboard to jog the arm in real-time
- Easily save poses by moving robot manually
-
Support for Camera Integration
- The repository includes AI camera support for real-time object detection and recognition. The detected target locations can be seamlessly transitioned to the UR robot for further action.
⚠️ This repo includes a patched and dependency-fixed version of URX. Installing this repo as a whole is critical.
cd ur_module
pdm installPDM ensures all dependencies (including madsci, URX fork, etc.) are resolved in a reliable and reproducible environment.
After installing, explore the following modules:
ur_interface/ur.py: Primary control interface (URclass)keyboard_control.py: Manual jogging and pose discoverytests/: Example Jupyter notebooks to interact with the interface and the REST Nodetests/interface_test.ipynbtests/node_test.ipynb
Example:
from ur_interface.ur import UR
robot = UR("192.168.0.100")
robot.home([0, -1.57, 0, -1.57, 0, 0])
robot.disconnect()Initilize REST Node using below steps:
- In your terminal run
madsci node createto create a device type node definition file. - Navigate into the created definition file and add
ur_ip:<your_robot_ip>underconfig_defaults - If you are using Docker you can start the node with
docker compose buildanddocker compose up - If you are running for development proposes, navigate into
/ur_module/srcand runpython ur_rest_node.py --definition <path_to_your_definition_file>
We welcome pull requests and issues. Please ensure code is typed and documented.
This repository is licensed under the MIT License - see the LICENSE file for details.