10 #include <move_base_msgs/MoveBaseAction.h> 11 #include <yocs_msgs/NavigateToAction.h> 12 #include <yocs_msgs/WaypointList.h> 13 #include <geometry_msgs/PoseStamped.h> 14 #include <std_srvs/Empty.h> 19 #ifndef _YOCS_SEMANTIC_NAVIGATOR_HPP_ 20 #define _YOCS_SEMANTIC_NAVIGATOR_HPP_ 31 void loginfo(
const std::string& msg);
32 void logwarn(
const std::string& msg);
42 bool getGoalLocation(
const std::string location, yocs_msgs::Waypoint& waypoint);
44 void goOn(
const yocs_msgs::Waypoint waypoint,
const double in_distance,
const int num_retry,
const double timeout);
47 void nextState(
bool& retry,
bool& final_result,std::string& message,
const int navi_result,
const ros::Time started_time);
48 void goNear(
const yocs_msgs::Waypoint waypoint,
const double in_distance,
const int num_retry,
const double timeout);
50 void processMoveBaseFeedback(
const move_base_msgs::MoveBaseFeedback::ConstPtr& feedback,
const geometry_msgs::PoseStamped& target);
void processNavigation(yocs_msgs::NavigateToGoal::ConstPtr goal)
void nextState(bool &retry, bool &final_result, std::string &message, const int navi_result, const ros::Time started_time)
yocs_msgs::WaypointList waypointlist_
static const int NAVI_RETRY
BasicMoveController basic_move_
void processMoveBaseFeedback(const move_base_msgs::MoveBaseFeedback::ConstPtr &feedback, const geometry_msgs::PoseStamped &target)
bool getGoalLocation(const std::string location, yocs_msgs::Waypoint &waypoint)
static const int NAVI_SUCCESS
bool navigation_in_progress_
std::string global_frame_
TFSIMD_FORCE_INLINE tfScalar distance(const Vector3 &v) const
bool cancelMoveBaseGoal()
static const int NAVI_FAILED
std::string sub_waypointlist_topic_
actionlib::SimpleActionClient< move_base_msgs::MoveBaseAction > ac_move_base_
void processWaypointList(const yocs_msgs::WaypointList::ConstPtr &msg)
actionlib::SimpleActionServer< yocs_msgs::NavigateToAction > as_navi_
virtual ~SemanticNavigator()
static const int NAVI_TIMEOUT
void goOn(const yocs_msgs::Waypoint waypoint, const double in_distance, const int num_retry, const double timeout)
void feedbackNavigation(const int status, const double distance, const double remain_time, const std::string message)
void loginfo(const std::string &msg)
void waitForMoveBase(int &move_base_result, const ros::Time &start_time, const double timeout)
boost::thread order_process_thread_
static const int NAVI_IN_PROGRESS
SemanticNavigator(ros::NodeHandle &n)
ros::Subscriber sub_waypointlist_
void determineNavigationState(int &navi_result, const int move_base_result, const actionlib::SimpleClientGoalState move_base_state)
void goNear(const yocs_msgs::Waypoint waypoint, const double in_distance, const int num_retry, const double timeout)
void logwarn(const std::string &msg)
void processPreemptNavigateTo()
static const int NAVI_UNKNOWN
void processNavigateToGoal()
void terminateNavigation(bool success, const std::string message)