Simox  2.3.49
Saba::GraspIkRrt Class Reference
Inheritance diagram for Saba::GraspIkRrt:
Saba::BiRrt Saba::Rrt Saba::MotionPlanner

Public Member Functions

EIGEN_MAKE_ALIGNED_OPERATOR_NEW GraspIkRrt (CSpaceSampledPtr cspace, VirtualRobot::ManipulationObjectPtr object, VirtualRobot::AdvancedIKSolverPtr ikSolver, VirtualRobot::GraspSetPtr graspSet, float probabSampleGoal=0.1f)
 
virtual ~GraspIkRrt ()
 
virtual bool plan (bool bQuiet=false)
 
virtual void printConfig (bool printOnlyParams=false)
 
virtual bool setGoal (const Eigen::VectorXf &c)
 This is not allowed here, since we sample goal configurations during planning: If called an exception is thrown. More...
 
virtual void reset ()
 reset the planner More...
 
- Public Member Functions inherited from Saba::BiRrt
EIGEN_MAKE_ALIGNED_OPERATOR_NEW BiRrt (CSpaceSampledPtr cspace, RrtMethod modeA=eConnect, RrtMethod modeB=eConnect)
 
virtual ~BiRrt ()
 
virtual bool setStart (const Eigen::VectorXf &c)
 set start configuration More...
 
CSpaceTreePtr getTree2 ()
 
- Public Member Functions inherited from Saba::Rrt
 Rrt (CSpaceSampledPtr cspace, RrtMethod mode=eConnect, float probabilityExtendToGoal=0.1f)
 
virtual ~Rrt ()
 
void setProbabilityExtendToGoal (float p)
 
CSpaceTreePtr getTree ()
 
- Public Member Functions inherited from Saba::MotionPlanner
EIGEN_MAKE_ALIGNED_OPERATOR_NEW MotionPlanner (CSpacePtr cspace)
 
virtual ~MotionPlanner ()
 destructor More...
 
CSpacePathPtr getSolution ()
 
void setMaxCycles (unsigned int mc)
 
Eigen::VectorXf getStartConfig ()
 return start configuration More...
 
Eigen::VectorXf getGoalConfig ()
 return goal configuration More...
 
unsigned int getNrOfCycles ()
 check that planner is initialized More...
 
CSpacePtr getCSpace ()
 The CSpace. More...
 
virtual void stopExecution ()
 
void setName (std::string sName)
 Give the planner a name. More...
 
std::string getName ()
 The name of the planner. More...
 
float getPlanningTimeMS ()
 
virtual bool isInitialized ()
 returns true, when start and goal config have been set More...
 

Protected Member Functions

bool doPlanningCycle ()
 
bool searchNewGoal ()
 
bool checkGoalConfig (Eigen::VectorXf &config)
 
bool addIKSolution (Eigen::VectorXf &config, VirtualRobot::GraspPtr grasp)
 
- Protected Member Functions inherited from Saba::BiRrt
virtual bool createSolution (bool bQuiet=false)
 create the solution More...
 
- Protected Member Functions inherited from Saba::Rrt
virtual ExtensionResult extend (Eigen::VectorXf &c, CSpaceTreePtr tree, int &storeLastAddedID)
 
virtual ExtensionResult connectComplete (Eigen::VectorXf &c, CSpaceTreePtr tree, int &storeLastAddedID)
 
virtual ExtensionResult connectUntilCollision (Eigen::VectorXf &c, CSpaceTreePtr tree, int &storeLastAddedID)
 

Protected Attributes

float sampleGoalProbab
 
VirtualRobot::ManipulationObjectPtr object
 
VirtualRobot::AdvancedIKSolverPtr ikSolver
 
VirtualRobot::GraspSetPtr graspSet
 
VirtualRobot::RobotNodeSetPtr rns
 
VirtualRobot::GraspSetPtr graspSetWorking
 
bool found
 Indicates if a solution was found. More...
 
std::map< VirtualRobot::GraspPtr, Saba::CSpaceNodePtrgraspNodeMapping
 
std::vector< Eigen::VectorXf > ikSolutions
 
- Protected Attributes inherited from Saba::BiRrt
CSpaceTreePtr tree2
 the second tree More...
 
int lastAddedID2
 ID of last added node. More...
 
RrtMethod rrtMode2
 
- Protected Attributes inherited from Saba::Rrt
CSpaceTreePtr tree
 the rrt on which are operating More...
 
