Robot Driver

class Result
Success = 1

Finished successfully.

Error = -1

General (unspecified) error.

ErrorStartPositionDeviation = -100

The start position of the trajectory deviates from the current robot’s position.

ErrorTrajectoryDidNotUpdate = -101

Failed to update the trajectory.

ErrorReachGoalTimeout = -102

Waiting to reach goal position has timed out.

ErrorCommandAlreadyInProgress = -103

Another command already in progress.

ErrorTrajectoryAborted = -104

Trajectory aborted by stop command.

ErrorController = -200

General error on the controller.

ErrorControllerEStopActive = -201

E-Stop is active on the controller.

ErrorControllerSafetyViolation = -202

Safety violation occured on the controller.

ErrorControllerAlarmActive = -203

An alarm is active on the controller.

ErrorControllerNotInAutoMode = -204

Controller is not in automatic mode.

ErrorControllerNotInRemoteMode = -205

Controller not in a remote mode for external control.

ErrorControllerInHoldState = -206

Controller is in a hold state.

ErrorControllerEnableMotors = -207

The robot’s motors are not enabled.

ErrorControllerProgramStopped = -208

Controller program stopped unexpectedly.

ErrorControllerSendingStop = -209

Failed to send the stop command to the controller.

ErrorControllerConnection = -210

No connection to controller.

class FutureResult
wait() Result

Blocks the code execution until the robot has finished the motion and then returns its result.

property has_finished: bool

Returns whether the corresponding motions has already finished.

class Driver
reconnect() bool

Connect to the robot, in particular after an external disconnection. Returns reconnection success.

disconnect() bool

Disconnect from the robot. Returns disconnection success.

property is_connected: bool

Is the robot currently connected?

property controller_status: ControllerStatus

Current status of the robot’s controller.

enable() Result

Enable robot’s servos (if available).

disable() Result

Disable robot’s servos (if available).

property is_running: bool

Is the robot is currently running a motion in a synchronously or asynchronously manner?

property speed: float

The speed parameter to change the driver’s execution speed. It is usually between 0.0 and 1.0, or might be higher for the SimulatedDriver for faster than real-time speeds.

set_speed(speed: float, duration: float)

Change the speed parameter smoothly with a linear interpolation over the given time duration [s].

property current_joint_position: Config

Returns the current joint position of the robot.

property current_state: RobotState

Returns the current joint state of the robot. Velocity and acceleration information are only available for some drivers.

run(trajectory: Trajectory) Result

Run a trajectory.

run_async(trajectory: Trajectory) FutureResult

Run a trajectory asynchronously.

move_to(goal: ExactPoint, ignore_collision=False) Result

Move to an exact waypoint.

move_to_async(goal: ExactPoint, ignore_collision=False) FutureResult

Move to an exact waypoint asynchronously.

move_along(name: str, ignore_collision=False) Result

Move along a pre-defined motion profile.

move_along_async(name: str, ignore_collision=False) FutureResult

Move along a pre-defined motion profile asynchronously.

blend_into(trajectory: Trajectory, duration: float) Result

Blend into the new trajectory from the current state, so that the robot will be on the given trajectory exactly after the duration time [s].

blend_into_async(trajectory: Trajectory, duration: float) FutureResult

Blend into the new trajectory from the current state, so that the robot will be on the given trajectory exactly after the duration time [s].

stop(fast_stop: bool = True) Result

Stop a motion as fast as possible.

stop_async(fast_stop: bool = True) FutureResult

Stop a motion as fast as possible asynchronously.

create_io_alias(name: str, address: int)

Creates an alias name for a given I/O address.

get_digital_input(name: str) int

Read a digital input.

set_digital_output(name: str, value: int)

Write to a digital output. Returns whether successful.

get_analog_input(name: str) float

Read a analog input.

set_analog_output(name: str, value: float)

Write to a analog output. Returns whether successful.

get_group_input(name: str) int

Read a group input.

set_group_output(name: str, value: int)

Write to a group output. Returns whether successful.

class ABBDriver(Driver)
class RapidModule
__init__(unit='ROB_1', egm_config='default', max_speed_deviation=100.0)

Create a new Rapid module.

__init__(manual_code: str)

Create a module with completly custom manual Rapid code.

unit: str

