15 nh.
serviceClient<rsm_msgs::GetNavigationGoal>(
"getNavigationGoal");
17 rsm_msgs::GoalCompleted>(
"navigationGoalCompleted");
25 "getExplorationMode");
40 rsm_msgs::GetNavigationGoal srv;
47 _name =
"E: Navigation";
50 _name =
"W: Navigation";
53 _name =
"G: Navigation";
60 ROS_ERROR(
"Failed to call Get Navigation Goal service");
64 std_srvs::Trigger srv2;
74 ROS_ERROR(
"Failed to call Get Reverse Mode service");
79 std_srvs::Trigger srv2;
88 ROS_ERROR(
"Failed to call Get Exploration Mode service");
113 rsm_msgs::GoalStatus::REACHED;
133 rsm_msgs::GoalStatus::FAILED;
143 boost::make_shared<WaypointFollowingState>());
159 move_base_msgs::MoveBaseGoal goal;
160 goal.target_pose.header.frame_id =
"map";
174 rsm_msgs::GoalCompleted srv;
177 ROS_ERROR(
"Failed to call Complete Navigation Goal service");
186 message =
"Exploration running";
190 message =
"Waypoint following running";
194 message =
"Simple Goal running";
198 message =
"Nothing running";
207 message =
"Exploration stopped";
212 message =
"Waypoint following running";
216 message =
"Simple Goal running";
220 message =
"Nothing running";
226 std::string &message) {
230 message =
"Exploration running";
233 message =
"Waypoint following running";
236 message =
"Simple Goal running";
239 message =
"Nothing running";
245 std::string &message) {
249 message =
"Exploration running";
253 message =
"Waypoint following stopped";
258 message =
"Simple Goal running";
262 message =
"Nothing running";
272 boost::make_shared<EmergencyStopState>());
277 boost::make_shared<TeleoperationState>());
288 boost::make_shared<IdleState>());
295 ROS_ERROR(
"Navigation aborted because robot appears to be stuck");
303 rsm_msgs::GetRobotPose srv;
322 ROS_ERROR(
"Failed to call Get Robot Pose service");
331 const std_msgs::Bool::ConstPtr& msg) {
341 const std_msgs::Bool::ConstPtr& reverse_mode) {
358 const rsm_msgs::OperationMode::ConstPtr& operation_mode) {
366 boost::make_shared<IdleState>());
void onWaypointFollowingStart(bool &success, std::string &message)
ServiceClient serviceClient(const std::string &service_name, bool persistent=false, const M_string &header_values=M_string())
static void poseMsgToTF(const geometry_msgs::Pose &msg, Pose &bt)
void goalObsoleteCallback(const std_msgs::Bool::ConstPtr &msg)
ros::Subscriber _get_goal_obsolete_subscriber
void onExplorationStart(bool &success, std::string &message)
int _navigation_completed_status
boost::shared_ptr< rsm::BaseState > getPluginState(int plugin_type, std::string routine="")
ros::ServiceClient _get_reverse_mode_service
Subscriber subscribe(const std::string &topic, uint32_t queue_size, void(T::*fp)(M), T *obj, const TransportHints &transport_hints=TransportHints())
ros::ServiceClient _get_navigation_goal_service
#define SIMPLE_GOAL_STOP_INTERRUPT
State being active when the robot should move to a previously set goal. First obtains the goal and th...
bool call(MReq &req, MRes &res)
void onWaypointFollowingStop(bool &success, std::string &message)
geometry_msgs::Pose _nav_goal
void transitionToVolatileState(boost::shared_ptr< rsm::BaseState > next_state)
#define WAYPOINT_FOLLOWING
#define TELEOPERATION_INTERRUPT
TFSIMD_FORCE_INLINE const tfScalar & x() const
void onInterrupt(int interrupt)
Called when an operation mode interrupt was received.
TFSIMD_FORCE_INLINE const tfScalar & z() const
ros::ServiceClient _get_robot_pose_service
#define CALCULATEGOAL_STATE
TFSIMD_FORCE_INLINE const tfScalar & y() const
Timer createTimer(Rate r, Handler h, Obj o, bool oneshot=false, bool autostart=true) const
StateInterface * _stateinterface
#define EMERGENCY_STOP_INTERRUPT
void onExplorationStop(bool &success, std::string &message)
void timerCallback(const ros::TimerEvent &event)
Callback for idle timer.
ros::ServiceClient _get_exploration_mode_service
void operationModeCallback(const rsm_msgs::OperationMode::ConstPtr &operation_mode)
ros::ServiceClient _navigation_goal_completed_service
actionlib::SimpleActionClient< move_base_msgs::MoveBaseAction > MoveBaseClient
void reverseModeCallback(const std_msgs::Bool::ConstPtr &reverse_mode)
#define SIMPLE_GOAL_INTERRUPT
#define PLUGINLIB_EXPORT_CLASS(class_type, base_class_type)
boost::shared_ptr< MoveBaseClient > _move_base_client
ros::Subscriber _reverse_mode_subscriber