ROSEndEffector
ROS End-Effector package: provides a ROS-based set of standard interfaces to command robotics end-effectors in an agnostic fashion.
|
The action of moving some joints (see later) of a single finger in a full clousure position towards the palm. More...
#include <ActionTrig.h>
Public Types | |
typedef std::map< std::string, ActionTrig > | Map |
Public Types inherited from ROSEE::ActionPrimitive | |
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< ActionPrimitive > | Ptr |
typedef std::shared_ptr< const ActionPrimitive > | ConstPtr |
Public Types inherited from ROSEE::Action | |
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... | |
typedef std::shared_ptr< Action > | Ptr |
typedef std::shared_ptr< const Action > | ConstPtr |
Public Member Functions | |
ActionTrig (std::string actionName, ActionPrimitive::Type) | |
ActionTrig (std::string actionName, ActionPrimitive::Type, std::string tip, JointPos) | |
std::vector< JointPos > | getAllJointPos () 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. 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. More... | |
JointPos | getJointPos () const override |
Overriden get from the pure virtual function of the base class Action. More... | |
void | setJointPos (JointPos) |
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... | |
void | setFingerInvolved (std::string) |
bool | fillFromYaml (YAML::const_iterator yamlIt) override |
function to fill members of the Action with infos taken from yaml files More... | |
Public Member Functions inherited from ROSEE::ActionPrimitive | |
virtual | ~ActionPrimitive () |
Type | getPrimitiveType () const |
unsigned int | getMaxStoredActionStates () const |
unsigned int | getnFingersInvolved () const |
void | setJointsInvolvedCount (ROSEE::JointsInvolvedCount jointsInvolvedCount) |
virtual void | emitYaml (YAML::Emitter &) const override |
Function to fill the argument passed with info about the action. More... | |
Public Member Functions inherited from ROSEE::Action | |
virtual | ~Action () |
std::string | getName () const |
Get the name of the action. More... | |
Type | getType () const |
std::set< std::string > | getFingersInvolved () const |
Get for fingersInvolved. More... | |
JointsInvolvedCount | getJointsInvolvedCount () const |
Get for jointsInvolvedCount. More... | |
virtual void | print () const |
Overridable functions, if we want to make them more action-specific. More... | |
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. More... | |
Protected Member Functions inherited from ROSEE::Action | |
Action () | |
Action (std::string actionName, Action::Type type) | |
Protected Attributes inherited from ROSEE::ActionPrimitive | |
unsigned int | nFingersInvolved |
const unsigned int | maxStoredActionStates |
const Type | primitiveType |
Protected Attributes inherited from ROSEE::Action | |
std::string | name |
Action::Type | type |
std::set< std::string > | fingersInvolved |
JointsInvolvedCount | jointsInvolvedCount |
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
Definition at line 64 of file ActionTrig.h.
typedef std::map< std::string, ActionTrig > ROSEE::ActionTrig::Map |
Definition at line 69 of file ActionTrig.h.
ROSEE::ActionTrig::ActionTrig | ( | std::string | actionName, |
ActionPrimitive::Type | actionType | ||
) |
Definition at line 21 of file ActionTrig.cpp.
ROSEE::ActionTrig::ActionTrig | ( | std::string | actionName, |
ActionPrimitive::Type | actionType, | ||
std::string | tip, | ||
JointPos | jp | ||
) |
Definition at line 24 of file ActionTrig.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 59 of file ActionTrig.cpp.
|
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.
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.
|
overridevirtual |
Overriden get from the pure virtual function of the base class Action.
Implements ROSEE::Action.
Definition at line 35 of file ActionTrig.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 39 of file ActionTrig.cpp.
void ROSEE::ActionTrig::setFingerInvolved | ( | std::string | fingName | ) |
Definition at line 54 of file ActionTrig.cpp.
void ROSEE::ActionTrig::setJointPos | ( | ROSEE::JointPos | jointPos | ) |
Definition at line 43 of file ActionTrig.cpp.
|
private |
Definition at line 107 of file ActionTrig.h.