URCtrl Control Manual
URCtrl is not merely a standalone Python wrapper for Universal Robots. It is the UR implementation of a common robot interface intended to let researchers control multiple collaborative robots through the same API.
The objective is not to make the smallest possible port from COBOTTA to UR. It is to define a common API that treats COBOTTA and UR at a comparable level of abstraction, providing a system for instrument control, experiment automation, and SPring-8 BL774-style operations.
Accordingly, URCtrl takes COBOTTA compatibility into account without treating COBOTTA as the definitive standard. Sound design choices established in the UR implementation may instead be incorporated into cobotta_ctrl.
Contents:
Objectives
Provide a common collaborative-robot API that is easy for researchers to use.
Hide differences between COBOTTA, UR, and other robot models from higher-level experiment code.
Make robot control a component of the overall experimental instrument-control system.
Support integration with BL774-style, SPring-8-compatible experiment automation architectures.
Define a research-oriented robot control API rather than an interface tied to a particular manufacturer.
Role of URCtrl
Experiment script
↓
Common robot interface
↓
URCtrl / CobottaCtrl / future robot implementations
↓
Robot-specific APIs
↓
Physical robot
URCtrl implements the UR side, while cobotta_ctrl implements the COBOTTA side. Neither is subordinate to the other; both are peer implementations of the same common interface.
Contents
Minimal Example
from ur.ur_ctrl import UrCtrl, MotionMode
ROBOT_IP = "10.170.10.56"
with UrCtrl(ROBOT_IP) as robot:
current = robot.current_position
if current is not False:
target = list(current)
target[2] += 10.0
robot.move(
target,
motion_mode=MotionMode.LINE,
speed=20,
accel=20,
is_async=False,
)
The public interface represents P coordinates as [x, y, z, rx, ry, rz]: position in millimeters and orientation as a rotation vector expressed in degrees. J coordinates are in degrees. speed, accel, and decel are percentages satisfying 0 < value <= 100.