industrial_robot_status_interface.h
Go to the documentation of this file.
1 
19 #ifndef INDUSTRIAL_ROBOT_STATUS_INTERFACE_INDUSTRIAL_ROBOT_STATUS_INTERFACE_H_
20 #define INDUSTRIAL_ROBOT_STATUS_INTERFACE_INDUSTRIAL_ROBOT_STATUS_INTERFACE_H_
21 
23 
24 #include <string>
25 
26 
28 {
29 
30 // following enums mirror ROS-Industrial's simple_message enums
31 // TODO: should we just re-use those?
32 
33 enum class TriState : int8_t
34 {
35  UNKNOWN = -1,
36  FALSE = 0,
37  TRUE = 1,
38 };
39 
40 enum class RobotMode : int8_t
41 {
42  UNKNOWN = -1,
43  MANUAL = 1,
44  AUTO = 2,
45 };
46 
47 typedef std::int32_t ErrorCode;
48 
50 {
58 };
59 
60 
62 {
63  public:
64  IndustrialRobotStatusHandle() = delete;
65 
66  IndustrialRobotStatusHandle(const std::string& name, RobotStatus& robot_status)
67  : name_(name), robot_status_(&robot_status) {}
68 
69  const std::string& getName() const noexcept { return name_; }
70 
71  const RobotStatus& getRobotStatus() const noexcept { return *robot_status_; }
72 
73  private:
74  std::string name_;
76 };
77 
78 
79 class IndustrialRobotStatusInterface : public hardware_interface::HardwareResourceManager<IndustrialRobotStatusHandle> {};
80 
81 
82 } // namespace industrial_robot_status_interface
83 
84 
85 #endif // INDUSTRIAL_ROBOT_STATUS_INTERFACE_INDUSTRIAL_ROBOT_STATUS_INTERFACE_H_
industrial_robot_status_interface::RobotStatus::drives_powered
TriState drives_powered
Definition: industrial_robot_status_interface.h:53
industrial_robot_status_interface::TriState
TriState
Definition: industrial_robot_status_interface.h:33
industrial_robot_status_interface::TriState::FALSE
@ FALSE
industrial_robot_status_interface::RobotMode::UNKNOWN
@ UNKNOWN
industrial_robot_status_interface::RobotStatus::in_error
TriState in_error
Definition: industrial_robot_status_interface.h:56
industrial_robot_status_interface::IndustrialRobotStatusHandle
Definition: industrial_robot_status_interface.h:61
industrial_robot_status_interface::IndustrialRobotStatusHandle::IndustrialRobotStatusHandle
IndustrialRobotStatusHandle(const std::string &name, RobotStatus &robot_status)
Definition: industrial_robot_status_interface.h:66
industrial_robot_status_interface::RobotStatus::motion_possible
TriState motion_possible
Definition: industrial_robot_status_interface.h:54
industrial_robot_status_interface::RobotMode::AUTO
@ AUTO
industrial_robot_status_interface::IndustrialRobotStatusHandle::getName
const std::string & getName() const noexcept
Definition: industrial_robot_status_interface.h:69
industrial_robot_status_interface::IndustrialRobotStatusInterface
Definition: industrial_robot_status_interface.h:79
industrial_robot_status_interface::TriState::UNKNOWN
@ UNKNOWN
industrial_robot_status_interface::IndustrialRobotStatusHandle::IndustrialRobotStatusHandle
IndustrialRobotStatusHandle()=delete
industrial_robot_status_interface::IndustrialRobotStatusHandle::robot_status_
const RobotStatus * robot_status_
Definition: industrial_robot_status_interface.h:75
industrial_robot_status_interface::RobotStatus::e_stopped
TriState e_stopped
Definition: industrial_robot_status_interface.h:52
industrial_robot_status_interface::RobotStatus
Definition: industrial_robot_status_interface.h:49
industrial_robot_status_interface::IndustrialRobotStatusHandle::name_
std::string name_
Definition: industrial_robot_status_interface.h:74
industrial_robot_status_interface::RobotStatus::error_code
ErrorCode error_code
Definition: industrial_robot_status_interface.h:57
industrial_robot_status_interface::IndustrialRobotStatusHandle::getRobotStatus
const RobotStatus & getRobotStatus() const noexcept
Definition: industrial_robot_status_interface.h:71
industrial_robot_status_interface::ErrorCode
std::int32_t ErrorCode
Definition: industrial_robot_status_interface.h:47
industrial_robot_status_interface::RobotStatus::in_motion
TriState in_motion
Definition: industrial_robot_status_interface.h:55
industrial_robot_status_interface
Definition: industrial_robot_status_interface.h:27
industrial_robot_status_interface::RobotStatus::mode
RobotMode mode
Definition: industrial_robot_status_interface.h:51
hardware_interface::HardwareResourceManager
industrial_robot_status_interface::RobotMode::MANUAL
@ MANUAL
industrial_robot_status_interface::TriState::TRUE
@ TRUE
hardware_resource_manager.h
industrial_robot_status_interface::RobotMode
RobotMode
Definition: industrial_robot_status_interface.h:40


industrial_robot_status_interface
Author(s): G.A. vd. Hoorn (TU Delft Robotics Institute)
autogenerated on Sun Jul 2 2023 02:32:37