NavigationState.h
Go to the documentation of this file.
1 #ifndef NAVIGATIONSTATE_H
2 #define NAVIGATIONSTATE_H
3 
5 #include <rsm_core/BaseState.h>
6 #include <rsm_core/IdleState.h>
9 #include <geometry_msgs/PoseArray.h>
10 #include <move_base_msgs/MoveBaseAction.h>
12 #include <rsm_msgs/GetNavigationGoal.h>
13 #include <rsm_msgs/GetRobotPose.h>
14 #include <rsm_msgs/OperationMode.h>
15 #include <rsm_msgs/GoalCompleted.h>
16 #include <std_srvs/Trigger.h>
17 #include <tf/transform_datatypes.h>
18 #include <std_msgs/Bool.h>
19 
20 namespace rsm {
21 
28 class NavigationState: public BaseState {
29 
30 public:
31 
36 
41 
45  void onSetup();
46 
50  void onEntry();
51 
55  void onActive();
56 
60  void onExit();
61 
65  void onExplorationStart(bool &success, std::string &message);
66 
70  void onExplorationStop(bool &success, std::string &message);
71 
75  void onWaypointFollowingStart(bool &success, std::string &message);
76 
80  void onWaypointFollowingStop(bool &success, std::string &message);
81 
86  void onInterrupt(int interrupt);
87 
88 private:
89 
92 
104 
108  geometry_msgs::Pose _nav_goal;
120  std::string _routine;
124  tf::Vector3 _last_position;
128  double _last_yaw;
173 
178  void idleTimerCallback(const ros::TimerEvent& event);
183  void unstuckTimerCallback(const ros::TimerEvent& event);
189  void goalObsoleteCallback(const std_msgs::Bool::ConstPtr& msg);
195  void reverseModeCallback(const std_msgs::Bool::ConstPtr& reverse_mode);
201  const rsm_msgs::OperationMode::ConstPtr& operation_mode);
205  void abortNavigation();
210  bool comparePose();
211 };
212 
213 }
214 
215 #endif
void onWaypointFollowingStart(bool &success, std::string &message)
void goalObsoleteCallback(const std_msgs::Bool::ConstPtr &msg)
ros::Subscriber _get_goal_obsolete_subscriber
void onExplorationStart(bool &success, std::string &message)
ros::Subscriber _operation_mode_subscriber
ros::ServiceClient _get_reverse_mode_service
ros::ServiceClient _get_navigation_goal_service
State being active when the robot should move to a previously set goal. First obtains the goal and th...
void onWaypointFollowingStop(bool &success, std::string &message)
geometry_msgs::Pose _nav_goal
void onInterrupt(int interrupt)
Called when an operation mode interrupt was received.
void unstuckTimerCallback(const ros::TimerEvent &event)
Callback for switched mode navigation to unstuck robot.
tf::Vector3 _last_position
ros::ServiceClient _get_robot_pose_service
void idleTimerCallback(const ros::TimerEvent &event)
Callback for idle timer.
void onExplorationStop(bool &success, std::string &message)
ros::ServiceClient _get_exploration_mode_service
void operationModeCallback(const rsm_msgs::OperationMode::ConstPtr &operation_mode)
ros::ServiceClient _navigation_goal_completed_service
ros::NodeHandle _nh
actionlib::SimpleActionClient< move_base_msgs::MoveBaseAction > MoveBaseClient
void reverseModeCallback(const std_msgs::Bool::ConstPtr &reverse_mode)
boost::shared_ptr< MoveBaseClient > _move_base_client
ros::Subscriber _reverse_mode_subscriber


rsm_additions
Author(s): Marco Steinbrink
autogenerated on Mon Feb 28 2022 23:28:21