Flexiv RDK APIs  1.7.0
Public Member Functions | List of all members
flexiv::rdk::Safety Class Reference

Interface to manage safety settings of the robot. A password is required to authenticate this interface. More...

#include <safety.hpp>

Public Member Functions

 Safety (const Robot &robot, const std::string &password)
 [Non-blocking] Instantiate the safety settings interface. More...
 
SafetyLimits default_limits () const
 [Non-blocking] Default values of the safety limits of the connected robot. More...
 
SafetyLimits current_limits () const
 [Non-blocking] Current values of the safety limits of the connected robot. More...
 
std::array< bool, kSafetyIOPorts > safety_inputs () const
 [Non-blocking] Current reading from all safety input ports. More...
 
void SetJointPositionLimits (const std::vector< double > &min_positions, const std::vector< double > &max_positions)
 [Blocking] Set new joint position safety limits to the connected robot, which will honor this setting when making movements. More...
 
void SetJointVelocityNormalLimits (const std::vector< double > &max_velocities)
 [Blocking] Set new joint velocity safety limits to the connected robot, which will honor this setting when making movements under the normal state. More...
 
void SetJointVelocityReducedLimits (const std::vector< double > &max_velocities)
 [Blocking] Set new joint velocity safety limits to the connected robot, which will honor this setting when making movements under the reduced state. More...
 

Detailed Description

Interface to manage safety settings of the robot. A password is required to authenticate this interface.

Definition at line 46 of file safety.hpp.

Constructor & Destructor Documentation

◆ Safety()

flexiv::rdk::Safety::Safety ( const Robot robot,
const std::string &  password 
)

[Non-blocking] Instantiate the safety settings interface.

Parameters
[in]robotReference to the instance of flexiv::rdk::Robot.
[in]passwordPassword to authorize making changes to the robot's safety settings.
Exceptions
std::invalid_argumentif the provided password is incorrect.
std::runtime_errorif the initialization sequence failed.

Member Function Documentation

◆ current_limits()

SafetyLimits flexiv::rdk::Safety::current_limits ( ) const

[Non-blocking] Current values of the safety limits of the connected robot.

Returns
SafetyLimits value copy.

◆ default_limits()

SafetyLimits flexiv::rdk::Safety::default_limits ( ) const

[Non-blocking] Default values of the safety limits of the connected robot.

Returns
SafetyLimits value copy.

◆ safety_inputs()

std::array<bool, kSafetyIOPorts> flexiv::rdk::Safety::safety_inputs ( ) const

[Non-blocking] Current reading from all safety input ports.

Returns
A boolean array whose index corresponds to that of the safety input ports. True: port high; false: port low.

◆ SetJointPositionLimits()

void flexiv::rdk::Safety::SetJointPositionLimits ( const std::vector< double > &  min_positions,
const std::vector< double > &  max_positions 
)

[Blocking] Set new joint position safety limits to the connected robot, which will honor this setting when making movements.

Parameters
[in]min_positionsMinimum joint positions: \( q_min \in \mathbb{R}^{n \times 1} \). Valid range: [default_min_joint_positions, default_max_joint_positions]. Unit: \( [rad] \).
[in]max_positionsMaximum joint positions: \( q_max \in \mathbb{R}^{n \times 1} \). Valid range: [default_min_joint_positions, default_max_joint_positions]. Unit: \( [rad] \).
Exceptions
std::invalid_argumentif [min_positions] or [max_positions] contains any value outside the valid range, or size of any input vector does not match robot DoF.
std::logic_errorif robot is not in the correct control mode.
std::runtime_errorif failed to deliver the request to the connected robot.
Note
Applicable control modes: IDLE.
This function blocks until the request is successfully delivered.
Warning
A reboot is required for the updated safety settings to take effect. After reboot, make sure to use current_limits() to double check the updated safety limits are correct.

◆ SetJointVelocityNormalLimits()

void flexiv::rdk::Safety::SetJointVelocityNormalLimits ( const std::vector< double > &  max_velocities)

[Blocking] Set new joint velocity safety limits to the connected robot, which will honor this setting when making movements under the normal state.

Parameters
[in]max_velocitiesMaximum joint velocities for normal state: \( dq_max \in \mathbb{R}^{n \times 1} \). Valid range: [0.8727, joint_velocity_normal_limits]. Unit: \( [rad/s] \).
Exceptions
std::invalid_argumentif [max_velocities] contains any value outside the valid range, or its size does not match robot DoF.
std::logic_errorif robot is not in the correct control mode.
std::runtime_errorif failed to deliver the request to the connected robot.
Note
Applicable control modes: IDLE.
This function blocks until the request is successfully delivered.
Warning
A reboot is required for the updated safety settings to take effect. After reboot, make sure to use current_limits() to double check the updated safety limits are correct.

◆ SetJointVelocityReducedLimits()

void flexiv::rdk::Safety::SetJointVelocityReducedLimits ( const std::vector< double > &  max_velocities)

[Blocking] Set new joint velocity safety limits to the connected robot, which will honor this setting when making movements under the reduced state.

Parameters
[in]max_velocitiesMaximum joint velocities for reduced state: \( dq_max \in \mathbb{R}^{n \times 1} \). Valid range: [0.8727, joint_velocity_normal_limits]. Unit: \( [rad/s] \).
Exceptions
std::invalid_argumentif [max_velocities] contains any value outside the valid range, or its size does not match robot DoF.
std::logic_errorif robot is not in the correct control mode.
std::runtime_errorif failed to deliver the request to the connected robot.
Note
Applicable control modes: IDLE.
This function blocks until the request is successfully delivered.
Warning
A reboot is required for the updated safety settings to take effect. After reboot, make sure to use current_limits() to double check the updated safety limits are correct.

The documentation for this class was generated from the following file: