Skip to content
Snippets Groups Projects

Skill-Gui Stability and QOL

Merged Peter Albrecht requested to merge feature/skill-gui-stability into master
3 unresolved threads
Files
8
@@ -243,30 +243,30 @@ namespace armarx::skills::gui
emit updateAvailable(filterUpdate(snapshot));
}
std::vector<Parameters> SkillManagerWrapper::getParameterHistoryForSkill(const skills::SkillID& sid) const
std::vector<Parameters> SkillManagerWrapper::getParameterHistoryForSkill(const skills::SkillID& sid)
{
if (not this->skillParameterHistory.contains(sid))
if (not this->skillParameterExecutionHistory.contains(sid))
{
return {};
}
return this->skillParameterHistory[sid];
return this->skillParameterExecutionHistory[sid];
}
void SkillManagerWrapper::addParametersToHistory(const skills::SkillID& sid, const Parameters& params)
{
if (not this->skillParameterHistory.contains(sid))
if (not this->skillParameterExecutionHistory.contains(sid))
{
// no history exists for this skill. Assign new
this->skillParameterHistory.insert({sid, {params}});
this->skillParameterExecutionHistory.insert({sid, {params}});
}
else
{
// history already exists. Append to list
this->skillParameterHistory[sid].emplace_back(params);
this->skillParameterExecutionHistory[sid].emplace_back(params);
}
}
std::optional<Parameters> SkillManagerWrapper::getLatestParametersForSkill(const skills::SkillID& sid) const
std::optional<Parameters> SkillManagerWrapper::getLatestParametersForSkill(const skills::SkillID& sid)
{
auto parameterList = getParameterHistoryForSkill(sid);
if (parameterList.empty())
@@ -426,10 +426,8 @@ namespace armarx::skills::gui
ARMARX_CHECK(skillId.isFullySpecified()); // sanity check
this->addParametersToHistory(skillId, params);
ARMARX_INFO << "Saved skill parameters to history...";
ARMARX_IMPORTANT << "Executing skill from GUI: " << skillId << ".";
try
{
std::scoped_lock l(mutex_memory);
Loading