RobotNavigator.h
Go to the documentation of this file.
1 #include <ros/ros.h>
2 #include <nav_msgs/GetMap.h>
3 #include <std_srvs/Trigger.h>
7 #include <nav2d_navigator/MoveToPosition2DAction.h>
8 #include <nav2d_navigator/ExploreAction.h>
9 #include <nav2d_navigator/GetFirstMapAction.h>
10 #include <nav2d_navigator/LocalizeAction.h>
11 
16 
17 #include <queue>
18 
24 
26 {
27 public:
30 
31  bool receiveStop(std_srvs::Trigger::Request &req, std_srvs::Trigger::Response &res);
32  bool receivePause(std_srvs::Trigger::Request &req, std_srvs::Trigger::Response &res);
33  void receiveMoveGoal(const nav2d_navigator::MoveToPosition2DGoal::ConstPtr &goal);
34  void receiveExploreGoal(const nav2d_navigator::ExploreGoal::ConstPtr &goal);
35  void receiveGetMapGoal(const nav2d_navigator::GetFirstMapGoal::ConstPtr &goal);
36  void receiveLocalizeGoal(const nav2d_navigator::LocalizeGoal::ConstPtr &goal);
37 
38 private:
39  bool isLocalized();
40  bool setCurrentPosition();
41  bool getMap();
42  void stop();
43  bool correctGoalPose();
44  bool generateCommand();
45  bool preparePlan();
46  bool createPlan();
47  void publishPlan();
48 
49  // Everything related to ROS
58 
59  std::string mMapFrame;
60  std::string mRobotFrame;
61  std::string mMoveActionTopic;
62  std::string mExploreActionTopic;
63  std::string mGetMapActionTopic;
64  std::string mLocalizeActionTopic;
65 
70 
72 
73  // Current status and goals
74  bool mHasNewMap;
75  bool mIsPaused;
76  bool mIsStopped;
77  int mStatus;
78  int mRobotID;
79  unsigned int mGoalPoint;
80  unsigned int mStartPoint;
84 
85  // Everything related to the global map and plan
87  std::string mExplorationStrategy;
90  double* mCurrentPlan;
91 
93  double mRobotRadius;
94  unsigned int mCellInflationRadius;
95  unsigned int mCellRobotRadius;
96 
97  signed char mCostObstacle;
98  signed char mCostLethal;
99 
106 };
MapInflationTool mInflationTool
std::string mMapFrame
bool receiveStop(std_srvs::Trigger::Request &req, std_srvs::Trigger::Response &res)
double mCurrentPositionY
double mNavigationGoalDistance
unsigned int mCellInflationRadius
void receiveExploreGoal(const nav2d_navigator::ExploreGoal::ConstPtr &goal)
signed char mCostLethal
GridMap mCurrentMap
ros::ServiceServer mPauseServer
Definition: GridMap.h:7
std::string mExplorationStrategy
PlanLoader * mPlanLoader
ros::ServiceClient mGetMapClient
ros::Publisher mMarkerPublisher
signed char mCostObstacle
MoveActionServer * mMoveActionServer
unsigned int mGoalPoint
double mNavigationGoalAngle
LocalizeActionServer * mLocalizeActionServer
double mMaxReplanningPeriod
pluginlib::ClassLoader< ExplorationPlanner > PlanLoader
tf::TransformListener mTfListener
double mMinReplanningPeriod
double mInflationRadius
ros::ServiceServer mStopServer
actionlib::SimpleActionServer< nav2d_navigator::ExploreAction > ExploreActionServer
void receiveGetMapGoal(const nav2d_navigator::GetFirstMapGoal::ConstPtr &goal)
std::string mMoveActionTopic
double mCurrentDirection
ExploreActionServer * mExploreActionServer
double mNavigationHomingDistance
void receiveLocalizeGoal(const nav2d_navigator::LocalizeGoal::ConstPtr &goal)
ros::Publisher mCommandPublisher
std::string mExploreActionTopic
void receiveMoveGoal(const nav2d_navigator::MoveToPosition2DGoal::ConstPtr &goal)
std::string mRobotFrame
unsigned int mStartPoint
double mCurrentPositionX
actionlib::SimpleActionServer< nav2d_navigator::GetFirstMapAction > GetMapActionServer
std::string mLocalizeActionTopic
boost::shared_ptr< ExplorationPlanner > mExplorationPlanner
std::string mGetMapActionTopic
bool receivePause(std_srvs::Trigger::Request &req, std_srvs::Trigger::Response &res)
actionlib::SimpleActionServer< nav2d_navigator::LocalizeAction > LocalizeActionServer
ros::Subscriber mGoalSubscriber
double * mCurrentPlan
ros::Publisher mPlanPublisher
double mExplorationGoalDistance
actionlib::SimpleActionServer< nav2d_navigator::MoveToPosition2DAction > MoveActionServer
GetMapActionServer * mGetMapActionServer
unsigned int mCellRobotRadius


nav2d_navigator
Author(s): Sebastian Kasperski
autogenerated on Tue Nov 7 2017 06:02:48