15#include "auto_apms_simulation/util.hpp"
17namespace auto_apms_simulation
20std::string toStr(ExecutionResultMsg result)
22 std::string status_str;
23 switch (result.status) {
25 status_str =
"SUCCESS";
27 case result.PRECONDITION_FAILURE:
28 status_str =
"PRECONDITION_FAILURE";
30 case result.PLANNING_FAILURE:
31 status_str =
"PLANNING_FAILURE";
33 case result.EXECUTION_FAILURE:
34 status_str =
"EXECUTION_FAILURE";
36 case result.POSTCONDITION_FAILURE:
37 status_str =
"POSTCONDITION_FAILURE";
39 case result.INVALID_ACTION:
40 status_str =
"INVALID_ACTION";
43 status_str =
"CANCELED";
46 status_str =
"UNKOWN";
48 return result.message +
" (Result status: " + status_str +
").";