Robot DriverΒΆ

enum ResultΒΆ
enumerator Success = 1ΒΆ

Finished successfully.

enumerator Error = -1ΒΆ

General (unspecified) error.

enumerator ErrorStartPositionDeviation = -100ΒΆ

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

enumerator ErrorTrajectoryDidNotUpdate = -101ΒΆ

Failed to update the trajectory.

enumerator ErrorReachGoalTimeout = -102ΒΆ

Waiting to reach goal position has timed out.

enumerator ErrorCommandAlreadyInProgress = -103ΒΆ

Another command already in progress.

enumerator ErrorTrajectoryAborted = -104ΒΆ

Trajectory aborted by stop command.

enumerator ErrorController = -200ΒΆ

General error on the controller.

enumerator ErrorControllerEStopActive = -201ΒΆ

E-Stop is active on the controller.

enumerator ErrorControllerSafetyViolation = -202ΒΆ

Safety violation occured on the controller.

enumerator ErrorControllerAlarmActive = -203ΒΆ

An alarm is active on the controller.

enumerator ErrorControllerNotInAutoMode = -204ΒΆ

Controller is not in automatic mode.

enumerator ErrorControllerNotInRemoteMode = -205ΒΆ

Controller not in a remote mode for external control.

enumerator ErrorControllerInHoldState = -206ΒΆ

Controller is in a hold state.

enumerator ErrorControllerEnableMotors = -207ΒΆ

The robot’s motors are not enabled.

enumerator ErrorControllerProgramStopped = -208ΒΆ

Controller program stopped unexpectedly.

enumerator ErrorControllerSendingStop = -209ΒΆ

Failed to send the stop command to the controller.

enumerator ErrorControllerConnection = -210ΒΆ

No connection to controller.

class FutureResultΒΆ
Result wait()ΒΆ

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

bool has_finished()ΒΆ

Returns whether the corresponding motions has already finished.

class DriverΒΆ
bool reconnect()ΒΆ

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

bool disconnect()ΒΆ

Disconnect from the robot. Returns disconnection success.

bool is_connected() constΒΆ

Is the robot currently connected?

ControllerStatus get_controller_status() constΒΆ

Current status of the robot’s controller.

Result enable()ΒΆ

Enable robot’s servos (if available).

Result disable()ΒΆ

Disable robot’s servos (if available).

bool is_running() constΒΆ

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

double get_speed() constΒΆ

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.

void set_speed(double speed)ΒΆ

Sets the speed parameter.

void set_speed(double speed, double duration)ΒΆ

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

Config get_current_joint_position() constΒΆ

Returns the current joint position of the robot.

RobotState get_current_state() constΒΆ

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

Result run(const Trajectory &trajectory)ΒΆ

Run a trajectory.

FutureResult run_async(const Trajectory &trajectory)ΒΆ

Run a trajectory asynchronously.

Result move_to(const ExactPoint &goal, bool ignore_collision = false)ΒΆ

Move to an exact waypoint.

FutureResult move_to_async(const ExactPoint &goal, bool ignore_collision = false)ΒΆ

Move to an exact waypoint asynchronously.

Result move_along(const std::string &name, bool ignore_collision = false)ΒΆ

Move along a pre-defined motion profile.

FutureResult move_along_async(const std::string &name, bool ignore_collision = false)ΒΆ

Move along a pre-defined motion profile asynchronously.

Result blend_into(const Trajectory &trajectory, double duration)ΒΆ

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].

FutureResult blend_into_async(const Trajectory &trajectory, double duration)ΒΆ

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].

Result stop(bool fast_stop = true)ΒΆ

Stop a motion as fast as possible.

FutureResult stop_async(bool fast_stop = true)ΒΆ

Stop a motion as fast as possible asynchronously.

void create_io_alias(const std::string &name, size_t address)ΒΆ

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

int get_digital_input(const std::string &name)ΒΆ

Read a digital input.

bool set_digital_output(const std::string &name, int value)ΒΆ

Write to a digital output. Returns whether successful.

float get_analog_input(const std::string &name)ΒΆ

Read a analog input.

bool set_analog_output(const std::string &name, float value)ΒΆ

Write to a analog output. Returns whether successful.

int get_group_input(const std::string &name)ΒΆ

Read a group input.

bool set_group_output(const std::string &name, int value)ΒΆ

Write to a group output. Returns whether successful.


class ABBDriver : DriverΒΆ
class RapidModuleΒΆ
RapidModule(const std::string &unit = "ROB_1", const std::string &egm_config = "default", double max_speed_deviation = 100.0)ΒΆ

Create a new Rapid module.

