#include <safety_controller.hpp>
Public Member Functions | |
bool | init () |
SafetyController (ros::NodeHandle &nh, std::string &name) | |
void | spin () |
~SafetyController () | |
Public Member Functions inherited from yocs::Controller | |
Controller () | |
bool | disable () |
bool | enable () |
bool | getState () |
virtual | ~Controller () |
Private Member Functions | |
void | cliffEventCB (const roch_msgs::CliffEventConstPtr msg) |
Keeps track of cliff detection. More... | |
void | disableCB (const std_msgs::EmptyConstPtr msg) |
ROS logging output for disabling the controller. More... | |
void | enableCB (const std_msgs::EmptyConstPtr msg) |
ROS logging output for enabling the controller. More... | |
void | psdEventCB (const roch_msgs::PSDEventConstPtr msg) |
Keeps track of PSD detection. More... | |
void | resetSafetyStatesCB (const std_msgs::EmptyConstPtr msg) |
Callback for resetting safety variables. More... | |
void | ultEventCB (const roch_msgs::UltEventConstPtr msg) |
Keeps track of ult detection. More... | |
@ brief Keeps track of safety-related events and commands roch to move accordingly
The SafetyController keeps track of bumper, cliff and wheel drop events. In case of the first two, roch is commanded to move back. In the latter case, roch is stopped. All commands stop when the event condition disappears. In the case of lateral bump/cliff, robot also spins a bit, what makes easier to escape from the risk.
This controller can be enabled/disabled. The safety states (bumper pressed etc.) can be reset. WARNING: Dangerous!
Definition at line 75 of file safety_controller.hpp.
|
inline |
Definition at line 78 of file safety_controller.hpp.
|
inline |
Definition at line 92 of file safety_controller.hpp.
|
private |
Keeps track of cliff detection.
msg | incoming topic message |
Definition at line 204 of file safety_controller.hpp.
|
private |
ROS logging output for disabling the controller.
msg | incoming topic message |
Definition at line 192 of file safety_controller.hpp.
|
private |
ROS logging output for enabling the controller.
msg | incoming topic message |
Definition at line 180 of file safety_controller.hpp.
|
inlinevirtual |
Set-up necessary publishers/subscribers and variables
Implements yocs::Controller.
Definition at line 98 of file safety_controller.hpp.
|
private |
Keeps track of PSD detection.
msg | incoming topic message |
Definition at line 251 of file safety_controller.hpp.
|
private |
Callback for resetting safety variables.
Allows resetting bumper, cliff and wheel drop states. DANGEROUS!
msg | incoming topic message |
Definition at line 277 of file safety_controller.hpp.
|
virtual |
@ brief Checks safety states and publishes velocity commands when necessary
Reimplemented from yocs::Controller.
Definition at line 290 of file safety_controller.hpp.
|
private |
Keeps track of ult detection.
msg | incoming topic message |
Definition at line 225 of file safety_controller.hpp.
|
private |
Definition at line 123 of file safety_controller.hpp.
|
private |
Definition at line 126 of file safety_controller.hpp.
|
private |
Definition at line 126 of file safety_controller.hpp.
|
private |
Definition at line 125 of file safety_controller.hpp.
|
private |
Definition at line 122 of file safety_controller.hpp.
|
private |
Definition at line 122 of file safety_controller.hpp.
|
private |
Definition at line 130 of file safety_controller.hpp.
|
private |
Definition at line 132 of file safety_controller.hpp.
|
private |
Definition at line 121 of file safety_controller.hpp.
|
private |
Definition at line 120 of file safety_controller.hpp.
|
private |
Definition at line 128 of file safety_controller.hpp.
|
private |
Definition at line 123 of file safety_controller.hpp.
|
private |
Definition at line 128 of file safety_controller.hpp.
|
private |
Definition at line 128 of file safety_controller.hpp.
|
private |
Definition at line 124 of file safety_controller.hpp.
|
private |
Definition at line 129 of file safety_controller.hpp.
|
private |
Definition at line 127 of file safety_controller.hpp.
|
private |
Definition at line 123 of file safety_controller.hpp.
|
private |
Definition at line 127 of file safety_controller.hpp.
|
private |
Definition at line 127 of file safety_controller.hpp.
|
private |
Definition at line 125 of file safety_controller.hpp.