#include <string>#include <vector>#include <ros/ros.h>#include <std_srvs/Trigger.h>#include <geometry_msgs/Twist.h>#include <controller_manager_msgs/SwitchController.h>
Go to the source code of this file.
Functions | |
| void | commandsCallback (const geometry_msgs::Twist::ConstPtr &msg) |
| void | haltCallback (const ros::TimerEvent &) |
| int | main (int argc, char *argv[]) |
| void | recover () |
| void | switch_controller () |
Variables | |
| std::vector< std::string > | g_controller_spawn |
| ros::ServiceClient | g_halt_client |
| ros::Timer | g_halt_timer |
| ros::ServiceClient | g_recover_client |
| bool | g_recovered |
| bool | g_recovering |
| ros::Timer | g_silence_timer |
| ros::ServiceClient | g_switch_client |
| double | g_threshold |
| ros::Duration | g_timeout |
| void commandsCallback | ( | const geometry_msgs::Twist::ConstPtr & | msg | ) |
Callback for command twists.
Restarts the halt_timer if twist exceeds the threshold. Additionally recovers the base if a twist exceeds the threshold and the base ist not yet recovered.
| msg | Twist message. |
Definition at line 77 of file stop_detector.cpp.
| void haltCallback | ( | const ros::TimerEvent & | ) |
Definition at line 93 of file stop_detector.cpp.
| int main | ( | int | argc, |
| char * | argv[] | ||
| ) |
Definition at line 100 of file stop_detector.cpp.
| void recover | ( | ) |
Definition at line 59 of file stop_detector.cpp.
| void switch_controller | ( | ) |
Definition at line 36 of file stop_detector.cpp.
| std::vector<std::string> g_controller_spawn |
Definition at line 33 of file stop_detector.cpp.
| ros::ServiceClient g_halt_client |
Definition at line 24 of file stop_detector.cpp.
| ros::Timer g_halt_timer |
Definition at line 27 of file stop_detector.cpp.
| ros::ServiceClient g_recover_client |
Definition at line 25 of file stop_detector.cpp.
| bool g_recovered |
Definition at line 31 of file stop_detector.cpp.
| bool g_recovering |
Definition at line 32 of file stop_detector.cpp.
| ros::Timer g_silence_timer |
Definition at line 28 of file stop_detector.cpp.
| ros::ServiceClient g_switch_client |
Definition at line 26 of file stop_detector.cpp.
| double g_threshold |
Definition at line 30 of file stop_detector.cpp.
| ros::Duration g_timeout |
Definition at line 29 of file stop_detector.cpp.