RapidModule(const std::string &manual_code)ΒΆ

Create a module with completly custom manual Rapid code.

std::string unitΒΆ

The name of the robot unit to be controlled.

bool upload = trueΒΆ

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

void add_procedure(const std::string &name, const std::string &rapid)ΒΆ

Adds a procedure to call with arbitrary Rapid code.

std::string get_rapid_code(const std::string &init = "egm")ΒΆ

Returns the overall Rapid code.

class RWSΒΆ

A robot connection using the ABB Robot Web Services interface.

class SignalΒΆ
std::string nameΒΆ

The name of the signal.

std::string categoryΒΆ

The category of the signal.

std::string lvalueΒΆ

The current value of the signal.

std::string get_version()ΒΆ

Get the version of the robot controller.

std::string get_robot_type()ΒΆ

Get the robot type.

int get_speed_ratio()ΒΆ

Get the robot’s speed ratio.

void set_speed_ratio(int speed_ratio)ΒΆ

Set the robot’s speed ratio.

Config get_joint_position(const std::string &mechunit = "ROB_1")ΒΆ

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

void call_procedure(const std::string &name)ΒΆ

Call a Rapid procedure.

Result execute_rapid_main()ΒΆ

Execute the current Rapid program from main.

Result execute(const RapidModule &module, const std::string &init = "egm")ΒΆ

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

void stop_execution()ΒΆ

Stop the execution of the currently running program.

void restart_controller()ΒΆ

Restart the controller.

Signal get_signal(const std::string &signal, const std::string &network = "", const std::string &device = "")ΒΆ

Read the signal of the given name.

void set_signal(const std::string &signal, const std::string &value, const std::string &network = "", const std::string &device = "")ΒΆ

Write the signal to the given value.

std::shared_ptr<RWS> rwsΒΆ

The RWS module, if initialized.

ABBDriver(std::shared_ptr<Planner> planner, int port)ΒΆ

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

ABBDriver(std::shared_ptr<Planner> planner, std::shared_ptr<Robot> robot, int port)ΒΆ

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

ABBDriver(std::shared_ptr<Planner> planner, const std::string &host, const RapidModule &module = RapidModule(), RobotWareVersion version = RobotWareVersion.RobotWare7)ΒΆ

Starts an ABB Robot Driver with an underyling RWS connection.

ABBDriver(std::shared_ptr<Planner> planner, std::shared_ptr<Robot> robot, const std::string &host, const RapidModule &module = RapidModule(), RobotWareVersion version = RobotWareVersion.RobotWare7)ΒΆ

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

ABBDriver(std::shared_ptr<Planner> planner, const std::string &host, int port, const RapidModule &module = RapidModule(), RobotWareVersion version = RobotWareVersion.RobotWare7)ΒΆ

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

ABBDriver(std::shared_ptr<Planner> planner, std::shared_ptr<Robot> robot, const std::string &host, int port, const RapidModule &module = RapidModule(), RobotWareVersion version = RobotWareVersion.RobotWare7)ΒΆ

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

class SimulatedDriver : DriverΒΆ
double time_speed = 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.

Result run_result = Result::SuccessΒΆ

The result type for motions.

Result enable_result = Result::SuccessΒΆ

The result type for enabling or disabling the controller.

bool connect_result = trueΒΆ

The result type for reconnecting or disconnection the controller.

SimulatedDriver(std::shared_ptr<Planner> planner, bool sync_with_studio = false, bool log_stream = false, bool serve_io_viewer = false)ΒΆ

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

SimulatedDriver(std::shared_ptr<Planner> planner, std::shared_ptr<Robot> robot, bool sync_with_studio = false, bool log_stream = false, bool 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.

void set_current_joint_position(const Config &joint_position)ΒΆ

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

void create_io(const std::string &name, std::variant<int, float> default_value)ΒΆ

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

void load_io_config(const std::vector<Signal> &config)ΒΆ

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

void load_io_config_from_file(const std::filesystem::path &file)ΒΆ

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ΒΆ
UniversalDriver(std::shared_ptr<Planner> planner, const std::string &host)ΒΆ

Starts an Universal Robot Driver using RTDE.

UniversalDriver(std::shared_ptr<Planner> planner, std::shared_ptr<Robot> robot, const std::string &host)ΒΆ

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

class YaskawaDriver : DriverΒΆ
YaskawaDriver(std::shared_ptr<Planner> planner, const std::string &host = "192.168.1.31", int port = 50240)ΒΆ

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

YaskawaDriver(std::shared_ptr<Planner> planner, std::shared_ptr<Robot> robot, const std::string &host = "192.168.1.31", int port = 50240)ΒΆ

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