GoalReachedConfig.cpp
Go to the documentation of this file.
1#include "GoalReachedConfig.h"
2
3#include <RobotAPI/interface/aron/Aron.h>
7
9{
10
13 {
15 params->setElementCopy("posTh", std::make_shared<aron::data::Float>(posTh));
16 params->setElementCopy("oriTh", std::make_shared<aron::data::Float>(oriTh));
17 params->setElementCopy("linearVelTh", std::make_shared<aron::data::Float>(linearVelTh));
18 params->setElementCopy("angularVelTh", std::make_shared<aron::data::Float>(angularVelTh));
19 params->setElementCopy("filterCount", std::make_shared<aron::data::Int>(filterCount));
20 return params;
21 }
22
25 {
27
28 if (dict->hasElement("posTh"))
29 {
30 cfg.posTh = *aron::data::Float::DynamicCast(dict->getElement("posTh"));
31 }
32 if (dict->hasElement("oriTh"))
33 {
34 cfg.oriTh = *aron::data::Float::DynamicCast(dict->getElement("oriTh"));
35 }
36 if (dict->hasElement("linearVelTh"))
37 {
38 cfg.linearVelTh = *aron::data::Float::DynamicCast(dict->getElement("linearVelTh"));
39 }
40 if (dict->hasElement("angularVelTh"))
41 {
42 cfg.angularVelTh = *aron::data::Float::DynamicCast(dict->getElement("angularVelTh"));
43 }
44 if (dict->hasElement("filterCount"))
45 {
46 cfg.filterCount = *aron::data::Int::DynamicCast(dict->getElement("filterCount"));
47 }
48
49 return cfg;
50 }
51
52} // namespace armarx::navigation::core
std::shared_ptr< Dict > DictPtr
Definition Dict.h:42
This file is part of ArmarX.
static GoalReachedConfig FromAron(const aron::data::DictPtr &dict)