Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update moveit::core::error_msg_to_string in Humble #2689

Merged
merged 1 commit into from
Feb 27, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 12 additions & 5 deletions moveit_core/utils/include/moveit/utils/moveit_error_code.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,7 @@ namespace core
class MoveItErrorCode : public moveit_msgs::msg::MoveItErrorCodes
{
public:
MoveItErrorCode()
{
val = 0;
}
MoveItErrorCode(int code)
MoveItErrorCode(int code = 0)
{
val = code;
}
Expand Down Expand Up @@ -104,12 +100,18 @@ inline std::string error_code_to_string(MoveItErrorCode error_code)
return std::string("START_STATE_IN_COLLISION");
case moveit::core::MoveItErrorCode::START_STATE_VIOLATES_PATH_CONSTRAINTS:
return std::string("START_STATE_VIOLATES_PATH_CONSTRAINTS");
case moveit::core::MoveItErrorCode::START_STATE_INVALID:
return std::string("START_STATE_INVALID");
case moveit::core::MoveItErrorCode::GOAL_IN_COLLISION:
return std::string("GOAL_IN_COLLISION");
case moveit::core::MoveItErrorCode::GOAL_VIOLATES_PATH_CONSTRAINTS:
return std::string("GOAL_VIOLATES_PATH_CONSTRAINTS");
case moveit::core::MoveItErrorCode::GOAL_CONSTRAINTS_VIOLATED:
return std::string("GOAL_CONSTRAINTS_VIOLATED");
case moveit::core::MoveItErrorCode::GOAL_STATE_INVALID:
return std::string("GOAL_STATE_INVALID");
case moveit::core::MoveItErrorCode::UNRECOGNIZED_GOAL_TYPE:
return std::string("UNRECOGNIZED_GOAL_TYPE");
case moveit::core::MoveItErrorCode::INVALID_GROUP_NAME:
return std::string("INVALID_GROUP_NAME");
case moveit::core::MoveItErrorCode::INVALID_GOAL_CONSTRAINTS:
Expand All @@ -130,9 +132,14 @@ inline std::string error_code_to_string(MoveItErrorCode error_code)
return std::string("SENSOR_INFO_STALE");
case moveit::core::MoveItErrorCode::COMMUNICATION_FAILURE:
return std::string("COMMUNICATION_FAILURE");
case moveit::core::MoveItErrorCode::CRASH:
return std::string("CRASH");
case moveit::core::MoveItErrorCode::ABORT:
return std::string("ABORT");
case moveit::core::MoveItErrorCode::NO_IK_SOLUTION:
return std::string("NO_IK_SOLUTION");
}
return std::string("Unrecognized MoveItErrorCode. This should never happen!");
}

} // namespace core
Expand Down
Loading