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...
  | 
|   | 
Interface to manage safety settings of the robot. A password is required to authenticate this interface. 
- Note
 - Only the manipulator has safety settings, the external axes do not. 
 
Definition at line 47 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. 
 
 
 
◆ 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: \( 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 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: \( 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 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: