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. More...
#include <ActionComposed.h>

Public Types | |
| typedef std::shared_ptr< const ActionComposed > | ConstPtr |
| typedef std::shared_ptr< ActionComposed > | Ptr |
Public Types inherited from ROSEE::ActionGeneric | |
| typedef std::shared_ptr< const ActionGeneric > | ConstPtr |
| typedef std::shared_ptr< ActionGeneric > | Ptr |
Public Types inherited from ROSEE::Action | |
| typedef std::shared_ptr< const Action > | ConstPtr |
| typedef std::shared_ptr< Action > | Ptr |
| enum | Type { Primitive, Generic, Composed, Timed, None } |
| Enum useful to discriminate each action when, for example, we want to parse a file if you change this enum, change also the ROSEEControl.msg accordingly. More... | |
Public Member Functions | |
| ActionComposed () | |
| ActionComposed (std::string name) | |
| ActionComposed (std::string name, bool independent) | |
| ActionComposed (const ActionComposed &other) | |
| Copy costructor. More... | |
| virtual void | emitYaml (YAML::Emitter &out) const override |
| Emit info in a file with yaml format. More... | |
| bool | empty () |
| Check if the action composed is empty. More... | |
| virtual bool | fillFromYaml (YAML::const_iterator yamlIt) override |
| Fill the internal data with infos taken from yaml file. More... | |
| std::vector< std::string > | getInnerActionsNames () const |
| bool | isIndependent () const |
| unsigned int | numberOfInnerActions () const |
| virtual void | print () const override |
| Print info about this action (name, jointpos, inner actions names, and other) More... | |
| virtual bool | sumAction (ROSEE::Action::Ptr action, double jointPosScaleFactor=1.0, unsigned int jointPosIndex=0) |
| Function to add another action to this one. More... | |
Public Member Functions inherited from ROSEE::ActionGeneric | |
| ActionGeneric () | |
| default costructor. It is used when parsing a file with YamlWorker, More... | |
| ActionGeneric (std::string actionName, ROSEE::JointPos jointPos) | |
| Simpliest costructor, need only essential infos. More... | |
| ActionGeneric (std::string actionName, ROSEE::JointPos jointPos, JointsInvolvedCount jic) | |
| Another costructor. More... | |
| ActionGeneric (std::string actionName, ROSEE::JointPos jointPos, JointsInvolvedCount jic, std::set< std::string > fingersInvolved) | |
| std::vector< ROSEE::JointPos > | getAllJointPos () const override |
| Get the joint position related to this action, overriden from Action Necessary to not make this class abstact, even if for a composed action we store only a single JointPos, so this function return a single element vector. More... | |
| JointPos | getJointPos () const override |
| Get the joint position related to this action, overriden from Action. More... | |
Public Member Functions inherited from ROSEE::Action | |
| std::set< std::string > | getFingersInvolved () const |
| Get for fingersInvolved. More... | |
| JointsInvolvedCount | getJointsInvolvedCount () const |
| Get for jointsInvolvedCount. More... | |
| std::string | getName () const |
| Get the name of the action. More... | |
| Type | getType () const |
| virtual | ~Action () |
Protected Member Functions | |
| bool | checkIndependency (ROSEE::Action::Ptr action) |
Protected Member Functions inherited from ROSEE::ActionGeneric | |
| ActionGeneric (std::string actionName) | |
| this costructor is only for derived class More... | |
Protected Member Functions inherited from ROSEE::Action | |
| Action () | |
| Action (std::string actionName, Action::Type type) | |
Protected Attributes | |
| bool | independent |
| std::vector< std::string > | innerActionsNames |
| unsigned int | nInnerActions |
Protected Attributes inherited from ROSEE::ActionGeneric | |
| JointPos | jointPos |
Protected Attributes inherited from ROSEE::Action | |
| std::set< std::string > | fingersInvolved |
| JointsInvolvedCount | jointsInvolvedCount |
| std::string | name |
| Action::Type | type |
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.
Definition at line 44 of file ActionComposed.h.
| typedef std::shared_ptr<const ActionComposed> ROSEE::ActionComposed::ConstPtr |
Definition at line 49 of file ActionComposed.h.
| typedef std::shared_ptr<ActionComposed> ROSEE::ActionComposed::Ptr |
Definition at line 48 of file ActionComposed.h.
| ROSEE::ActionComposed::ActionComposed | ( | ) |
Definition at line 21 of file ActionComposed.cpp.
| ROSEE::ActionComposed::ActionComposed | ( | std::string | name | ) |
Definition at line 27 of file ActionComposed.cpp.
| ROSEE::ActionComposed::ActionComposed | ( | std::string | name, |
| bool | independent | ||
| ) |
Definition at line 33 of file ActionComposed.cpp.
| ROSEE::ActionComposed::ActionComposed | ( | const ActionComposed & | other | ) |
Copy costructor.
|
protected |
Definition at line 147 of file ActionComposed.cpp.
|
overridevirtual |
Emit info in a file with yaml format.
| out | a YAML::Emitter& object to emit the infos |
Reimplemented from ROSEE::ActionGeneric.
Definition at line 208 of file ActionComposed.cpp.
| bool ROSEE::ActionComposed::empty | ( | ) |
Check if the action composed is empty.
Definition at line 51 of file ActionComposed.cpp.
|
overridevirtual |
Fill the internal data with infos taken from yaml file.
| yamlIt | a yamlt iterator to a node which has loaded the file |
Reimplemented from ROSEE::ActionGeneric.
Definition at line 234 of file ActionComposed.cpp.
| std::vector< std::string > ROSEE::ActionComposed::getInnerActionsNames | ( | ) | const |
Definition at line 47 of file ActionComposed.cpp.
| bool ROSEE::ActionComposed::isIndependent | ( | ) | const |
Definition at line 43 of file ActionComposed.cpp.
| unsigned int ROSEE::ActionComposed::numberOfInnerActions | ( | ) | const |
Definition at line 39 of file ActionComposed.cpp.
|
overridevirtual |
Print info about this action (name, jointpos, inner actions names, and other)
Reimplemented from ROSEE::Action.
Definition at line 176 of file ActionComposed.cpp.
|
virtual |
Function to add another action to this one.
| action | The action to be added to the ActionComposed |
| jointPosScaleFactor | How much scale the joint position values for the action to be inserted. Default to 1 |
| jointPosIndex | (default == 0) the wanted jointPos or action to insert. Error the index is greater than the number of joint pos in the action. First element has index 0. |
Definition at line 56 of file ActionComposed.cpp.
|
protected |
Definition at line 116 of file ActionComposed.h.
|
protected |
Definition at line 113 of file ActionComposed.h.
|
protected |
Definition at line 114 of file ActionComposed.h.