C++¶
-
class Result : public utils::ReturnCode¶
-
class Result : public utils::ReturnCode
-
class Driver¶
Subclassed by jacobi::drivers::ABBDriver, jacobi::drivers::DoosanDriver, jacobi::drivers::FanucDriver, jacobi::drivers::SimulatedDriver, jacobi::drivers::UniversalDriver, jacobi::drivers::YaskawaDriver
Public Functions
-
virtual bool reconnect()¶
Connect to the robot, in particular after an external disconnection. Returns reconnection success.
-
virtual bool disconnect()¶
Disconnect from the robot. Returns disconnection success.
-
virtual bool is_connected() const¶
Is the robot currently connected?
-
virtual ControllerStatus get_controller_status()¶
Get current robot controller status (e.g. Ready/Idle, Alarm, Error, E-Stop etc.)
-
virtual RobotState get_current_state() = 0¶
Get and read current robot state.
-
bool is_running() const¶
Is the robot currently running?
-
bool is_paused() const¶
Is the robot currently in a paused state?
-
void set_speed(double speed)¶
Set the driver’s speed scaling. A speed of zero corresponds to the paused state.
-
void set_speed(double speed, double duration)¶
Set the driver’s speed scaling gracefully, change it linearly within the duration. If the robot is not running, set the speed immediately.
-
double get_speed() const¶
Get the driver’s speed scaling.
-
bool pause()¶
Pause along the currently executed trajectory. Driver will be in paused state afterwards, except the motion did finish while pausing.
-
std::shared_future<bool> pause_async()¶
Pause along the currently executed trajectory. Driver will be in paused state afterwards, except the motion did finish while pausing.
-
virtual Result run(const Trajectory &trajectory)¶
Run a trajectory.
-
virtual std::shared_future<Result> run_async(const Trajectory &trajectory) = 0¶
Run a trajectory asynchronously.
-
virtual Result move_to(const ExactPoint &goal, bool ignore_collisions = false)¶
Move to an exact waypoint.
-
virtual std::shared_future<Result> move_to_async(const ExactPoint &goal, bool ignore_collisions = false) = 0¶
Move to an exact waypoint asynchronously.
-
virtual Result move_along(const std::string &motion_name, const std::optional<ExactPoint> &goal = std::nullopt, bool ignore_collisions = false)¶
Move along a pre-defined motion.
-
virtual std::shared_future<Result> move_along_async(const std::string &motion_name, const std::optional<ExactPoint> &goal = std::nullopt, bool ignore_collisions = false) = 0¶
Move along a pre-defined motion asynchronously.
-
virtual Result blend_into(const Trajectory &trajectory, double duration)¶
Blend into a trajectory.
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].
-
virtual std::shared_future<Result> blend_into_async(const Trajectory &trajectory, double duration) = 0¶
Blend into a trajectory asynchronously.
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].
-
virtual std::shared_future<Result> stop_async(bool fast_stop = true) = 0¶
Stop a motion as fast as possible asynchronously.
-
void add_event(const Trigger &trigger, const Action &action)¶
Add an event depending on the robot’s state.
-
void create_io_alias(const std::string &name, size_t address)¶
Give I/O address an alias name.
-
virtual std::optional<int> get_digital_input(const std::string &name)¶
Read a digital input.
-
virtual bool set_digital_output(const std::string &name, int value)¶
Write to a digital output. Returns whether successful.
-
virtual std::optional<double> get_analog_input(const std::string &name)¶
Read a analog input.
-
virtual bool set_analog_output(const std::string &name, double value)¶
Write to a analog output. Returns whether successful.
-
virtual std::optional<int> get_group_input(const std::string &name)¶
Read a group input.
-
virtual bool set_group_output(const std::string &name, int value)¶
Write to a group output. Returns whether successful.
Public Members
-
const std::string host¶
The host address of the robot controller.
-
const int port¶
The port of the robot controller.
-
const size_t degrees_of_freedom¶
Degrees of freedom of the robot.
-
const double delta_time¶
Control interval of the robot’s driver.
-
double connect_timeout = {2.0}¶
Timeout for reconnecting to the robot.
-
double pausing_duration = {0.7}¶
Transition duration from and to paused state.
-
bool monitor_path_deviation = {true}¶
Monitor the path deviation between planned and executed trajectory.
-
bool log_motions = {false}¶
Whether to log motions.
-
virtual bool reconnect()¶
-
class ABBDriver : public jacobi::drivers::Driver¶
Public Functions
Starts an ABB Robot Driver using an underlying EGM server at the specified port.
Starts an ABB Robot Driver for a specified robot using an underlying EGM server at the specified port.
Starts an ABB Robot Driver with an underyling RWS connection.
Starts an ABB Robot Driver for a specified robot with an underyling RWS connection.
Starts an ABB Robot Driver with both an EGM server and an RWS connection.
Starts an ABB Robot Driver for a specified robot with both an EGM server and an RWS connection.
-
virtual bool reconnect() override¶
Connect to the robot.
-
virtual bool disconnect() override¶
Disconnect from the robot.
-
~ABBDriver()¶
Deconnect all connections.
-
virtual RobotState get_current_state() override¶
Get current robot state.
-
virtual std::shared_future<Result> run_async(const Trajectory &trajectory) override¶
Run a trajectory.
-
virtual std::shared_future<Result> move_to_async(const ExactPoint &goal, bool ignore_collisions = false) override¶
Move to an exact waypoint.
-
virtual std::shared_future<Result> move_along_async(const std::string &motion_name, const std::optional<ExactPoint> &goal = std::nullopt, bool ignore_collisions = false) override¶
Move along a pre-defined motion.
-
virtual std::shared_future<Result> blend_into_async(const Trajectory &trajectory, double duration) override¶
Blend into trajectory.
-
virtual std::shared_future<Result> stop_async(bool fast_stop = true) override¶
Stop a motion as fast as possible.
-
virtual std::optional<int> get_digital_input(const std::string &name) override¶
Read a digital input.
-
virtual bool set_digital_output(const std::string &name, int value) override¶
Write to a digital output. Returns whether successful.
-
class RapidModule¶
High level interface for a RAPID module.
Public Functions
-
explicit RapidModule()¶
Create a Rapid module with default EGM behaviour.
-
explicit RapidModule(const std::string &code)¶
Create a Rapid module with completely custom code.
-
explicit RapidModule(const std::string &unit, const std::string &egm_config, double max_speed_deviation)¶
Create a Rapid module with custom EGM behaviour.
-
void add_procedure(const std::string &name, const std::string &rapid, const std::string &global_variables = "", const std::string &rapid_setup = "", const std::optional<std::string> &next = "egm")¶
Adds a procedure to call with arbitrary Rapid code.
-
std::string get_rapid_code(const std::string &init = "egm") const¶
Returns the overall Rapid code.
-
explicit RapidModule()¶
-
class FanucDriver : public jacobi::drivers::Driver¶
Public Functions
Starts an Fanuc Robot Driver using RMI.
Starts an Fanuc Robot Driver using RMI. Controls the given robot only.
-
~FanucDriver()¶
Destroy the Fanuc Rmi Driver. Wait for any executing trajectory, disable robot, and disconnect.
-
virtual bool is_connected() const override¶
Whether the driver is currently connected.
-
virtual bool disconnect() override¶
Disconnect from the robot controller.
-
virtual bool reconnect() override¶
Reconnect after lost connection.
-
virtual RobotState get_current_state() override¶
Get the current robot state.
-
bool is_moving() const¶
Whether the driver is currently executing a trajectory.
-
virtual Result run(const Trajectory &trajectory) override¶
Run a trajectory.
-
virtual std::shared_future<Result> run_async(const Trajectory &trajectory) override¶
Run a trajectory asynchronously.
-
virtual Result move_to(const ExactPoint &goal, bool ignore_collisions = false) override¶
Move to an exact waypoint.
-
virtual std::shared_future<Result> move_to_async(const ExactPoint &goal, bool ignore_collisions = false) override¶
Move to an exact waypoint asynchronously.
-
virtual Result move_along(const std::string &motion_name, const std::optional<ExactPoint> &goal = std::nullopt, bool ignore_collisions = false) override¶
Move along a pre-defined motion.
-
virtual std::shared_future<Result> move_along_async(const std::string &motion_name, const std::optional<ExactPoint> &goal = std::nullopt, bool ignore_collisions = false) override¶
Move along a pre-defined motion asynchronously.
-
virtual Result blend_into(const Trajectory &trajectory, double duration) override¶
Blend into trajectory.
-
virtual std::shared_future<Result> blend_into_async(const Trajectory &trajectory, double duration) override¶
Blend into a trajectory asynchronously.
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].
-
virtual std::shared_future<Result> stop_async(bool fast_stop = true) override¶
Stop a motion as fast as possible asynchronously.
-
virtual std::shared_future<Result> resume_async() override¶
Resume a paused trajectory asynchronously.
-
virtual std::optional<int> get_digital_input(const std::string &name) override¶
Read a digital input.
-
virtual bool set_digital_output(const std::string &name, int value) override¶
Write to a digital output. Returns whether successful.
-
Config get_first_adjustable_waypoint(double buffer_time_s = 0.0, bool pause_execution = false)¶
Get the first adjustable waypoint (that can be overwritten)
- Parameters:
buffer_time_s – The time for which this waypoint must continue to be adjustable
pause_execution – Whether to pause executing the path so that the result remains valid
- Returns:
std::vector<double>& The position from which the path can be overwritten
-
class SimulatedDriver : public jacobi::drivers::Driver¶
Public Functions
Create a UniversalDriver with planning capabilities (with move, stop, and safety monitoring)
-
~SimulatedDriver()¶
Deconnect all connections.
-
virtual bool reconnect() override¶
Connect to the robot.
-
virtual bool disconnect() override¶
Disconnect from the robot. Returns disconnection success.
-
virtual RobotState get_current_state() override¶
Get current robot state.
-
virtual std::shared_future<Result> run_async(const Trajectory &trajectory) override¶
Run a trajectory.
-
virtual std::shared_future<Result> move_to_async(const ExactPoint &goal, bool ignore_collisions = false) override¶
Move to an exact waypoint.
-
virtual std::shared_future<Result> move_along_async(const std::string &motion_name, const std::optional<ExactPoint> &goal = std::nullopt, bool ignore_collisions = false) override¶
Move along a pre-defined motion.
-
virtual std::shared_future<Result> blend_into_async(const Trajectory &trajectory, double duration) override¶
Blend into trajectory.
-
virtual std::shared_future<Result> stop_async(bool fast_stop = true) override¶
Stop a motion as fast as possible.
-
void create_io(const std::string &name, Signal::Value default_value)¶
Create a simulated I/O.
-
virtual std::optional<int> get_digital_input(const std::string &name) override¶
Read a digital input.
-
virtual bool set_digital_output(const std::string &name, int value) override¶
Write to a digital output. Returns whether successful.
Public Members
-
double time_speed = {1.0}¶
Simulated time speed for the control cycle (does not affect velocities and accelerations)
-
Controller controller¶
I/O controller.
Public Static Attributes
-
static bool connect_result = {true}¶
Result of connecting (whether it’s successful)
Warning
doxygenclass: Cannot find class “jacobi::drivers::simulated::Signal” in doxygen xml output for project “jacobi_drivers” from directory: ../doxygen_xml/drivers/latest
-
class UniversalDriver : public jacobi::drivers::Driver¶
Public Functions
Starts an Universal Robot Driver using RTDE.
Starts an Universal Robot Driver using RTDE. Controls the given robot only.
-
~UniversalDriver()¶
Deconnect all connections.
-
virtual bool reconnect() override¶
Connect to the robot.
-
virtual bool disconnect() override¶
Disconnect from the robot.
-
virtual ControllerStatus get_controller_status() override¶
Get current robot controller status (e.g. Ready/Idle, Alarm, Error, E-Stop etc.)
-
virtual RobotState get_current_state() override¶
Get current robot state.
-
virtual std::shared_future<Result> run_async(const Trajectory &trajectory) override¶
Run a trajectory.
-
virtual std::shared_future<Result> move_to_async(const ExactPoint &goal, bool ignore_collisions = false) override¶
Move to an exact waypoint.
-
virtual std::shared_future<Result> move_along_async(const std::string &motion_name, const std::optional<ExactPoint> &goal = std::nullopt, bool ignore_collisions = false) override¶
Move along a pre-defined motion.
-
virtual std::shared_future<Result> blend_into_async(const Trajectory &trajectory, double duration) override¶
Blend into trajectory.
-
virtual std::shared_future<Result> stop_async(bool fast_stop = true) override¶
Stop a motion as fast as possible.
-
virtual std::optional<int> get_digital_input(const std::string &name) override¶
Read a digital input.
-
virtual bool set_digital_output(const std::string &name, int value) override¶
Write to a digital output. Returns whether successful.
-
virtual std::optional<double> get_analog_input(const std::string &name) override¶
Read a analog input.
-
virtual bool set_analog_output(const std::string &name, double value) override¶
Write to a analog output. Returns whether successful.
Public Members
-
double velocity_parameter = {0.0}¶
Velocity parameter of the internal UR control.
-
double acceleration_parameter = {0.0}¶
Acceleration parameter of the internal UR control.
-
double lookahead_time = {0.04}¶
Lookahead time parameter of the internal UR control.
-
double gain = {1600}¶
P-gain parameter of the internal UR control.
-
class YaskawaDriver : public jacobi::drivers::Driver¶
Public Functions
Starts an Yaskawa Robot Driver connecting to the MotoPlus application running on the robot controller.
Starts an Yaskawa Robot Driver connecting to the MotoPlus application running on the robot controller. Controls the given robot only.
-
~YaskawaDriver()¶
Deconnect all connections.
-
virtual bool reconnect() override¶
Connect to the robot.
-
void set_goal_timeout(int timeout)¶
Set the timeout for not reaching the goal state.
-
virtual RobotState get_current_state() override¶
Get current robot state.
-
virtual ControllerStatus get_controller_status() override¶
Get current robot controller status.
-
virtual std::shared_future<Result> run_async(const Trajectory &trajectory) override¶
Run a trajectory.
-
virtual std::shared_future<Result> move_to_async(const ExactPoint &goal, bool ignore_collisions = false) override¶
Move to an exact waypoint.
-
virtual std::shared_future<Result> move_along_async(const std::string &motion_name, const std::optional<ExactPoint> &goal = std::nullopt, bool ignore_collisions = false) override¶
Move along a pre-defined motion.
-
virtual std::shared_future<Result> blend_into_async(const Trajectory &trajectory, double duration) override¶
Blend into trajectory.
-
virtual std::shared_future<Result> stop_async(bool fast_stop = true) override¶
Stop a motion as fast as possible.
-
virtual std::optional<int> get_digital_input(const std::string &name) override¶
Read a digital input.
-
virtual bool set_digital_output(const std::string &name, int value) override¶
Write to a digital output. Returns whether successful.
-
virtual std::optional<int> get_group_input(const std::string &name) override¶
Read a group input.
-
virtual bool set_group_output(const std::string &name, int value) override¶
Write to a group output. Returns whether successful.
Public Members
-
std::vector<std::string> joint_names¶
Joint names of the robot.