Simox  2.3.74.0
GraspStudio::GenericGraspPlanner Class Reference
Inheritance diagram for GraspStudio::GenericGraspPlanner:
GraspStudio::GraspPlanner

Public Member Functions

 GenericGraspPlanner (VirtualRobot::GraspSetPtr graspSet, GraspStudio::GraspQualityMeasurePtr graspQuality, GraspStudio::ApproachMovementGeneratorPtr approach, float minQuality=0.0f, bool forceClosure=true)
 
virtual ~GenericGraspPlanner () override
 
int plan (int nrGrasps, int timeOutDuration=0, VirtualRobot::SceneObjectSetPtr obstacles={}) override
 
VirtualRobot::GraspPtr planGrasp (VirtualRobot::SceneObjectSetPtr obstacles={})
 
VirtualRobot::EndEffector::ContactInfoVector getContacts () const
 
void setParameters (float minQuality, bool forceClosure)
 
void setRetreatOnLowContacts (bool enable)
 
- Public Member Functions inherited from GraspStudio::GraspPlanner
 GraspPlanner (VirtualRobot::GraspSetPtr graspSet)
 
virtual ~GraspPlanner ()
 destructor More...
 
void setVerbose (bool enable)
 
std::vector< VirtualRobot::GraspPtrgetPlannedGrasps ()
 
GraspPlannerEvaluation getEvaluation () const
 getEvaluation More...
 
void clearEvaluation ()
 Clear the evaluation. More...
 

Protected Member Functions

bool moveEEFAway (const Eigen::Vector3f &approachDir, float step, int maxLoops)
 
bool timeout ()
 

Protected Attributes

VirtualRobot::SceneObjectPtr object
 
VirtualRobot::EndEffectorPtr eef
 
std::chrono::system_clock::time_point startTime
 
std::chrono::milliseconds timeOutDuration
 
VirtualRobot::EndEffector::ContactInfoVector contacts
 
GraspStudio::GraspQualityMeasurePtr graspQuality
 
GraspStudio::ApproachMovementGeneratorPtr approach
 
float minQuality
 
bool forceClosure
 
bool retreatOnLowContacts
 
- Protected Attributes inherited from GraspStudio::GraspPlanner
bool verbose
 
VirtualRobot::GraspSetPtr graspSet
 
std::vector< VirtualRobot::GraspPtrplannedGrasps
 
GraspPlannerEvaluation eval
 

Detailed Description

A general grasp planning class that utilizes ApprachMovementGenerator for generating grasp hypothesis and GraspQualityMeasure to score them.

Constructor & Destructor Documentation

◆ GenericGraspPlanner()

GraspStudio::GenericGraspPlanner::GenericGraspPlanner ( VirtualRobot::GraspSetPtr  graspSet,
GraspStudio::GraspQualityMeasurePtr  graspQuality,
GraspStudio::ApproachMovementGeneratorPtr  approach,
float  minQuality = 0.0f,
bool  forceClosure = true 
)

Constructor

Parameters
graspSetAll planned grasps are added to this GraspSet.
graspQualityThe quality of generated grasps is evaluated with this object
approachApproach movements are generated by this object.
minQualityThe quality that must be achieved at minimum by the GraspQualityMesurement module
forceClosureWhen true, only force closure grasps are generated.

◆ ~GenericGraspPlanner()

GraspStudio::GenericGraspPlanner::~GenericGraspPlanner ( )
overridevirtualdefault

Member Function Documentation

◆ getContacts()

VirtualRobot::EndEffector::ContactInfoVector GraspStudio::GenericGraspPlanner::getContacts ( ) const

◆ moveEEFAway()

bool GraspStudio::GenericGraspPlanner::moveEEFAway ( const Eigen::Vector3f &  approachDir,
float  step,
int  maxLoops 
)
protected

◆ plan()

int GraspStudio::GenericGraspPlanner::plan ( int  nrGrasps,
int  timeOutDuration = 0,
VirtualRobot::SceneObjectSetPtr  obstacles = {} 
)
overridevirtual

Creates new grasps.

Parameters
nrGraspsThe number of grasps to be planned.
timeOutMSThe time out in milliseconds. Planning is stopped when this time is exceeded. Disabled when zero.
Returns
Number of generated grasps.

Implements GraspStudio::GraspPlanner.

◆ planGrasp()

VirtualRobot::GraspPtr GraspStudio::GenericGraspPlanner::planGrasp ( VirtualRobot::SceneObjectSetPtr  obstacles = {})

◆ setParameters()

void GraspStudio::GenericGraspPlanner::setParameters ( float  minQuality,
bool  forceClosure 
)

◆ setRetreatOnLowContacts()

void GraspStudio::GenericGraspPlanner::setRetreatOnLowContacts ( bool  enable)

if enabled (default), the planner retreates the hand if the number of contacts is <2. During retreat, the contacts are checked if a better situation can be achieved. This procedure helps in case the object is small.

◆ timeout()

bool GraspStudio::GenericGraspPlanner::timeout ( )
protected

Field Documentation

◆ approach

GraspStudio::ApproachMovementGeneratorPtr GraspStudio::GenericGraspPlanner::approach
protected

◆ contacts

VirtualRobot::EndEffector::ContactInfoVector GraspStudio::GenericGraspPlanner::contacts
protected

◆ eef

VirtualRobot::EndEffectorPtr GraspStudio::GenericGraspPlanner::eef
protected

◆ forceClosure

bool GraspStudio::GenericGraspPlanner::forceClosure
protected

◆ graspQuality

GraspStudio::GraspQualityMeasurePtr GraspStudio::GenericGraspPlanner::graspQuality
protected

◆ minQuality

float GraspStudio::GenericGraspPlanner::minQuality
protected

◆ object

VirtualRobot::SceneObjectPtr GraspStudio::GenericGraspPlanner::object
protected

◆ retreatOnLowContacts

bool GraspStudio::GenericGraspPlanner::retreatOnLowContacts
protected

◆ startTime

std::chrono::system_clock::time_point GraspStudio::GenericGraspPlanner::startTime
protected

◆ timeOutDuration

std::chrono::milliseconds GraspStudio::GenericGraspPlanner::timeOutDuration
protected