Interface to manage safety settings of the robot. A password is required to authenticate this interface.
More...
#include <safety.hpp>
|
| | 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 safety limits on the joint positions of the manipulator, which will honor this setting when making movements. More...
|
| |
| void | SetJointVelocityNormalLimits (const std::vector< double > &max_velocities) |
| | [Blocking] Set safety limits on the joint velocities of the manipulator, which will honor this setting when making movements under the normal state. More...
|
| |
| void | SetJointVelocityReducedLimits (const std::vector< double > &max_velocities) |
| | [Blocking] Set safety limits on the joint velocities of the manipulator, which will honor this setting when making movements under the reduced state. More...
|
| |
| void | SetJointOutputTorqueRegulator (double limiting_factor=1.3, unsigned int error_threshold=50) |
| | [Blocking] Change settings of the regulator on the joint output torques of the manipulator and external axes. The regulator will limit the joints' total output torques so that the measured torques are less likely to exceed safety limits under large payload or fast/abrupt motions. More...
|
| |
Interface to manage safety settings of the robot. A password is required to authenticate this interface.
- Note
- As mentioned in the function doc, certain safety settings are only applicable to the manipulator but not the external axes.
Definition at line 48 of file safety.hpp.
◆ Safety()
| flexiv::rdk::Safety::Safety |
( |
const Robot & |
robot, |
|
|
const std::string & |
password |
|
) |
| |
[Non-blocking] Instantiate the safety settings 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()
[Non-blocking] Current values of the safety limits of the connected robot.
- Returns
- SafetyLimits value copy.
◆ default_limits()
[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.
◆ SetJointOutputTorqueRegulator()
| void flexiv::rdk::Safety::SetJointOutputTorqueRegulator |
( |
double |
limiting_factor = 1.3, |
|
|
unsigned int |
error_threshold = 50 |
|
) |
| |
[Blocking] Change settings of the regulator on the joint output torques of the manipulator and external axes. The regulator will limit the joints' total output torques so that the measured torques are less likely to exceed safety limits under large payload or fast/abrupt motions.
- Parameters
-
| [in] | limiting_factor | Factor to limit the total output torques: \( \tau^{o}_{max} = \tau_{max} \times factor \). |
| [in] | error_threshold | If the unregulated output torque of any joint exceeds the configured regulator limit for more than [error_threshold] cycles consecutively, the robot will trigger a minor fault and stop. |
- Exceptions
-
| std::invalid_argument | if [limiting_factor] or [error_threshold] is not positive. |
| 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.
-
This setting takes effect immediately and doesn't require a reboot.
- Warning
- Setting the limiting factor too small can cause performance degradation.
◆ SetJointPositionLimits()
| void flexiv::rdk::Safety::SetJointPositionLimits |
( |
const std::vector< double > & |
min_positions, |
|
|
const std::vector< double > & |
max_positions |
|
) |
| |
[Blocking] Set safety limits on the joint positions of the manipulator, 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 manipulator 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. 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 safety limits on the joint velocities of the manipulator, which will honor this setting when making movements under the normal state.
- Parameters
-
| [in] | max_velocities | Maximum joint velocities for normal state: \( \dot{q}_{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 manipulator 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. 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 safety limits on the joint velocities of the manipulator, which will honor this setting when making movements under the reduced state.
- Parameters
-
| [in] | max_velocities | Maximum joint velocities for reduced state: \( \dot{q}_{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 manipulator 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. 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: