Primitive which indicate a motion of n fingers moving ONLY ONE joint. For example, this primitive is necessary for the hands that have one joint that close all the fingers to do a grasp. But it can also useful to detect other multiple finger motions (like a "spread finger") More...
#include <ActionSingleJointMultipleTips.h>
Public Types | |
typedef std::map< std::string, ActionSingleJointMultipleTips > | Map |
![]() | |
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 if you change this enum, change also the ROSEEControl.msg accordingly. More... | |
![]() | |
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 | |
ActionSingleJointMultipleTips () | |
ActionSingleJointMultipleTips (std::string actionName, unsigned int nFingers) | |
NOT ANYOMORE ? used (for now) by yaml worker only. Before parsing we cant now the info that the other costructor need. So all these infos are set in the fillFromYaml. More... | |
ActionSingleJointMultipleTips (std::string actionName, std::vector< std::string > fingers, std::string jointName, JointPos jpFurther, JointPos jpNearer) | |
"Standard" costructor, which fill all the necessary infos More... | |
void | emitYaml (YAML::Emitter &out) 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< JointPos > | getAllJointPos () const override |
Overriden get from the pure virtual function of the base class Action The signature must be equal, even if here we have set and vector of only one element. For this class this function return the vector which contain jointPosFurther and jointPosNearer. More... | |
std::string | getJointName () const |
JointPos | getJointPos () const override |
Overriden get from the pure virtual function of the base class Action. More... | |
JointPos | getJointPosFurther () const |
JointPos | getJointPosNearer () const |
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... | |
void | print () const override |
Overridable functions, if we want to make them more action-specific. More... | |
![]() | |
unsigned int | getMaxStoredActionStates () const |
unsigned int | getnFingersInvolved () const |
Type | getPrimitiveType () const |
void | setJointsInvolvedCount (ROSEE::JointsInvolvedCount jointsInvolvedCount) |
virtual | ~ActionPrimitive () |
![]() | |
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::string | jointInvolved |
JointPos | jointPosFurther |
JointPos | jointPosNearer |
Additional Inherited Members | |
![]() | |
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... | |
![]() | |
Action () | |
Action (std::string actionName, Action::Type type) | |
![]() | |
const unsigned int | maxStoredActionStates |
unsigned int | nFingersInvolved |
const Type | primitiveType |
![]() | |
std::set< std::string > | fingersInvolved |
JointsInvolvedCount | jointsInvolvedCount |
std::string | name |
Action::Type | type |
Primitive which indicate a motion of n fingers moving ONLY ONE joint. For example, this primitive is necessary for the hands that have one joint that close all the fingers to do a grasp. But it can also useful to detect other multiple finger motions (like a "spread finger")
Definition at line 31 of file ActionSingleJointMultipleTips.h.
typedef std::map< std::string, ActionSingleJointMultipleTips > ROSEE::ActionSingleJointMultipleTips::Map |
Definition at line 35 of file ActionSingleJointMultipleTips.h.
ROSEE::ActionSingleJointMultipleTips::ActionSingleJointMultipleTips | ( | ) |
Definition at line 19 of file ActionSingleJointMultipleTips.cpp.
ROSEE::ActionSingleJointMultipleTips::ActionSingleJointMultipleTips | ( | std::string | actionName, |
unsigned int | nFingers | ||
) |
NOT ANYOMORE ? used (for now) by yaml worker only. Before parsing we cant now the info that the other costructor need. So all these infos are set in the fillFromYaml.
actionName | name of the action |
nFingers | number of the fingers involved in the action (i.e. number of finger that the jointInvolved moves) |
Definition at line 22 of file ActionSingleJointMultipleTips.cpp.
ROSEE::ActionSingleJointMultipleTips::ActionSingleJointMultipleTips | ( | std::string | actionName, |
std::vector< std::string > | fingers, | ||
std::string | jointName, | ||
JointPos | jpFurther, | ||
JointPos | jpNearer | ||
) |
"Standard" costructor, which fill all the necessary infos
actionName | name of the action |
fingers | vector containing all the fingers involved |
jointName | the name of the joint involved in the action (one joint for definition) |
jpFurther | JointPosition of ALL joints of the hand, with only the jointName set, in a way that the position is to the bound which is further from the default position (which is 0) |
jpNearer | JointPosition of ALL joints of the hand, with only the jointName set, in a way that the position is to the bound which is nearer from the default position |
Definition at line 25 of file ActionSingleJointMultipleTips.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 99 of file ActionSingleJointMultipleTips.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 128 of file ActionSingleJointMultipleTips.cpp.
|
overridevirtual |
Overriden get from the pure virtual function of the base class Action The signature must be equal, even if here we have set and vector of only one element. For this class this function return the vector which contain jointPosFurther and jointPosNearer.
Implements ROSEE::Action.
Definition at line 43 of file ActionSingleJointMultipleTips.cpp.
std::string ROSEE::ActionSingleJointMultipleTips::getJointName | ( | ) | const |
Definition at line 63 of file ActionSingleJointMultipleTips.cpp.
|
overridevirtual |
Overriden get from the pure virtual function of the base class Action.
Implements ROSEE::Action.
Definition at line 51 of file ActionSingleJointMultipleTips.cpp.
ROSEE::JointPos ROSEE::ActionSingleJointMultipleTips::getJointPosFurther | ( | ) | const |
Definition at line 55 of file ActionSingleJointMultipleTips.cpp.
ROSEE::JointPos ROSEE::ActionSingleJointMultipleTips::getJointPosNearer | ( | ) | const |
Definition at line 59 of file ActionSingleJointMultipleTips.cpp.
|
overridevirtual |
Necessary method to know the key used by the maps which store all the Actions of one type. Used by YamlWorker.
Implements ROSEE::ActionPrimitive.
Definition at line 67 of file ActionSingleJointMultipleTips.cpp.
|
overridevirtual |
Overridable functions, if we want to make them more action-specific.
Reimplemented from ROSEE::Action.
Definition at line 73 of file ActionSingleJointMultipleTips.cpp.
|
private |
Definition at line 91 of file ActionSingleJointMultipleTips.h.
|
private |
Definition at line 89 of file ActionSingleJointMultipleTips.h.
|
private |
Definition at line 90 of file ActionSingleJointMultipleTips.h.