ROSEndEffector
ROS End-Effector package: provides a ROS-based set of standard interfaces to command robotics end-effectors in an agnostic fashion.
|
A ActionComposed, which is formed by one or more Primitives (or even other composed). More...
#include <ActionComposed.h>
Public Types | |
typedef std::shared_ptr< ActionComposed > | Ptr |
typedef std::shared_ptr< const ActionComposed > | ConstPtr |
Public Types inherited from ROSEE::ActionGeneric | |
typedef std::shared_ptr< ActionGeneric > | Ptr |
typedef std::shared_ptr< const ActionGeneric > | ConstPtr |
Public Types inherited from ROSEE::Action | |
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... | |
typedef std::shared_ptr< Action > | Ptr |
typedef std::shared_ptr< const Action > | ConstPtr |
Public Member Functions | |
ActionComposed () | |
ActionComposed (std::string name) | |
ActionComposed (std::string name, bool independent) | |
ActionComposed (const ActionComposed &other) | |
Copy costructor. More... | |
unsigned int | numberOfInnerActions () const |
bool | isIndependent () const |
std::vector< std::string > | getInnerActionsNames () const |
virtual void | print () const override |
Print info about this action (name, jointpos, inner actions names, and other) More... | |
virtual void | emitYaml (YAML::Emitter &out) const override |
Emit info in a file with yaml format. More... | |
virtual bool | fillFromYaml (YAML::const_iterator yamlIt) override |
Fill the internal data with infos taken from yaml file. 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... | |
bool | empty () |
Check if the action composed is empty. More... | |
Public Member Functions inherited from ROSEE::ActionGeneric | |
ActionGeneric () | |
default costructor. 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) | |
JointPos | getJointPos () const override |
Get the joint position related to this action, overriden from Action. More... | |
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... | |
Public Member Functions inherited from ROSEE::Action | |
virtual | ~Action () |
std::string | getName () const |
Get the name of the action. More... | |
Type | getType () const |
std::set< std::string > | getFingersInvolved () const |
Get for fingersInvolved. More... | |
JointsInvolvedCount | getJointsInvolvedCount () const |
Get for jointsInvolvedCount. More... | |
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 | |
std::vector< std::string > | innerActionsNames |
unsigned int | nInnerActions |
bool | independent |
Protected Attributes inherited from ROSEE::ActionGeneric | |
JointPos | jointPos |
Protected Attributes inherited from ROSEE::Action | |
std::string | name |
Action::Type | type |
std::set< std::string > | fingersInvolved |
JointsInvolvedCount | jointsInvolvedCount |
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.