diff --git a/Executor/src/skill_action.cpp b/Executor/src/skill_action.cpp index 0a22e73..5859fb3 100644 --- a/Executor/src/skill_action.cpp +++ b/Executor/src/skill_action.cpp @@ -106,12 +106,33 @@ BT::NodeStatus SkillAction::convertResultToStatus(const std::string &result_stri const auto &output = json["outputs"]; for (auto it = output.begin(); it != output.end(); it++) { + if (it.value().is_boolean()) setOutput(it.key(), it.value().get()); - else if (it.value().is_number_integer()) - setOutput(it.key(), it.value().get()); - else if (it.value().is_number_float()) - setOutput(it.key(), it.value().get()); + else if (it.value().is_number_float()) { + try { + setOutput(it.key(), it.value().get()); + continue; + } + catch (...){}; + try { + setOutput(it.key(), it.value().get()); + continue; + } + catch (...){}; + } + else if (it.value().is_number_integer()) { + try { + setOutput(it.key(), it.value().get()); + continue; + } + catch (...){}; + try { + setOutput(it.key(), it.value().get()); + continue; + } + catch (...){}; + } else if (it.value().is_string()) setOutput(it.key(), it.value().get()); else