CSpaceNodePtr startNode
 start node (root of RRT) More...
 
CSpaceNodePtr goalNode
 goal node (set when RRT weas successfully connected to goalConfig) More...
 
Eigen::VectorXf tmpConfig
 tmp config More...
 
float extendGoToGoal
 the probability that the goal config is used instead of a randomly created configuration More...
 
float extendStepSize
 step size for one rrt extend (copied from cspace) More...
 
int lastAddedID
 ID of last added node. More...
 
RrtMethod rrtMode
 
- Protected Attributes inherited from Saba::MotionPlanner
CSpacePtr cspace
 the cspace on which are operating More...
 
CSpacePathPtr solution
 the solution More...
 
bool stopSearch
 indicates that the search should be interrupted More...
 
unsigned int dimension
 dimension of c-space More...
 
Eigen::VectorXf startConfig
 start config More...
 
bool startValid
 
Eigen::VectorXf goalConfig
 goal config More...
 
bool goalValid
 
unsigned int maxCycles
 maximum cycles for searching More...
 
unsigned int cycles
 current cycles done in the run method More...
 
std::string name
 Name of this planner (standard: "Motion Planner") More...
 
float planningTime
 

Additional Inherited Members

- Public Types inherited from Saba::Rrt
enum  RrtMethod { eExtend, eConnect, eConnectCompletePath }
 
enum  ExtensionResult { eError, eFailed, eSuccess, ePartial }
 

Detailed Description

The GraspIkRrt planner combines the search for a feasible grasp and an IK solution with the search for a collision-free motion.

Constructor & Destructor Documentation

Saba::GraspIkRrt::GraspIkRrt ( CSpaceSampledPtr  cspace,
VirtualRobot::ManipulationObjectPtr  object,
VirtualRobot::AdvancedIKSolverPtr  ikSolver,
VirtualRobot::GraspSetPtr  graspSet,
float  probabSampleGoal = 0.1f 
)

Constructor

Parameters
cspaceThe C-Space that should be used for collision detection
objectThe object to be grasped
ikSolverThe ikSolver that should be used
graspSetThe grasps, defining potential goal configurations.
probabSampleGoalProbability with which a goal config is created during planning loop.
Saba::GraspIkRrt::~GraspIkRrt ( )
virtual

Member Function Documentation

bool Saba::GraspIkRrt::addIKSolution ( Eigen::VectorXf &  config,
VirtualRobot::GraspPtr  grasp 
)
protected
bool Saba::GraspIkRrt::checkGoalConfig ( Eigen::VectorXf &  config)
protected
bool Saba::GraspIkRrt::doPlanningCycle ( )
protected
bool Saba::GraspIkRrt::plan ( bool  bQuiet = false)
virtual

do the planning (blocking method)

Returns
true if solution was found, otherwise false

Reimplemented from Saba::BiRrt.

void Saba::GraspIkRrt::printConfig ( bool  printOnlyParams = false)
virtual

Print setup of planner.

Parameters
printOnlyParamsIf set the decorating start and end is skipped (can be used to print derived classes).

Reimplemented from Saba::BiRrt.

void Saba::GraspIkRrt::reset ( )
virtual

reset the planner

Reimplemented from Saba::BiRrt.

bool Saba::GraspIkRrt::searchNewGoal ( )
protected
bool Saba::GraspIkRrt::setGoal ( const Eigen::VectorXf &  c)
virtual

This is not allowed here, since we sample goal configurations during planning: If called an exception is thrown.

Reimplemented from Saba::BiRrt.

Field Documentation

bool Saba::GraspIkRrt::found
protected

Indicates if a solution was found.

std::map< VirtualRobot::GraspPtr, Saba::CSpaceNodePtr > Saba::GraspIkRrt::graspNodeMapping
protected
VirtualRobot::GraspSetPtr Saba::GraspIkRrt::graspSet
protected
VirtualRobot::GraspSetPtr Saba::GraspIkRrt::graspSetWorking
protected
std::vector< Eigen::VectorXf > Saba::GraspIkRrt::ikSolutions
protected
VirtualRobot::AdvancedIKSolverPtr Saba::GraspIkRrt::ikSolver
protected
VirtualRobot::ManipulationObjectPtr Saba::GraspIkRrt::object
protected
VirtualRobot::RobotNodeSetPtr Saba::GraspIkRrt::rns
protected
float Saba::GraspIkRrt::sampleGoalProbab
protected