YARP
Yet Another Robot Platform
INavigation2D.cpp
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2006-2020 Istituto Italiano di Tecnologia (IIT)
3  * All rights reserved.
4  *
5  * This software may be modified and distributed under the terms of the
6  * BSD-3-Clause license. See the accompanying LICENSE file for details.
7  */
8 
10 
12 {
13  if (status == navigation_status_idle) return std::string("navigation_status_idle");
14  else if (status == navigation_status_moving) return std::string("navigation_status_moving");
15  else if (status == navigation_status_waiting_obstacle) return std::string("navigation_status_waiting_obstacle");
16  else if (status == navigation_status_goal_reached) return std::string("navigation_status_goal_reached");
17  else if (status == navigation_status_aborted) return std::string("navigation_status_aborted");
18  else if (status == navigation_status_failing) return std::string("navigation_status_failing");
19  else if (status == navigation_status_paused) return std::string("navigation_status_paused");
20  else if (status == navigation_status_preparing_before_move) return std::string("navigation_status_preparing_before_move");
21  else if (status == navigation_status_thinking) return std::string("navigation_status_thinking");
22  else if (status == navigation_status_error) return std::string("navigation_status_error");
23  return std::string("navigation_status_error");
24 }
25 
27 {
29  if (s == "navigation_status_idle") status = navigation_status_idle;
30  else if (s == "navigation_status_moving") status = navigation_status_moving;
31  else if (s == "navigation_status_waiting_obstacle") status = navigation_status_waiting_obstacle;
32  else if (s == "navigation_status_goal_reached") status = navigation_status_goal_reached;
33  else if (s == "navigation_status_aborted") status = navigation_status_aborted;
34  else if (s == "navigation_status_failing") status = navigation_status_failing;
35  else if (s == "navigation_status_paused") status = navigation_status_paused;
36  else if (s == "navigation_status_preparing_before_move") status = navigation_status_preparing_before_move;
37  else if (s == "navigation_status_thinking") status = navigation_status_thinking;
38  else if (s == "navigation_status_error") status = navigation_status_error;
39  else
40  {
41  status = navigation_status_error;
42  }
43  return status;
44 }
INavigation2D.h
yarp::dev::Nav2D::navigation_status_thinking
@ navigation_status_thinking
Definition: INavigation2D.h:41
yarp::dev::Nav2D::NavigationStatusEnum
NavigationStatusEnum
Definition: INavigation2D.h:32
yarp::dev::Nav2D::navigation_status_paused
@ navigation_status_paused
Definition: INavigation2D.h:40
yarp::dev::Nav2D::INavigation2DHelpers::stringToStatus
NavigationStatusEnum stringToStatus(std::string s)
Definition: INavigation2D.cpp:26
yarp::dev::Nav2D::navigation_status_moving
@ navigation_status_moving
Definition: INavigation2D.h:35
yarp::dev::Nav2D::navigation_status_failing
@ navigation_status_failing
Definition: INavigation2D.h:39
yarp::dev::Nav2D::navigation_status_goal_reached
@ navigation_status_goal_reached
Definition: INavigation2D.h:37
yarp::dev::Nav2D::navigation_status_idle
@ navigation_status_idle
Definition: INavigation2D.h:33
yarp::dev::Nav2D::navigation_status_aborted
@ navigation_status_aborted
Definition: INavigation2D.h:38
yarp::dev::Nav2D::navigation_status_waiting_obstacle
@ navigation_status_waiting_obstacle
Definition: INavigation2D.h:36
yarp::dev::Nav2D::INavigation2DHelpers::statusToString
std::string statusToString(NavigationStatusEnum status)
Definition: INavigation2D.cpp:11
yarp::dev::Nav2D::navigation_status_error
@ navigation_status_error
Definition: INavigation2D.h:42
yarp::dev::Nav2D::navigation_status_preparing_before_move
@ navigation_status_preparing_before_move
Definition: INavigation2D.h:34