diff --git a/source/RobotAPI/libraries/skills/provider/SimpleSpecializedSkill.h b/source/RobotAPI/libraries/skills/provider/SimpleSpecializedSkill.h index babdb018957937a204f4c06b437244f6a8b553ff..c134754888f6749a834ffdd1e256b0aed9660562 100644 --- a/source/RobotAPI/libraries/skills/provider/SimpleSpecializedSkill.h +++ b/source/RobotAPI/libraries/skills/provider/SimpleSpecializedSkill.h @@ -63,7 +63,7 @@ namespace armarx { SpecializedInitInput i; i.executorName = this->executorName; - i.parameters = this->parameters; + i.parameters = this->getParameters(); return this->init(i); } @@ -73,7 +73,7 @@ namespace armarx SpecializedMainInput i; i.executorName = this->executorName; i.callback = this->callback; - i.parameters = this->parameters; + i.parameters = this->getParameters(); return this->main(i); } @@ -82,7 +82,7 @@ namespace armarx { SpecializedExitInput i; i.executorName = this->executorName; - i.parameters = this->parameters; + i.parameters = this->getParameters(); return this->exit(i); } }; diff --git a/source/RobotAPI/libraries/skills/provider/SpecializedSkill.h b/source/RobotAPI/libraries/skills/provider/SpecializedSkill.h index d551bd88df7a19144dac07930233dc5293ffc089..2fded9a0a50ede4cdc3e8d76861217fbc1127c58 100644 --- a/source/RobotAPI/libraries/skills/provider/SpecializedSkill.h +++ b/source/RobotAPI/libraries/skills/provider/SpecializedSkill.h @@ -23,17 +23,16 @@ namespace armarx void setParameters(const AronT& d) { - std::scoped_lock l(this->parametersMutex); - this->parameters = d; - Base::setParameters(d.toAron()); } + /// Overwrite getter for parameters. Shadow Skill::getParameters() AronT getParameters() const { - std::scoped_lock l(this->parametersMutex); - return this->parameters; + AronT d; + d.fromAron(this->parameters); + return d; } /// returns the accepted type of the skill @@ -45,8 +44,6 @@ namespace armarx protected: - mutable std::mutex parametersMutex; - AronT parameters; }; } // namespace skills } // namespace armarx