40 Action(name,
Action::
Type::Primitive), maxStoredActionStates(maxStoredActionStates), primitiveType(primitiveType) {};
46 primitiveType(primitiveType) {}
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;
78 out << YAML::Key << jointCount.first;
79 out << YAML::Value << jointCount.second;
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;
unsigned int nFingersInvolved
unsigned int getMaxStoredActionStates() const
std::map< std::string, unsigned int > JointsInvolvedCount
The map to describe, how many times a joint is set by the action.
void setJointsInvolvedCount(ROSEE::JointsInvolvedCount jointsInvolvedCount)
The pure virtual class representing an Action.
ActionPrimitive(std::string name, unsigned int maxStoredActionStates, Type type)
Type
Enum useful to discriminate each primitive action when, for example, we want to parse a file if you ...
JointsInvolvedCount jointsInvolvedCount
const unsigned int maxStoredActionStates
virtual void emitYaml(YAML::Emitter &) const override
Function to fill the argument passed with info about the action.
unsigned int getnFingersInvolved() const
virtual std::vector< ROSEE::JointPos > getAllJointPos() const =0
Return all the joint position stored.
std::set< std::string > fingersInvolved
Type getPrimitiveType() const