19 #ifndef __ROSEE_ACTION_H 20 #define __ROSEE_ACTION_H 25 #include <yaml-cpp/yaml.h> 40 typedef std::map <std::string, std::vector <double> >
JointPos;
43 std::ostream&
operator << (std::ostream& output,
const JointPos jp) ;
45 JointPos
operator * (
double multiplier, JointPos jp) ;
47 JointPos
operator * ( JointPos jp,
double multiplier ) ;
49 JointPos&
operator *= ( JointPos& jp,
double multiplier ) ;
51 JointPos
operator + ( JointPos jp1, JointPos jp2) ;
65 std::ostream&
operator << (std::ostream& output,
const JointsInvolvedCount jic);
75 typedef std::shared_ptr<Action>
Ptr;
76 typedef std::shared_ptr<const Action>
ConstPtr;
121 virtual std::vector < ROSEE::JointPos >
getAllJointPos ()
const = 0;
124 virtual void print ()
const ;
133 virtual void emitYaml ( YAML::Emitter& out )
const = 0;
139 virtual bool fillFromYaml ( YAML::const_iterator yamlIt ) = 0;
161 #endif // __ROSEE_ACTION_H std::set< std::string > getFingersInvolved() const
Get for fingersInvolved.
Type
Enum useful to discriminate each action when, for example, we want to parse a file if you change thi...
std::shared_ptr< const Action > ConstPtr
std::map< std::string, std::vector< double > > JointPos
The map to describe the position of all actuated joints. The key is the name of the string...
std::map< std::string, unsigned int > JointsInvolvedCount
The map to describe, how many times a joint is set by the action. An ActionPrimitive and an ActionCom...
JointsInvolvedCount getJointsInvolvedCount() const
Get for jointsInvolvedCount.
The pure virtual class representing an Action. It has members that are in common to all derived class...
JointPos operator+(JointPos jp1, JointPos jp2)
virtual bool fillFromYaml(YAML::const_iterator yamlIt)=0
function to fill members of the Action with infos taken from yaml files
std::ostream & operator<<(std::ostream &output, const JointPos jp)
virtual void emitYaml(YAML::Emitter &out) const =0
Function to fill the argument passed with info about the action. Pure virtual because each derived cl...
JointsInvolvedCount jointsInvolvedCount
JointPos & operator*=(JointPos &jp, double multiplier)
virtual JointPos getJointPos() const =0
Get the position related to this action. Pure Virtual function: the derived class store this info dif...
std::shared_ptr< Action > Ptr
virtual void print() const
Overridable functions, if we want to make them more action-specific.
JointPos & operator+=(JointPos &jp1, ROSEE::JointPos jp2)
std::string getName() const
Get the name of the action.
virtual std::vector< ROSEE::JointPos > getAllJointPos() const =0
Return all the joint position stored. If the concrete (derived from Action) has only one joint positi...
std::set< std::string > fingersInvolved
JointPos operator*(double multiplier, JointPos jp)