40 Action(
name,
Action::
Type::Primitive), maxStoredActionStates(maxStoredActionStates), primitiveType(primitiveType) {};
43 std::string name,
unsigned int nFingersInvolved,
unsigned int maxStoredActionStates,
45 Action(
name,
Action::
Type::Primitive), nFingersInvolved(nFingersInvolved), maxStoredActionStates(maxStoredActionStates),
46 primitiveType(primitiveType) {}
54 return maxStoredActionStates;
58 return nFingersInvolved;
62 this->jointsInvolvedCount = jointsInvolvedCount;
70 out << YAML::Key << YAML::Flow << fingersInvolved;
72 unsigned int nCont = 1;
73 out << YAML::Value << YAML::BeginMap;
74 out << YAML::Key <<
"PrimitiveType" << YAML::Value << primitiveType;
75 out << YAML::Key <<
"ActionName" << YAML::Value <<
name;
76 out << YAML::Key <<
"JointsInvolvedCount" << YAML::Value << YAML::BeginMap;
77 for (
const auto &jointCount : jointsInvolvedCount ) {
78 out << YAML::Key << jointCount.first;
79 out << YAML::Value << jointCount.second;
84 for (
const auto & jointPos : getAllJointPos()) {
86 std::string contSeq =
"ActionState_" + std::to_string(nCont);
87 out << YAML::Key << contSeq;
89 out << YAML::Value << YAML::BeginMap;
91 out << YAML::Key <<
"JointPos" << YAML::Value << YAML::BeginMap;
92 for (
const auto &joint : jointPos) {
93 out << YAML::Key << joint.first;
94 out << YAML::Value << YAML::Flow << joint.second;