moveit_error_code.cpp
Go to the documentation of this file.
1 /*********************************************************************
2  * Software License Agreement (BSD License)
3  *
4  * Copyright (c) 2022, Bielefeld University
5  * All rights reserved.
6  *
7  * Redistribution and use in source and binary forms, with or without
8  * modification, are permitted provided that the following conditions
9  * are met:
10  *
11  * * Redistributions of source code must retain the above copyright
12  * notice, this list of conditions and the following disclaimer.
13  * * Redistributions in binary form must reproduce the above
14  * copyright notice, this list of conditions and the following
15  * disclaimer in the documentation and/or other materials provided
16  * with the distribution.
17  * * Neither the name of the copyright holder nor the names of its
18  * contributors may be used to endorse or promote products derived
19  * from this software without specific prior written permission.
20  *
21  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
22  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
23  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
24  * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
25  * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
26  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
27  * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
28  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
29  * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
30  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
31  * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
32  * POSSIBILITY OF SUCH DAMAGE.
33  *********************************************************************/
34 
36 
37 namespace moveit
38 {
39 namespace core
40 {
41 const char* MoveItErrorCode::toString(const moveit_msgs::MoveItErrorCodes& error_code)
42 {
43  switch (error_code.val)
44  {
45  case 0:
46  return "NOT INITIALIZED";
47  case moveit_msgs::MoveItErrorCodes::SUCCESS:
48  return "SUCCESS";
49  case moveit_msgs::MoveItErrorCodes::FAILURE:
50  return "FAILURE";
51  case moveit_msgs::MoveItErrorCodes::PLANNING_FAILED:
52  return "PLANNING_FAILED";
53  case moveit_msgs::MoveItErrorCodes::INVALID_MOTION_PLAN:
54  return "INVALID_MOTION_PLAN";
55  case moveit_msgs::MoveItErrorCodes::MOTION_PLAN_INVALIDATED_BY_ENVIRONMENT_CHANGE:
56  return "MOTION_PLAN_INVALIDATED_BY_ENVIRONMENT_CHANGE";
57  case moveit_msgs::MoveItErrorCodes::CONTROL_FAILED:
58  return "CONTROL_FAILED";
59  case moveit_msgs::MoveItErrorCodes::UNABLE_TO_AQUIRE_SENSOR_DATA:
60  return "UNABLE_TO_AQUIRE_SENSOR_DATA";
62  return "TIMED_OUT";
63  case moveit_msgs::MoveItErrorCodes::PREEMPTED:
64  return "PREEMPTED";
65  case moveit_msgs::MoveItErrorCodes::START_STATE_IN_COLLISION:
66  return "START_STATE_IN_COLLISION";
67  case moveit_msgs::MoveItErrorCodes::START_STATE_VIOLATES_PATH_CONSTRAINTS:
68  return "START_STATE_VIOLATES_PATH_CONSTRAINTS";
69  case moveit_msgs::MoveItErrorCodes::GOAL_IN_COLLISION:
70  return "GOAL_IN_COLLISION";
71  case moveit_msgs::MoveItErrorCodes::GOAL_VIOLATES_PATH_CONSTRAINTS:
72  return "GOAL_VIOLATES_PATH_CONSTRAINTS";
73  case moveit_msgs::MoveItErrorCodes::GOAL_CONSTRAINTS_VIOLATED:
74  return "GOAL_CONSTRAINTS_VIOLATED";
75  case moveit_msgs::MoveItErrorCodes::INVALID_GROUP_NAME:
76  return "INVALID_GROUP_NAME";
77  case moveit_msgs::MoveItErrorCodes::INVALID_GOAL_CONSTRAINTS:
78  return "INVALID_GOAL_CONSTRAINTS";
79  case moveit_msgs::MoveItErrorCodes::INVALID_ROBOT_STATE:
80  return "INVALID_ROBOT_STATE";
81  case moveit_msgs::MoveItErrorCodes::INVALID_LINK_NAME:
82  return "INVALID_LINK_NAME";
83  case moveit_msgs::MoveItErrorCodes::INVALID_OBJECT_NAME:
84  return "INVALID_OBJECT_NAME";
85  case moveit_msgs::MoveItErrorCodes::FRAME_TRANSFORM_FAILURE:
86  return "FRAME_TRANSFORM_FAILURE";
87  case moveit_msgs::MoveItErrorCodes::COLLISION_CHECKING_UNAVAILABLE:
88  return "COLLISION_CHECKING_UNAVAILABLE";
89  case moveit_msgs::MoveItErrorCodes::ROBOT_STATE_STALE:
90  return "ROBOT_STATE_STALE";
91  case moveit_msgs::MoveItErrorCodes::SENSOR_INFO_STALE:
92  return "SENSOR_INFO_STALE";
93  case moveit_msgs::MoveItErrorCodes::COMMUNICATION_FAILURE:
94  return "COMMUNICATION_FAILURE";
96  return "NO_IK_SOLUTION";
97  default:
98  return "UNKNOWN";
99  }
100 }
101 
102 std::ostream& operator<<(std::ostream& out, const MoveItErrorCode& e)
103 {
104  return out << MoveItErrorCode::toString(e);
105 }
106 
107 } // namespace core
108 } // namespace moveit
pr2_arm_kinematics::TIMED_OUT
static const int TIMED_OUT
Definition: pr2_arm_kinematics_plugin.h:96
moveit::core::operator<<
std::ostream & operator<<(std::ostream &out, const VariableBounds &b)
Operator overload for printing variable bounds to a stream.
Definition: joint_model.cpp:309
moveit::core::MoveItErrorCode::toString
static const char * toString(const moveit_msgs::MoveItErrorCodes &error_code)
Definition: moveit_error_code.cpp:105
moveit_error_code.h
pr2_arm_kinematics::NO_IK_SOLUTION
static const int NO_IK_SOLUTION
Definition: pr2_arm_kinematics_plugin.h:95
moveit
Main namespace for MoveIt.
Definition: background_processing.h:46


moveit_core
Author(s): Ioan Sucan , Sachin Chitta , Acorn Pooley
autogenerated on Thu Nov 21 2024 03:23:41