Public Types | Public Member Functions | Private Attributes | List of all members
ROSEE::ActionSingleJointMultipleTips Class Reference

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>

Inheritance diagram for ROSEE::ActionSingleJointMultipleTips:
Inheritance graph
[legend]

Public Types

typedef std::map< std::string, ActionSingleJointMultipleTipsMap
 
- Public Types inherited from ROSEE::ActionPrimitive
typedef std::shared_ptr< const ActionPrimitiveConstPtr
 
typedef std::shared_ptr< ActionPrimitivePtr
 
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...
 
- Public Types inherited from ROSEE::Action
typedef std::shared_ptr< const ActionConstPtr
 
typedef std::shared_ptr< ActionPtr
 
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< JointPosgetAllJointPos () 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...
 
- 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::string jointInvolved
 
JointPos jointPosFurther
 
JointPos jointPosNearer
 

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
 

Detailed Description

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.

Member Typedef Documentation

◆ Map

Definition at line 35 of file ActionSingleJointMultipleTips.h.

Constructor & Destructor Documentation

◆ ActionSingleJointMultipleTips() [1/3]

ROSEE::ActionSingleJointMultipleTips::ActionSingleJointMultipleTips ( )

Definition at line 19 of file ActionSingleJointMultipleTips.cpp.

◆ ActionSingleJointMultipleTips() [2/3]

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.

Parameters
actionNamename of the action
nFingersnumber of the fingers involved in the action (i.e. number of finger that the jointInvolved moves)

Definition at line 22 of file ActionSingleJointMultipleTips.cpp.

◆ ActionSingleJointMultipleTips() [3/3]

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

Parameters
actionNamename of the action
fingersvector containing all the fingers involved
jointNamethe name of the joint involved in the action (one joint for definition)
jpFurtherJointPosition 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)
jpNearerJointPosition 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
Warning
If 0 position is not included between the bounds (eg 0.4 | 5.1) , jpNearer is the one nearer to 0 (0.4) and jpFurther the further (5.1). CHECK THIS FACT TO BE SURE

Definition at line 25 of file ActionSingleJointMultipleTips.cpp.

Member Function Documentation

◆ emitYaml()

void ROSEE::ActionSingleJointMultipleTips::emitYaml ( YAML::Emitter &  out) const
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.

Parameters
outthe yaml-cpp emitter which store infos about the action
Note
this function does not print in a file, but simply fill a YAML::Emitter.

Reimplemented from ROSEE::ActionPrimitive.

Definition at line 99 of file ActionSingleJointMultipleTips.cpp.

◆ fillFromYaml()

bool ROSEE::ActionSingleJointMultipleTips::fillFromYaml ( YAML::const_iterator  yamlIt)
overridevirtual

function to fill members of the Action with infos taken from yaml files

Parameters
yamlIta 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.

◆ getAllJointPos()

std::vector< ROSEE::JointPos > ROSEE::ActionSingleJointMultipleTips::getAllJointPos ( ) const
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.

◆ getJointName()

std::string ROSEE::ActionSingleJointMultipleTips::getJointName ( ) const

Definition at line 63 of file ActionSingleJointMultipleTips.cpp.

◆ getJointPos()

ROSEE::JointPos ROSEE::ActionSingleJointMultipleTips::getJointPos ( ) const
overridevirtual

Overriden get from the pure virtual function of the base class Action.

Returns
the jointPosFurther

Implements ROSEE::Action.

Definition at line 51 of file ActionSingleJointMultipleTips.cpp.

◆ getJointPosFurther()

ROSEE::JointPos ROSEE::ActionSingleJointMultipleTips::getJointPosFurther ( ) const

Definition at line 55 of file ActionSingleJointMultipleTips.cpp.

◆ getJointPosNearer()

ROSEE::JointPos ROSEE::ActionSingleJointMultipleTips::getJointPosNearer ( ) const

Definition at line 59 of file ActionSingleJointMultipleTips.cpp.

◆ getKeyElements()

std::set< std::string > ROSEE::ActionSingleJointMultipleTips::getKeyElements ( ) const
overridevirtual

Necessary method to know the key used by the maps which store all the Actions of one type. Used by YamlWorker.

Returns
for this class, it return the jointName, inserted in a single-element set because father signature say so

Implements ROSEE::ActionPrimitive.

Definition at line 67 of file ActionSingleJointMultipleTips.cpp.

◆ print()

void ROSEE::ActionSingleJointMultipleTips::print ( ) const
overridevirtual

Overridable functions, if we want to make them more action-specific.

Reimplemented from ROSEE::Action.

Definition at line 73 of file ActionSingleJointMultipleTips.cpp.

Member Data Documentation

◆ jointInvolved

std::string ROSEE::ActionSingleJointMultipleTips::jointInvolved
private

Definition at line 91 of file ActionSingleJointMultipleTips.h.

◆ jointPosFurther

JointPos ROSEE::ActionSingleJointMultipleTips::jointPosFurther
private

Definition at line 89 of file ActionSingleJointMultipleTips.h.

◆ jointPosNearer

JointPos ROSEE::ActionSingleJointMultipleTips::jointPosNearer
private

Definition at line 90 of file ActionSingleJointMultipleTips.h.


The documentation for this class was generated from the following files:


end-effector
Author(s): Luca Muratore , Davide Torielli , Liana Bertoni
autogenerated on Tue Apr 5 2022 02:57:53