diff --git a/source/RobotAPI/libraries/skills/manager/SkillManagerComponentPlugin.cpp b/source/RobotAPI/libraries/skills/manager/SkillManagerComponentPlugin.cpp index eb6222ba83f4daeb6331519495a98939db057bb5..bd5dc3ee9572618b30f9809477dc454d6a8cb072 100644 --- a/source/RobotAPI/libraries/skills/manager/SkillManagerComponentPlugin.cpp +++ b/source/RobotAPI/libraries/skills/manager/SkillManagerComponentPlugin.cpp @@ -979,6 +979,14 @@ namespace armarx::plugins s.parameters[failed.id] = failed; s.parameters[aborted.id] = aborted; + const auto& parameters = std::make_shared<aron::type::Object>(); + typesLock.lock(); + if (fluxioDC.types.find(s.id) == fluxioDC.types.end()) + { + fluxioDC.types[s.id] = parameters; + } + typesLock.unlock(); + if (skillDescription.parametersType != nullptr) { // input parameters @@ -1572,8 +1580,13 @@ namespace armarx::plugins std::shared_lock l(fluxioDC.typesMutex); for (const auto& [skillId, skillTypes] : fluxioDC.types) { + if (skillTypes == nullptr) { + ARMARX_WARNING << "SkillTypes with id '" << skillId << "' not found."; + continue; + } ret->addMemberType(skillId, skillTypes); } + l.unlock(); ret->setObjectName("SkillTypes"); return ret; } diff --git a/source/RobotAPI/libraries/skills/manager/SkillManagerComponentPluginUser.cpp b/source/RobotAPI/libraries/skills/manager/SkillManagerComponentPluginUser.cpp index cee17b6dec56798b087f7dc6b8878d0d4370aea9..d8bbbc3c32b64a999e6c17c0843c33f22f17948c 100644 --- a/source/RobotAPI/libraries/skills/manager/SkillManagerComponentPluginUser.cpp +++ b/source/RobotAPI/libraries/skills/manager/SkillManagerComponentPluginUser.cpp @@ -181,7 +181,7 @@ namespace armarx aron::type::dto::AronObjectPtr SkillManagerComponentPluginUser::getTypes(const Ice::Current& current) { - const auto res = this->plugin->getTypes(); + const auto& res = this->plugin->getTypes(); return res->toAronObjectDTO(); }