ROSEndEffector
ROS End-Effector package: provides a ROS-based set of standard interfaces to command robotics end-effectors in an agnostic fashion.
|
Primitive which indicate a motion of n fingers moving ONLY ONE joint. More...
#include <ActionSingleJointMultipleTips.h>
Public Types | |
typedef std::map< std::string, ActionSingleJointMultipleTips > | 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 | |
ActionSingleJointMultipleTips () | |
ActionSingleJointMultipleTips (std::string actionName, unsigned int nFingers) | |
NOT ANYOMORE ? used (for now) by yaml worker only. 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... | |
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. 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. More... | |
JointPos | getJointPosFurther () const |
JointPos | getJointPosNearer () const |
std::string | getJointName () const |
void | print () const override |
Overridable functions, if we want to make them more action-specific. More... | |
void | emitYaml (YAML::Emitter &out) const override |
Function to fill the argument passed with info about the action. More... | |
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) |
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... | |
Private Attributes | |
JointPos | jointPosFurther |
JointPos | jointPosNearer |
std::string | jointInvolved |
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 |
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.