CalculateGoalState.h
Go to the documentation of this file.
1 #ifndef CALCULATEGOALSTATE_H
2 #define CALCULATEGOALSTATE_H
3 
5 #include <rsm_core/BaseState.h>
6 #include <rsm_core/IdleState.h>
10 #include <geometry_msgs/PoseArray.h>
11 #include <rsm_msgs/SetNavigationGoal.h>
12 #include <rsm_msgs/GetRobotPose.h>
13 #include <tf/transform_listener.h>
14 
15 namespace rsm {
16 
23 
24 public:
25 
30 
35 
39  void onSetup();
40 
44  void onEntry();
45 
49  void onActive();
50 
54  void onExit();
55 
59  void onExplorationStart(bool &success, std::string &message);
60 
64  void onExplorationStop(bool &success, std::string &message);
65 
69  void onWaypointFollowingStart(bool &success, std::string &message);
70 
74  void onWaypointFollowingStop(bool &success, std::string &message);
75 
80  void onInterrupt(int interrupt);
81 
82 private:
83 
90 
94  geometry_msgs::PoseArray _failed_goals;
98  geometry_msgs::Pose _goal;
102  geometry_msgs::PoseArray _frontier_points;
111 
116  void timerCallback(const ros::TimerEvent& event);
120  void abortCalculateGoal();
121 
126  void frontiersCallback(const geometry_msgs::PoseArray::ConstPtr& frontiers);
127 
132  void failedGoalsCallback(
133  const geometry_msgs::PoseArray::ConstPtr& failed_goals);
134 
140  bool differentFromFailedGoals(geometry_msgs::Point point);
141 };
142 
143 }
144 
145 #endif
void onExplorationStart(bool &success, std::string &message)
ros::Subscriber _failed_goals_sub
void onInterrupt(int interrupt)
Called when an operation mode interrupt was received.
void onExplorationStop(bool &success, std::string &message)
Called when exploration was stopped manually.
geometry_msgs::PoseArray _failed_goals
bool differentFromFailedGoals(geometry_msgs::Point point)
Checks if a point is different from a previously failed goals including a small tolerance.
void onExit()
Called once when left.
void onEntry()
Called once when activated.
ros::ServiceClient _get_robot_pose_service
ros::Subscriber _frontiers_sub
CalculateGoalState()
Constructor.
geometry_msgs::Pose _goal
void onSetup()
Called once when registered at StateInterface.
ros::ServiceClient _set_navigation_goal_service
void timerCallback(const ros::TimerEvent &event)
Callback for when no goal was chosen in time and calculation likely failed.
geometry_msgs::PoseArray _frontier_points
void onActive()
Process method (step-wise, never block this method)
void onWaypointFollowingStart(bool &success, std::string &message)
void onWaypointFollowingStop(bool &success, std::string &message)
State for choosing a goal from all provided frontiers and calling Navigation when successful...
void frontiersCallback(const geometry_msgs::PoseArray::ConstPtr &frontiers)
Called when new frontiers are received.
void failedGoalsCallback(const geometry_msgs::PoseArray::ConstPtr &failed_goals)
Called when new failed goals are received.


rsm_additions
Author(s): Marco Steinbrink
autogenerated on Tue Mar 16 2021 02:44:35