Virtual class, Base of all the primitive actions. It has some implemented functions that a derived class can use, if you don't want to override to make them more action-specific. All the primitives are defined by: More...
#include <ActionPrimitive.h>

Public Types | |
| typedef std::shared_ptr< const ActionPrimitive > | ConstPtr |
| typedef std::shared_ptr< ActionPrimitive > | Ptr |
| enum | Type { PinchTight, PinchLoose, MultiplePinchTight, Trig, TipFlex, FingFlex, SingleJointMultipleTips, None } |
| Enum useful to discriminate each primitive action when, for example, we want to parse a file @remind if you change this enum, change also the ROSEEControl.msg accordingly. More... | |
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 @remind if you change this enum, change also the ROSEEControl.msg accordingly. More... | |
Public Member Functions | |
| virtual void | emitYaml (YAML::Emitter &) const override |
| Function to fill the argument passed with info about the action. Pure virtual because each derived class has different infos and stored differently. check YamlWorker to correctly emit and parse the file. More... | |
| virtual std::set< std::string > | getKeyElements () const =0 |
| Depending on the primitive, we can use different "keys" to take info from yaml file when parsing for example, trig and pinches are selected through fingersInvolved, while ActionSingleJointMultipleTips uses the joint name. So each derived class must override this info, which for now is used only in YamlWorker::parseYamlPrimitive() and also by map handler to get the primitive, also on send action test. More... | |
| unsigned int | getMaxStoredActionStates () const |
| unsigned int | getnFingersInvolved () const |
| Type | getPrimitiveType () const |
| void | setJointsInvolvedCount (ROSEE::JointsInvolvedCount jointsInvolvedCount) |
| virtual | ~ActionPrimitive () |
Public Member Functions inherited from ROSEE::Action | |
| virtual bool | fillFromYaml (YAML::const_iterator yamlIt)=0 |
| function to fill members of the Action with infos taken from yaml files More... | |
| virtual std::vector< ROSEE::JointPos > | getAllJointPos () const =0 |
| Return all the joint position stored. If the concrete (derived from Action) has only one joint position info, this function is equal to getJointPos. More... | |
| std::set< std::string > | getFingersInvolved () const |
| Get for fingersInvolved. More... | |
| virtual JointPos | getJointPos () const =0 |
| Get the position related to this action. Pure Virtual function: the derived class store this info differently so they are in charge of providing the read. More... | |
| JointsInvolvedCount | getJointsInvolvedCount () const |
| Get for jointsInvolvedCount. More... | |
| std::string | getName () const |
| Get the name of the action. More... | |
| Type | getType () const |
| virtual void | print () const |
| Overridable functions, if we want to make them more action-specific. More... | |
| virtual | ~Action () |
Protected Member Functions | |
| ActionPrimitive (std::string name, unsigned int maxStoredActionStates, Type type) | |
| ActionPrimitive (std::string name, unsigned int nFingersInvolved, unsigned int maxStoredActionStates, Type type) | |
| Protected costructor: object creable only by derived classes. There is no default costructor (without arguments) because we want to set always these members. More... | |
Protected Member Functions inherited from ROSEE::Action | |
| Action () | |
| Action (std::string actionName, Action::Type type) | |
Protected Attributes | |
| const unsigned int | maxStoredActionStates |
| unsigned int | nFingersInvolved |
| const Type | primitiveType |
Protected Attributes inherited from ROSEE::Action | |
| std::set< std::string > | fingersInvolved |
| JointsInvolvedCount | jointsInvolvedCount |
| std::string | name |
| Action::Type | type |
Virtual class, Base of all the primitive actions. It has some implemented functions that a derived class can use, if you don't want to override to make them more action-specific. All the primitives are defined by:
Definition at line 48 of file ActionPrimitive.h.
| typedef std::shared_ptr<const ActionPrimitive> ROSEE::ActionPrimitive::ConstPtr |
Definition at line 54 of file ActionPrimitive.h.
| typedef std::shared_ptr<ActionPrimitive> ROSEE::ActionPrimitive::Ptr |
Definition at line 53 of file ActionPrimitive.h.
Enum useful to discriminate each primitive action when, for example, we want to parse a file @remind if you change this enum, change also the ROSEEControl.msg accordingly.
| Enumerator | |
|---|---|
| PinchTight | |
| PinchLoose | |
| MultiplePinchTight | |
| Trig | |
| TipFlex | |
| FingFlex | |
| SingleJointMultipleTips | |
| None | |
Definition at line 60 of file ActionPrimitive.h.
|
inlinevirtual |
Definition at line 62 of file ActionPrimitive.h.
|
protected |
Definition at line 39 of file ActionPrimitive.cpp.
|
protected |
Protected costructor: object creable only by derived classes. There is no default costructor (without arguments) because we want to set always these members.
Definition at line 42 of file ActionPrimitive.cpp.
|
overridevirtual |
Function to fill the argument passed with info about the action. Pure virtual because each derived class has different infos and stored differently. check YamlWorker to correctly emit and parse the file.
| out | the yaml-cpp emitter which store infos about the action |
Implements ROSEE::Action.
Reimplemented in ROSEE::ActionSingleJointMultipleTips, ROSEE::ActionPinchLoose, ROSEE::ActionMultiplePinchTight, and ROSEE::ActionPinchTight.
Definition at line 67 of file ActionPrimitive.cpp.
|
pure virtual |
Depending on the primitive, we can use different "keys" to take info from yaml file when parsing for example, trig and pinches are selected through fingersInvolved, while ActionSingleJointMultipleTips uses the joint name. So each derived class must override this info, which for now is used only in YamlWorker::parseYamlPrimitive() and also by map handler to get the primitive, also on send action test.
Implemented in ROSEE::ActionTrig, ROSEE::ActionSingleJointMultipleTips, and ROSEE::ActionPinchGeneric.
| unsigned int ROSEE::ActionPrimitive::getMaxStoredActionStates | ( | ) | const |
Definition at line 53 of file ActionPrimitive.cpp.
| unsigned int ROSEE::ActionPrimitive::getnFingersInvolved | ( | ) | const |
Definition at line 57 of file ActionPrimitive.cpp.
| ROSEE::ActionPrimitive::Type ROSEE::ActionPrimitive::getPrimitiveType | ( | ) | const |
Definition at line 49 of file ActionPrimitive.cpp.
| void ROSEE::ActionPrimitive::setJointsInvolvedCount | ( | ROSEE::JointsInvolvedCount | jointsInvolvedCount | ) |
Definition at line 61 of file ActionPrimitive.cpp.
|
protected |
Definition at line 95 of file ActionPrimitive.h.
|
protected |
Definition at line 92 of file ActionPrimitive.h.
|
protected |
Definition at line 97 of file ActionPrimitive.h.