Class to describe the action of "pinching" with more than 2 tips (with 2 tips there is the ActionPinchTight and ActionPinchLoose The number of the finger used is fixed when the object is costructed, and it is stored in the father member nFingersInvolved. More...
#include <ActionMultiplePinchTight.h>

Classes | |
| struct | depthComp |
| struct to put in order the actionStates. with "<" we put as best the position that has less sumDepth. More... | |
Public Types | |
| typedef std::map< std::set< std::string >, ActionMultiplePinchTight > | Map |
| typedef std::pair< JointPos, double > | StateWithDepth |
| A pair to "link" the JointPos with the depthSum info to order the StateWithDepth in the actionState set. More... | |
Public Types inherited from ROSEE::ActionPrimitive | |
| 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 | |
| ActionMultiplePinchTight () | |
| ActionMultiplePinchTight (std::set< std::string >, JointPos, double depthSum) | |
| ActionMultiplePinchTight (unsigned int maxStoredActionStates) | |
| 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... | |
| bool | fillFromYaml (YAML::const_iterator yamlIt) override |
| function to fill members of the Action with infos taken from yaml files More... | |
| std::vector< ROSEE::ActionMultiplePinchTight::StateWithDepth > | getActionStates () const |
| Specific get for the ActionMultiplePinchTight to return the state with the paired depthSum. More... | |
| std::vector< ROSEE::JointPos > | getAllJointPos () const override |
| 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... | |
| JointPos | getJointPos () const override |
| 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... | |
| JointPos | getJointPos (unsigned int index) const |
| bool | insertActionState (JointPos, double depthSum) |
| function to insert a single action in the actionStates set of possible action. If the action is not so good (depthSum) the action is not inserted and the function return false More... | |
| void | print () const override |
| Overridable functions, if we want to make them more action-specific. More... | |
Public Member Functions inherited from ROSEE::ActionPinchGeneric | |
| ActionPinchGeneric (std::string name, ActionPrimitive::Type type) | |
| ActionPinchGeneric (std::string name, unsigned int maxStoredActionStates, ActionPrimitive::Type type) | |
| ActionPinchGeneric (std::string name, unsigned int nFingerInvolved, unsigned int maxStoredActionStates, ActionPrimitive::Type type) | |
| std::set< std::string > | getKeyElements () const override |
| Necessary method to know the key used by the maps which store all the Actions of one type. Used by YamlWorker. More... | |
Public Member Functions inherited from ROSEE::ActionPrimitive | |
| 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 | |
| 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 () |
Private Attributes | |
| std::set< StateWithDepth, depthComp > | actionStates |
| For each multiple pinch possible, we want a set of action because we want to store (in general) more possible way to do that action with that X fingers. The pinch among X tips can theoretically be done in infinite ways, so we store the best ways found (ordering them with depthSum of fingertips compenetration) More... | |
Additional Inherited Members | |
Protected Member Functions inherited from ROSEE::ActionPrimitive | |
| 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 inherited from ROSEE::ActionPrimitive | |
| 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 |
Class to describe the action of "pinching" with more than 2 tips (with 2 tips there is the ActionPinchTight and ActionPinchLoose The number of the finger used is fixed when the object is costructed, and it is stored in the father member nFingersInvolved.
A pinchMultipleTight is defined by:
Definition at line 48 of file ActionMultiplePinchTight.h.
| typedef std::map< std::set<std::string>, ActionMultiplePinchTight > ROSEE::ActionMultiplePinchTight::Map |
Definition at line 53 of file ActionMultiplePinchTight.h.
| typedef std::pair<JointPos, double> ROSEE::ActionMultiplePinchTight::StateWithDepth |
A pair to "link" the JointPos with the depthSum info to order the StateWithDepth in the actionState set.
Definition at line 56 of file ActionMultiplePinchTight.h.
| ROSEE::ActionMultiplePinchTight::ActionMultiplePinchTight | ( | ) |
Definition at line 21 of file ActionMultiplePinchTight.cpp.
| ROSEE::ActionMultiplePinchTight::ActionMultiplePinchTight | ( | unsigned int | maxStoredActionStates | ) |
Definition at line 24 of file ActionMultiplePinchTight.cpp.
| ROSEE::ActionMultiplePinchTight::ActionMultiplePinchTight | ( | std::set< std::string > | fingerNamesSet, |
| JointPos | jp, | ||
| double | depthSum | ||
| ) |
Definition at line 27 of file ActionMultiplePinchTight.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 |
Reimplemented from ROSEE::ActionPrimitive.
Definition at line 140 of file ActionMultiplePinchTight.cpp.
|
overridevirtual |
function to fill members of the Action with infos taken from yaml files
| yamlIt | a YAML::const_iterator to the node that is loaded with YAML::LoadFile(dirPath + filename). check YamlWorker to correctly parse and emit the file |
Implements ROSEE::Action.
Definition at line 182 of file ActionMultiplePinchTight.cpp.
| std::vector< ROSEE::ActionMultiplePinchTight::StateWithDepth > ROSEE::ActionMultiplePinchTight::getActionStates | ( | ) | const |
Specific get for the ActionMultiplePinchTight to return the state with the paired depthSum.
Definition at line 65 of file ActionMultiplePinchTight.cpp.
|
overridevirtual |
Return all the joint position stored. If the concrete (derived from Action) has only one joint position info, this function is equal to getJointPos.
Implements ROSEE::Action.
Definition at line 52 of file ActionMultiplePinchTight.cpp.
|
overridevirtual |
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.
Implements ROSEE::Action.
Definition at line 39 of file ActionMultiplePinchTight.cpp.
| ROSEE::JointPos ROSEE::ActionMultiplePinchTight::getJointPos | ( | unsigned int | index | ) | const |
Definition at line 43 of file ActionMultiplePinchTight.cpp.
| bool ROSEE::ActionMultiplePinchTight::insertActionState | ( | ROSEE::JointPos | jp, |
| double | depthSum | ||
| ) |
function to insert a single action in the actionStates set of possible action. If the action is not so good (depthSum) the action is not inserted and the function return false
| JointPos | The joints position |
| depthSum | the sum of all depth of collisions pairs |
Definition at line 78 of file ActionMultiplePinchTight.cpp.
|
overridevirtual |
Overridable functions, if we want to make them more action-specific.
Reimplemented from ROSEE::Action.
Definition at line 108 of file ActionMultiplePinchTight.cpp.
|
private |
For each multiple pinch possible, we want a set of action because we want to store (in general) more possible way to do that action with that X fingers. The pinch among X tips can theoretically be done in infinite ways, so we store the best ways found (ordering them with depthSum of fingertips compenetration)
Definition at line 105 of file ActionMultiplePinchTight.h.