19 #ifndef __ROSEE_ACTIONPINCHTIGHT_H 20 #define __ROSEE_ACTIONPINCHTIGHT_H 23 #include <moveit/planning_scene/planning_scene.h> 24 #include <yaml-cpp/yaml.h> 65 std::vector < ROSEE::ActionPinchTight::StateWithContact >
getActionStates()
const;
81 void print ()
const override;
82 void emitYaml ( YAML::Emitter& )
const override;
83 bool fillFromYaml( YAML::const_iterator yamlIt )
override;
100 bool operator() (
const StateWithContact& a,
const StateWithContact& b)
const 101 {
return (std::abs(a.second.depth) > std::abs(b.second.depth) );}
115 #endif // __ROSEE_ACTIONPINCHTIGHT_H std::vector< ROSEE::ActionPinchTight::StateWithContact > getActionStates() const
Specific get for the ActionPinchTight to return the state with contact info.
void emitYaml(YAML::Emitter &) const override
Function to fill the argument passed with info about the action.
std::map< std::string, std::vector< double > > JointPos
The map to describe the position of all actuated joints.
A base virtual class for the PinchTight and PinchLoose classes.
std::pair< JointPos, collision_detection::Contact > StateWithContact
A pair to "link" the JointPos with infos about the collision among the two tips.
struct to put in order the actionStates.
bool operator()(const StateWithContact &a, const StateWithContact &b) const
void print() const override
For the pinch, we override these function to print, emit and parse the optional info Contact...
std::map< std::pair< std::string, std::string >, ActionPinchTight > Map
std::vector< ROSEE::JointPos > getAllJointPos() const override
Return all the joint position stored.
bool emitYamlForContact(collision_detection::Contact, YAML::Emitter &) const
private function to be called by the emitYaml
bool fillFromYaml(YAML::const_iterator yamlIt) override
function to fill members of the Action with infos taken from yaml files
const unsigned int maxStoredActionStates
std::set< StateWithContact, depthComp > actionStates
For each pair, we want a set of action because we want to store (in general) more possible way to do ...
The action of pinch with two tips.
JointPos getJointPos() const override
Get the position related to this action.
bool insertActionState(JointPos, collision_detection::Contact)
function to insert a single action in the actionStates set of possible action.