Interface to change robot safety settings. The robot must be in IDLE mode when applying any changes. A password is required to authenticate this interface.
More...
#include <safety.hpp>
|
| Safety (const Robot &robot, const std::string &password) |
| [Non-blocking] Create an instance and initialize the interface. More...
|
|
const SafetyLimits | default_limits () const |
| [Non-blocking] Default values of the safety limits of the connected robot. More...
|
|
const SafetyLimits | current_limits () const |
| [Non-blocking] Current values of the safety limits of the connected robot. More...
|
|
const 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...
|
|
Interface to change robot safety settings. The robot must be in IDLE mode when applying any changes. A password is required to authenticate this interface.
Definition at line 46 of file safety.hpp.
◆ Safety()
flexiv::rdk::Safety::Safety |
( |
const Robot & |
robot, |
|
|
const std::string & |
password |
|
) |
| |
[Non-blocking] Create an instance and initialize the interface.
- Parameters
-
[in] | robot | Reference to the instance of flexiv::rdk::Robot. |
[in] | password | Password to authorize making changes to the robot's safety settings. |
- Exceptions
-
std::invalid_argument | if the provided password is incorrect. |
std::runtime_error | if the initialization sequence failed. |
◆ current_limits()
const 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()
const 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()
const 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_positions | Minimum joint positions: \( q_min \in \mathbb{R}^{n \times 1} \). Valid range: [default_min_joint_positions, default_max_joint_positions]. Unit: \( [rad] \). |
[in] | max_positions | Maximum 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_argument | if [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_error | if robot is not in the correct control mode. |
std::runtime_error | if 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.
◆ 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_velocities | Maximum 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_argument | if [max_velocities] contains any value outside the valid range, or its size does not match robot DoF. |
std::logic_error | if robot is not in the correct control mode. |
std::runtime_error | if 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.
◆ 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_velocities | Maximum 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_argument | if [max_velocities] contains any value outside the valid range, or its size does not match robot DoF. |
std::logic_error | if robot is not in the correct control mode. |
std::runtime_error | if 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.
The documentation for this class was generated from the following file: