18 #ifndef ADAPTER_OPERATION_MODE_H 19 #define ADAPTER_OPERATION_MODE_H 25 #include <prbt_hardware_support/GetOperationMode.h> 26 #include <prbt_hardware_support/IsBrakeTestRequired.h> 27 #include <prbt_hardware_support/OperationModes.h> 54 GetOperationMode::Response& response);
74 #endif // ADAPTER_OPERATION_MODE_H ros::NodeHandle & nh_
The node handle.
virtual ~AdapterOperationMode()=default
OperationModes op_mode_
Store the current operation mode according to OperationModes.msg.
bool getOperationMode(GetOperationMode::Request &, GetOperationMode::Response &response)
void updateOperationMode(const OperationModes &mode)
Stores the operation mode and publishes it, if it has changed.
ros::Publisher operation_mode_pub_
Informs about operation mode changes via topic.
void initOperationModeService()
Initializes the operation mode service.
AdapterOperationMode(ros::NodeHandle &nh)
std::mutex op_mode_mutex_
Protects read/write of the operation mode.
ros::ServiceServer operation_mode_server_
Server serving a service to ask whether a brake test is currently required.
Publishes information on the active operation mode. Also offers a service for querying the operation ...