ROSEndEffector
ROS End-Effector package: provides a ROS-based set of standard interfaces to command robotics end-effectors in an agnostic fashion.
|
Virtual class, Base of all the primitive actions. More...
#include <ActionPrimitive.h>
Public Types | |
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 | |
virtual | ~ActionPrimitive () |
Type | getPrimitiveType () const |
unsigned int | getMaxStoredActionStates () const |
unsigned int | getnFingersInvolved () const |
virtual std::set< std::string > | getKeyElements () const =0 |
Depending on the primitive, we can use different "keys" to take info from yaml file when parsing for example, trig and pinches are selected through fingersInvolved, while ActionSingleJointMultipleTips uses the joint name. More... | |
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 JointPos | getJointPos () const =0 |
Get the position related to this action. More... | |
virtual std::vector< ROSEE::JointPos > | getAllJointPos () const =0 |
Return all the joint position stored. More... | |
virtual void | print () const |
Overridable functions, if we want to make them more action-specific. More... | |
virtual bool | fillFromYaml (YAML::const_iterator yamlIt)=0 |
function to fill members of the Action with infos taken from yaml files More... | |
Protected Member Functions | |
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 | |
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 |
Virtual class, Base of all the primitive actions.
It has some implemented functions that a derived class can use, if you don't want to override to make them more action-specific. All the primitives are defined by:
Definition at line 48 of file ActionPrimitive.h.
typedef std::shared_ptr<const ActionPrimitive> ROSEE::ActionPrimitive::ConstPtr |
Definition at line 54 of file ActionPrimitive.h.
typedef std::shared_ptr<ActionPrimitive> ROSEE::ActionPrimitive::Ptr |
Definition at line 53 of file ActionPrimitive.h.
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.
Enumerator | |
---|---|
PinchTight | |
PinchLoose | |
MultiplePinchTight | |
Trig | |
TipFlex | |
FingFlex | |
SingleJointMultipleTips | |
None |
Definition at line 60 of file ActionPrimitive.h.
|
inlinevirtual |
Definition at line 62 of file ActionPrimitive.h.
|
protected |
Definition at line 39 of file ActionPrimitive.cpp.
|
protected |
Protected costructor: object creable only by derived classes.
There is no default costructor (without arguments) because we want to set always these members
Definition at line 42 of file ActionPrimitive.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 |
Implements ROSEE::Action.
Reimplemented in ROSEE::ActionPinchLoose, ROSEE::ActionMultiplePinchTight, ROSEE::ActionSingleJointMultipleTips, and ROSEE::ActionPinchTight.
Definition at line 67 of file ActionPrimitive.cpp.
|
pure virtual |
Depending on the primitive, we can use different "keys" to take info from yaml file when parsing for example, trig and pinches are selected through fingersInvolved, while ActionSingleJointMultipleTips uses the joint name.
So each derived class must override this info, which for now is used only in YamlWorker::parseYamlPrimitive() and also by map handler to get the primitive, also on send action test
Implemented in ROSEE::ActionTrig, ROSEE::ActionSingleJointMultipleTips, and ROSEE::ActionPinchGeneric.
unsigned int ROSEE::ActionPrimitive::getMaxStoredActionStates | ( | ) | const |
Definition at line 53 of file ActionPrimitive.cpp.
unsigned int ROSEE::ActionPrimitive::getnFingersInvolved | ( | ) | const |
Definition at line 57 of file ActionPrimitive.cpp.
ROSEE::ActionPrimitive::Type ROSEE::ActionPrimitive::getPrimitiveType | ( | ) | const |
Definition at line 49 of file ActionPrimitive.cpp.
void ROSEE::ActionPrimitive::setJointsInvolvedCount | ( | ROSEE::JointsInvolvedCount | jointsInvolvedCount | ) |
Definition at line 61 of file ActionPrimitive.cpp.
|
protected |
Definition at line 95 of file ActionPrimitive.h.
|
protected |
Definition at line 92 of file ActionPrimitive.h.
|
protected |
Definition at line 97 of file ActionPrimitive.h.