32 return *( fingersInvolved.begin() );
40 return fingersInvolved;
44 this->jointPos = jointPos;
49 std::vector < JointPos > retVect {jointPos};
55 fingersInvolved.clear();
56 fingersInvolved.insert(fingName);
62 std::vector <std::string> fingInvolvedVect = yamlIt->first.as <std::vector < std::string >> ();
63 for (
const auto &it : fingInvolvedVect) {
64 fingersInvolved.insert(it);
67 for ( YAML::const_iterator element = yamlIt->second.begin(); element != yamlIt->second.end(); ++element) {
69 std::string key = element->first.as<std::string>();
70 if ( key.compare (
"ActionName") == 0 ){
71 name = element->second.as < std::string > ();
73 }
else if (key.compare(
"JointsInvolvedCount") == 0) {
76 }
else if (key.compare (
"PrimitiveType") == 0) {
78 element->second.as <
unsigned int>() );
79 if (parsedType != primitiveType ) {
80 std::cerr <<
"[ERROR ActionTrig::" << __func__ <<
" parsed a type " << parsedType <<
81 " but this object has primitive type " << primitiveType << std::endl;
85 }
else if (key.compare(0, 12,
"ActionState_") == 0) {
86 for(YAML::const_iterator asEl = element->second.begin(); asEl != element->second.end(); ++asEl) {
89 if (asEl->first.as<std::string>().compare (
"JointPos") == 0 ) {
90 jointPos = asEl->second.as <
JointPos >() ;
94 std::cerr <<
"[ERROR ActionTrig::" << __func__ <<
" not know key "
95 << asEl->first.as<std::string>() <<
96 " found in the yaml file at this level" << std::endl;
102 std::cerr <<
"[ERROR ActionTrig::" << __func__ <<
"not know key " << key <<
103 " found in the yaml file" << std::endl;