17 #ifndef ROSEE_ACTIONTIMED_H 18 #define ROSEE_ACTIONTIMED_H 25 #include <yaml-cpp/yaml.h> 42 typedef std::shared_ptr<ActionTimed>
Ptr;
43 typedef std::shared_ptr<const ActionTimed>
ConstPtr;
100 std::pair <double, double>
getActionMargins ( std::string actionName )
const ;
119 void print ()
const override;
125 void emitYaml ( YAML::Emitter& out)
const override;
132 bool fillFromYaml( YAML::const_iterator yamlIt )
override;
151 unsigned int jointPosIndex = 0,
double percentJointPos = 1, std::string newActionName =
"");
173 #endif // ROSEE_ACTIONTIMED_H ActionTimed()
Default constructor, used when parsing action from yaml file.
bool insertAction(ROSEE::Action::Ptr action, double marginBefore=0.0, double marginAfter=0.0, unsigned int jointPosIndex=0, double percentJointPos=1, std::string newActionName="")
Insert an action as last one in the time line.
std::map< std::string, std::vector< double > > JointPos
The map to describe the position of all actuated joints. The key is the name of the string...
std::vector< ROSEE::JointPos > getAllJointPos() const override
Override function from father Action. For this class, it returns the jointPos of all the inner action...
std::map< std::string, unsigned int > JointsInvolvedCount
The map to describe, how many times a joint is set by the action. An ActionPrimitive and an ActionCom...
The pure virtual class representing an Action. It has members that are in common to all derived class...
ROSEE::JointsInvolvedCount getJointCountAction(std::string actionName) const
get for JointsInvolvedCount of the inner actions
ROSEE::JointPos jointPosFinal
void emitYaml(YAML::Emitter &out) const override
Emit info in a file with yaml format.
std::vector< std::pair< double, double > > getAllActionMargins() const
get all the time margins of all inner action
std::map< std::string, ROSEE::JointPos > actionsJointPosMap
bool fillFromYaml(YAML::const_iterator yamlIt) override
Fill the internal data with infos taken from yaml file.
std::map< std::string, std::pair< double, double > > actionsTimeMarginsMap
~ActionTimed()
Destructor.
std::pair< double, double > getActionMargins(std::string actionName) const
get for time margins
std::shared_ptr< ActionTimed > Ptr
std::shared_ptr< Action > Ptr
std::vector< std::string > actionsNamesOrdered
An action composed by other ones that must be executed one after other with some wait time (also 0) i...
std::shared_ptr< const ActionTimed > ConstPtr
void print() const override
Print info about this action.
std::map< std::string, ROSEE::JointsInvolvedCount > actionsJointCountMap
std::vector< std::string > getInnerActionsNames() const
getter for action that composed this one
std::vector< ROSEE::JointsInvolvedCount > getAllJointCountAction() const
Get the JointsInvolvedCount maps of all the inner actions, in order.
ROSEE::JointPos getJointPosAction(std::string actionName) const
get for joint positions
JointPos getJointPos() const override
Override this function is necessary because it is pure virtual in father class Action.