19 #ifndef __ROSEE_ACTIONCOMPOSED_H 20 #define __ROSEE_ACTIONCOMPOSED_H 26 #include <yaml-cpp/yaml.h> 48 typedef std::shared_ptr<ActionComposed>
Ptr;
49 typedef std::shared_ptr<const ActionComposed>
ConstPtr;
80 virtual void print ()
const override;
86 virtual void emitYaml ( YAML::Emitter& out)
const override;
93 virtual bool fillFromYaml( YAML::const_iterator yamlIt )
override;
124 #endif // __ROSEE_ACTIONCOMPOSED_H
std::vector< std::string > innerActionsNames
std::shared_ptr< ActionComposed > Ptr
unsigned int numberOfInnerActions() const
bool empty()
Check if the action composed is empty.
A ActionComposed, which is formed by one or more Primitives (or even other composed). It is useful for example to create an action that grasp only with bending the tips (e.g. to take a dish from above) If the ActionComposed has the boolean value independent to true, it means that include indipendent sub-actions, so, each joint is used by at maximum by ONLY ONE of the sub-action inside. In this case the jointsInvolvedCount will contain only 0 or 1 values. If the ActionComposed is not independent, each joint position is calculated as the mean of all the joint position of the contained sub-actions that uses that joint. So each mean can include different primitives, so we used the jointsInvolvedCount vector to store the number of sub action that use each joint.
unsigned int nInnerActions
virtual void print() const override
Print info about this action (name, jointpos, inner actions names, and other)
Class to handle a generic, simple action. Differently from other class, this is easily creable manual...
std::shared_ptr< const ActionComposed > ConstPtr
bool checkIndependency(ROSEE::Action::Ptr action)
bool isIndependent() const
virtual bool sumAction(ROSEE::Action::Ptr action, double jointPosScaleFactor=1.0, unsigned int jointPosIndex=0)
Function to add another action to this one.
std::shared_ptr< Action > Ptr
std::vector< std::string > getInnerActionsNames() const
virtual bool fillFromYaml(YAML::const_iterator yamlIt) override
Fill the internal data with infos taken from yaml file.
virtual void emitYaml(YAML::Emitter &out) const override
Emit info in a file with yaml format.