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.
std::vector< ROSEE::JointPos > getAllJointPos() const override
Override function from father Action.
std::map< std::string, unsigned int > JointsInvolvedCount
The map to describe, how many times a joint is set by the action.
std::pair< double, double > getActionMargins(std::string actionName) const
get for time margins
The pure virtual class representing an Action.
ROSEE::JointPos jointPosFinal
Here is contained the wanted final position of the timed action.
void emitYaml(YAML::Emitter &out) const override
Emit info in a file with yaml format.
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.
ROSEE::JointPos getJointPosAction(std::string actionName) const
get for joint positions
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.
std::shared_ptr< ActionTimed > Ptr
std::shared_ptr< Action > Ptr
std::vector< std::string > actionsNamesOrdered
This vector is used to take count of the order of the actions inserted.
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
ROSEE::JointsInvolvedCount getJointCountAction(std::string actionName) const
get for JointsInvolvedCount of the inner actions
JointPos getJointPos() const override
Override this function is necessary because it is pure virtual in father class Action.
std::vector< std::pair< double, double > > getAllActionMargins() const
get all the time margins of all inner action