Robots
Defines a generic robot.
- class Robot(ip_address: str, port: int, frequency: int = 125, name: str = '')
A generic robot type.
- _abc_impl = <_abc._abc_data object>
- _connect(ip_address: str, port: int)
Connect to a real or simulated robot via TCP / IP.
The function uses the RTDE protocol.
- Parameters:
ip_address (str) – The IP Address of the real or simulated robot controller.
port (int) – The port over which to connect to the robot.
- property con
RTDE connection to the robot.
- disconnect()
Disconnect from the robot.
- get_data(requested_data: array, samples: int = 1, frequency: int = 125)
Defines an API for connecting with a UR5e robot via the RTDE protocol.
- class UR5e(ip_address: str, port: int, frequency: int = 125, name: str = 'UR5e')
The UR5e Robot.
- _abc_impl = <_abc._abc_data object>
- _configure_communication(config_file: str, frequency: int = 125)
Configure and initialize the communication with the robot.
- Parameters:
config (str) – The RTDE configuration
frequency (int) – The frequency with which to communicate with the robot.
- Raises:
RuntimeError – If the initialization of the communication has failed.
- _get_single_data()
Get a single data package from the robot.
Note
Always gets all data that is defined in the connection coniguration xml file.
- Returns:
Serialized output data of singel measurement.
- get_current_joint_angles() ndarray
Retrieves current joint angles from the robot.
This is a convenience method, which reformats the joint angles from a dict into a numpy array for easier processing.
Note
If more data is required, please use the
Ur5e.get_data()
method.- Returns:
Actual joint angles from q0 -> q5
- Return type:
numpy.ndarray
- get_data(requested_data: array, samples: int = 1, frequency: int = 125) dict
Get data from the robot.
- Parameters:
requested_data (
numpy.ndarray
) – The data that should be returned.samples (int) – The number of data that should be returned of each type.
frequency (int) – The frequency with which to communicate with the robot.
- Raises:
AssertionError – The frquency and number of requested samples arguments must be greater than zero!
- property setp
- property watchdog