Main Page
Namespaces
Classes
Files
File List
include
industrial_robot_status_interface
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
22
#include <
hardware_interface/internal/hardware_resource_manager.h
>
23
24
#include <string>
25
26
27
namespace
industrial_robot_status_interface
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
49
struct
RobotStatus
50
{
51
RobotMode
mode
;
52
TriState
e_stopped
;
53
TriState
drives_powered
;
54
TriState
motion_possible
;
55
TriState
in_motion
;
56
TriState
in_error
;
57
ErrorCode
error_code
;
58
};
59
60
61
class
IndustrialRobotStatusHandle
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_
;
75
const
RobotStatus
*
robot_status_
;
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::IndustrialRobotStatusHandle::name_
std::string name_
Definition:
industrial_robot_status_interface.h:74
industrial_robot_status_interface::IndustrialRobotStatusInterface
Definition:
industrial_robot_status_interface.h:79
industrial_robot_status_interface::ErrorCode
std::int32_t ErrorCode
Definition:
industrial_robot_status_interface.h:47
industrial_robot_status_interface::RobotStatus::in_error
TriState in_error
Definition:
industrial_robot_status_interface.h:56
industrial_robot_status_interface::TriState::TRUE
industrial_robot_status_interface::RobotStatus
Definition:
industrial_robot_status_interface.h:49
industrial_robot_status_interface::TriState::FALSE
industrial_robot_status_interface::TriState
TriState
Definition:
industrial_robot_status_interface.h:33
industrial_robot_status_interface::IndustrialRobotStatusHandle::robot_status_
const RobotStatus * robot_status_
Definition:
industrial_robot_status_interface.h:75
hardware_resource_manager.h
industrial_robot_status_interface::RobotMode::AUTO
industrial_robot_status_interface::IndustrialRobotStatusHandle::getName
const std::string & getName() const noexcept
Definition:
industrial_robot_status_interface.h:69
industrial_robot_status_interface::RobotStatus::motion_possible
TriState motion_possible
Definition:
industrial_robot_status_interface.h:54
industrial_robot_status_interface::IndustrialRobotStatusHandle
Definition:
industrial_robot_status_interface.h:61
industrial_robot_status_interface
Definition:
industrial_robot_status_interface.h:27
industrial_robot_status_interface::RobotStatus::error_code
ErrorCode error_code
Definition:
industrial_robot_status_interface.h:57
industrial_robot_status_interface::TriState::UNKNOWN
industrial_robot_status_interface::RobotStatus::e_stopped
TriState e_stopped
Definition:
industrial_robot_status_interface.h:52
industrial_robot_status_interface::IndustrialRobotStatusHandle::IndustrialRobotStatusHandle
IndustrialRobotStatusHandle(const std::string &name, RobotStatus &robot_status)
Definition:
industrial_robot_status_interface.h:66
hardware_interface::HardwareResourceManager
industrial_robot_status_interface::RobotStatus::in_motion
TriState in_motion
Definition:
industrial_robot_status_interface.h:55
industrial_robot_status_interface::IndustrialRobotStatusHandle::getRobotStatus
const RobotStatus & getRobotStatus() const noexcept
Definition:
industrial_robot_status_interface.h:71
industrial_robot_status_interface::RobotMode
RobotMode
Definition:
industrial_robot_status_interface.h:40
industrial_robot_status_interface::RobotStatus::drives_powered
TriState drives_powered
Definition:
industrial_robot_status_interface.h:53
industrial_robot_status_interface::RobotMode::MANUAL
industrial_robot_status_interface::RobotStatus::mode
RobotMode mode
Definition:
industrial_robot_status_interface.h:51
industrial_robot_status_interface
Author(s): G.A. vd. Hoorn (TU Delft Robotics Institute)
autogenerated on Wed Jan 20 2021 03:28:39