The name of the robot unit to be controlled.

upload: bool = True

Whether the rapid file should be uploaded to the controller on connection.

add_procedure(name: str, rapid: str)

Adds a procedure to call with arbitrary Rapid code.

get_rapid_code(init='egm') str

Returns the overall Rapid code.

class RWS

A robot connection using the ABB Robot Web Services interface.

class Signal
name: str

The name of the signal.

category: str

The category of the signal.

lvalue: str

The current value of the signal.

property version: str

Get the version of the robot controller.

property robot_type: str

Get the robot type.

property speed_ratio: int

Get and set the robot’s speed ratio.

get_joint_position(mechunit='ROB_1') Config

Get the current robot unit joint position via the RWS interface.

call_procedure(name: str)

Call a Rapid procedure.

execute_rapid_main() Result

Execute the current Rapid program from main.

execute(module: RapidModule, init='egm') Result

Executes the given Rapid module, starting from the given method.

stop_execution()

Stop the execution of the currently running program.

restart_controller()

Restart the controller.

get_signal(signal: str, network='', device='') Signal

Read the signal of the given name.

set_signal(signal: str, value: str, network='', device='')

Write the signal to the given value.

rws: RWS

The RWS module, if initialized.

__init__(planner: Planner, port: int)

Starts an ABB Robot Driver using an underlying EGM server at the specified port.

__init__(planner: Planner, robot: Robot, port: int)

Starts an ABB Robot Driver for a specified robot using an underlying EGM server at the specified port.

__init__(planner: Planner, host: str, module=RapidModule(), version=RobotWareVersion.RobotWare7)

Starts an ABB Robot Driver with an underyling RWS connection.

__init__(planner: Planner, robot: Robot, host: str, module=RapidModule(), version=RobotWareVersion.RobotWare7)

Starts an ABB Robot Driver for a specified robot with an underyling RWS connection.

__init__(planner: Planner, host: str, port: int, module=RapidModule(), version=RobotWareVersion.RobotWare7)

Starts an ABB Robot Driver with both an EGM server and an RWS connection.

__init__(planner: Planner, robot: Robot, host: str, port: int, module=RapidModule(), version=RobotWareVersion.RobotWare7)

Starts an ABB Robot Driver for a specified robot with both an EGM server and an RWS connection.

class SimulatedDriver(Driver)
time_speed: float = 1.0

A factor for speeding up the time, e.g. for faster than real-world simulations.

studio: Studio

The underlying connection to Jacobi Studio.

run_result: Result = Result.Success

The result type for motions.

enable_result: Result = Result.Success

The result type for enabling or disabling the controller.

connect_result: bool = True

The result type for reconnecting or disconnection the controller.

__init__(planner: Planner, sync_with_studio=False, log_stream=False, serve_io_viewer=False)

Starts an Simulated Robot Driver, possibly connecting to Jacobi Studio via Studio Live, or streaming the current positions to cout.

__init__(planner: Planner, robot: Robot, sync_with_studio=False, log_stream=False, serve_io_viewer=False)

Starts an Simulated Robot Driver, possibly connecting to Jacobi Studio via Studio Live, or streaming the current positions to cout. Controls the given robot only.

set_current_joint_position(joint_position: Config)

Sets the current robot’s joint position to the given value.

create_io(name: str, default_value: int | float)

Create a simulated I/O with the given name and default value.

load_io_config(config: list[Signal])

Load a config a list of signals to create multiple I/Os at once.

load_io_config_from_file(file: Path)

Load a config from file to create multiple I/Os at once. The file required to be a *.json with names mapping to their default values.

class UniversalDriver(Driver)
__init__(planner: Planner, host: str)

Starts an Universal Robot Driver using RTDE.

__init__(planner: Planner, robot: Robot, host: str)

Starts an Universal Robot Driver using RTDE. Controls the given robot only.

class YaskawaDriver(Driver)
__init__(planner: Planner, host: str = '192.168.1.31', port: int = 50240)

Starts an Yaskawa Robot Driver connecting to the MotoPlus application running on the robot controller.

__init__(planner: Planner, robot: Robot, host: str = '192.168.1.31', port: int = 50240)

Starts an Yaskawa Robot Driver connecting to the MotoPlus application running on the robot controller. Controls the given robot only.