Go to the documentation of this file. 1 #ifndef __ROSEE_FIND_ACTIONS_
2 #define __ROSEE_FIND_ACTIONS_
18 #define N_EXP_COLLISION 5000 //5000 is ok
19 #define N_EXP_DISTANCES 5000 //? is ok
20 #define N_EXP_COLLISION_MULTPINCH 3000
21 #define DEFAULT_JOINT_POS 0.0
39 FindActions ( std::shared_ptr < ROSEE::ParserMoveIt > parserMoveit ) ;
66 unsigned int nFinger, std::string path2saveYaml,
bool strict =
true );
78 std::string path2saveYaml );
80 std::map < std::string, ROSEE::ActionSingleJointMultipleTips>
findSingleJointMultipleTips (
unsigned int nFinger, std::string path2saveYaml );
87 std::map<std::string, std::pair<std::string, std::string>>
mimicNLRelMap;
154 robot_model::RobotModelPtr kinematic_model_noBound);
193 std::map <std::string, ActionTrig>
trig();
206 std::map <std::string, ROSEE::ActionTrig>
tipFlex();
217 std::map <std::string, ROSEE::ActionTrig>
fingFlex();
278 std::pair < std::string, std::string >
getFingersPair (std::pair <std::string, std::string> tipsPair)
const;
287 std::set <std::string>
getFingersSet (std::set <std::string> tipsSet)
const;
296 std::pair < std::string, std::string >
getFingertipsPair (std::pair <std::string, std::string> fingersPair)
const;
316 #endif //__ROSEE_FIND_ACTIONS_
std::map< std::string, std::pair< std::string, std::string > > mimicNLRelMap
std::map< std::set< std::string >, ROSEE::ActionMultiplePinchTight > findMultiplePinch(unsigned int nFinger, std::string path2saveYaml, bool strict=true)
Finder for MultiplePinch (a pinch done with more than 2 finger). This function return the found multp...
std::pair< std::string, std::string > getFingertipsPair(std::pair< std::string, std::string > fingersPair) const
Given the fingersPair, this function return the pair of their fingers, in lexicographical order.
void checkDistances(std::map< std::pair< std::string, std::string >, ROSEE::ActionPinchLoose > *mapOfLoosePinches)
Principal function which fill the mapOfLoosePinches basing on minumun distance between tips.
void checkWhichTipsCollideWithoutBounds(std::map< std::pair< std::string, std::string >, ROSEE::ActionPinchLoose > *mapOfLoosePinches)
Function similar to checkCollisions but used for Loose Pinches. First, we temporarily remove bounds o...
void fillNotCollidingTips(std::map< std::pair< std::string, std::string >, ROSEE::ActionPinchLoose > *mapOfLoosePinches, const std::map< std::pair< std::string, std::string >, ROSEE::ActionPinchTight > *mapOfPinches)
function to "initialize" the map of ActionPinchLoose mapOfLoosePinches. It is done adding all the tip...
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...
bool insertJointPosForTrigInMap(std::map< std::string, ActionTrig > &trigMap, ROSEE::ActionTrig action, std::string jointName, double trigValue)
Insert/update an ActionTrig in the trigMap. This is done setting the jointName position to the given ...
The action of pinch with two tips. The two tips must collide for some hand configuration to mark this...
void setToDefaultPositionPassiveJoints(moveit::core::RobotState *kinematic_state)
set to DEFAULT_JOINT_POS all the passive joints (defined so in the urdf file). this is necessary beca...
void setToRandomPositions(robot_state::RobotState *kinematic_state)
This function set the random position of joint considering:
std::pair< std::string, std::string > getFingersPair(std::pair< std::string, std::string > tipsPair) const
Giving as argument a pair of fingertips, this function return a pair of fingers that are the fingers ...
std::map< std::string, ROSEE::ActionTrig > findTrig(ROSEE::ActionPrimitive::Type actionType, std::string path2saveYaml)
Function to look for trigs (trig, tipFlex and fingFlex). The type of trig to be looked for is choosen...
Class to describe the action of "pinching" with more than 2 tips (with 2 tips there is the ActionPinc...
Class to check which fingertips collide (for the pinch action at the moment)
std::map< std::string, ROSEE::ActionSingleJointMultipleTips > findSingleJointMultipleTips(unsigned int nFinger, std::string path2saveYaml)
std::map< std::string, ROSEE::ActionTrig > fingFlex()
We start from each tip. Given a tip, we check if ParserMoveIt::getNExclusiveJointsOfTip >= 2 (see tip...
The action of moving some joints (see later) of a single finger in a full clousure position towards t...
std::set< std::string > getFingersSet(std::set< std::string > tipsSet) const
Function used when looking for multiple pinches. It returns the set containing the fingers of the pas...
JointPos getConvertedJointPos(const robot_state::RobotState *kinematic_state)
Utility function to take the actuated joint positions from a kinematic_state and returns the same inf...
ROSEE::JointsInvolvedCount setOnlyDependentJoints(std::pair< std::string, std::string > tipsNames, JointPos *jPos)
Given the contact, we want to know the state of the joint to replicate it. But we want to know only t...
std::map< std::string, ROSEE::ActionTrig > tipFlex()
We start from each tip. Given a tip, we look for all the joints that move this tip....
std::map< std::set< std::string >, ROSEE::ActionMultiplePinchTight > checkCollisionsForMultiplePinch(unsigned int nFinger, bool strict)
support function for findMultiplePinch (a pinch done with more than 2 finger). This is done similarly...
std::map< std::string, ActionTrig > trig()
trig is the action of closing a SINGLE finger towards the palm. The position is the bound which is fa...
void removeBoundsOfNotCollidingTips(const std::map< std::pair< std::string, std::string >, ROSEE::ActionPinchLoose > *mapOfLoosePinches, robot_model::RobotModelPtr kinematic_model_noBound)
Support function to remove the joint limits from the model. This is done when looking for Loose Pinch...
Type
Enum useful to discriminate each primitive action when, for example, we want to parse a file @remind ...
The action of pinch with two tips. The two tips must not collide ever (otherwise we have a TightPinch...
void changeFingertipsToFingerNames(std::map< std::pair< std::string, std::string >, ROSEE::ActionPinchTight > *mapOfPinches, std::map< std::pair< std::string, std::string >, ROSEE::ActionPinchLoose > *mapOfLoosePinches)
this function take the two tight and loose maps and change the keys from fingertips names to their fi...
FindActions(std::shared_ptr< ROSEE::ParserMoveIt > parserMoveit)
std::pair< std::map< std::pair< std::string, std::string >, ROSEE::ActionPinchTight >, std::map< std::pair< std::string, std::string >, ROSEE::ActionPinchLoose > > findPinch(std::string path2saveYaml)
Function to look for pinches, both Tight and Loose ones. It fill the maps (returned as pair),...
std::shared_ptr< ROSEE::ParserMoveIt > parserMoveIt
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::pair< std::string, std::string >, ROSEE::ActionPinchTight > checkCollisions()
principal function which check for collisions with moveit functions when looking for tight pinches
end-effector
Author(s): Luca Muratore
, Davide Torielli , Liana Bertoni
autogenerated on Sat Dec 14 2024 03:49:26