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

The action of moving some joints (see later) of a single finger in a full clousure position towards the palm. The action is unique (joints involved in a certain position: the bound) so maxStoredActionStates == 1 always Described by: More...

#include <ActionTrig.h>

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

Public Types

typedef std::map< std::string, ActionTrigMap
 
- 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 @remind 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 @remind if you change this enum, change also the ROSEEControl.msg accordingly. More...
 

Public Member Functions

 ActionTrig (std::string actionName, ActionPrimitive::Type)
 
 ActionTrig (std::string actionName, ActionPrimitive::Type, std::string tip, JointPos)
 
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 ActionPrimitive The signature must be equal, even if here we have set and vector of only one element. For this class this function simply return a vector which contain a single element. More...
 
std::string getFingerInvolved () const
 Specific method of trig to simply return a string instead of the full vector fingersInvolved that in this case contains only one element. More...
 
JointPos getJointPos () const override
 Overriden get from the pure virtual function of the base class Action. More...
 
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 setFingerInvolved (std::string)
 
void setJointPos (JointPos)
 
- Public Member Functions inherited from ROSEE::ActionPrimitive
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...
 
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 void print () const
 Overridable functions, if we want to make them more action-specific. More...
 
virtual ~Action ()
 

Private Attributes

JointPos jointPos
 

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

The action of moving some joints (see later) of a single finger in a full clousure position towards the palm. The action is unique (joints involved in a certain position: the bound) so maxStoredActionStates == 1 always Described by:

Actually, there are 3 types of action for this class

Todo:
instead of tip , use the finger name for the Trig (i.e. the defined srdf group).
Note
We have to understand the direction of joints to make the finger full close. Because full close position can be linked to both lower or upper bound of each joint involved. The method to solve this is to go in the max range of the joint, because usually a finger has more motion towards the palm respect the opposite (like humans). We consider the default joint pos to 0.
Warning
so, take care of joint limits: they must include the 0. Has it sense to have joint limits both positive or both negative (not including the 0) ?

Definition at line 64 of file ActionTrig.h.

Member Typedef Documentation

◆ Map

typedef std::map< std::string, ActionTrig > ROSEE::ActionTrig::Map

Definition at line 69 of file ActionTrig.h.

Constructor & Destructor Documentation

◆ ActionTrig() [1/2]

ROSEE::ActionTrig::ActionTrig ( std::string  actionName,
ActionPrimitive::Type  actionType 
)

Definition at line 21 of file ActionTrig.cpp.

◆ ActionTrig() [2/2]

ROSEE::ActionTrig::ActionTrig ( std::string  actionName,
ActionPrimitive::Type  actionType,
std::string  tip,
JointPos  jp 
)

Definition at line 24 of file ActionTrig.cpp.

Member Function Documentation

◆ fillFromYaml()

bool ROSEE::ActionTrig::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 59 of file ActionTrig.cpp.

◆ getAllJointPos()

std::vector< ROSEE::JointPos > ROSEE::ActionTrig::getAllJointPos ( ) const
overridevirtual

Overriden get from the pure virtual function of the base class ActionPrimitive The signature must be equal, even if here we have set and vector of only one element. For this class this function simply return a vector which contain a single element.

Implements ROSEE::Action.

Definition at line 47 of file ActionTrig.cpp.

◆ getFingerInvolved()

std::string ROSEE::ActionTrig::getFingerInvolved ( ) const

Specific method of trig to simply return a string instead of the full vector fingersInvolved that in this case contains only one element.

Definition at line 31 of file ActionTrig.cpp.

◆ getJointPos()

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

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

Implements ROSEE::Action.

Definition at line 35 of file ActionTrig.cpp.

◆ getKeyElements()

std::set< std::string > ROSEE::ActionTrig::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 finger name, inserted in a single-element set because father signature say so

Implements ROSEE::ActionPrimitive.

Definition at line 39 of file ActionTrig.cpp.

◆ setFingerInvolved()

void ROSEE::ActionTrig::setFingerInvolved ( std::string  fingName)

Definition at line 54 of file ActionTrig.cpp.

◆ setJointPos()

void ROSEE::ActionTrig::setJointPos ( ROSEE::JointPos  jointPos)

Definition at line 43 of file ActionTrig.cpp.

Member Data Documentation

◆ jointPos

JointPos ROSEE::ActionTrig::jointPos
private

Definition at line 107 of file ActionTrig.h.


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


end-effector
Author(s): Luca Muratore , Davide Torielli , Liana Bertoni
autogenerated on Sat Dec 14 2024 03:49:27