All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Classes | Public Member Functions | Protected Attributes | List of all members
OpenRAVE::planningutils::ManipulatorIKGoalSampler Class Reference

Samples numsamples of solutions and each solution to vsolutions. More...

#include <planningutils.h>

Collaboration diagram for OpenRAVE::planningutils::ManipulatorIKGoalSampler:
Collaboration graph


struct  SampleInfo

Public Member Functions

 ManipulatorIKGoalSampler (RobotBase::ManipulatorConstPtr pmanip, const std::list< IkParameterization > &listparameterizations, int nummaxsamples=20, int nummaxtries=10, dReal fsampleprob=1, bool searchfreeparameters=true)
virtual ~ManipulatorIKGoalSampler ()
virtual IkReturnPtr Sample ()
 if can sample, returns IkReturn pointer
virtual bool Sample (std::vector< dReal > &vgoal)
bool SampleAll (std::list< IkReturnPtr > &samples, int maxsamples=0, int maxchecksamples=0)
 samples the rests of the samples until cannot be sampled anymore.
virtual int GetIkParameterizationIndex (int index)
virtual void SetSamplingProb (dReal fsampleprob)
virtual void SetJitter (dReal maxdist)
 set a jitter distance for the goal

Protected Attributes

RobotBasePtr _probot
RobotBase::ManipulatorConstPtr _pmanip
int _nummaxsamples
int _nummaxtries
std::list< SampleInfo_listsamples
SpaceSamplerBasePtr _pindexsampler
dReal _fsampleprob
dReal _fjittermaxdist
CollisionReportPtr _report
std::vector< IkReturnPtr_vikreturns
std::list< int > _listreturnedsamples
std::vector< dReal_vfreestart
int _tempikindex
 if _vikreturns.size() > 0, points to the original ik index of those solutions
bool _searchfreeparameters

Detailed Description

Samples numsamples of solutions and each solution to vsolutions.

nummaxsamplesthe max samples to query from a particular workspace goal. This does not necessarily mean every goal will have this many samples.
nummaxtriesnumber of attemps to return a goal per Sample call.
fsampleprobThe probability to attempt to sample a goal
searchfreeparametersif true, will search all the free parameters of the manipulator. Otherwise will use the current free parameters set on the robot

Definition at line 380 of file planningutils.h.

Constructor & Destructor Documentation

OpenRAVE::planningutils::ManipulatorIKGoalSampler::ManipulatorIKGoalSampler ( RobotBase::ManipulatorConstPtr  pmanip,
const std::list< IkParameterization > &  listparameterizations,
int  nummaxsamples = 20,
int  nummaxtries = 10,
dReal  fsampleprob = 1,
bool  searchfreeparameters = true 

Definition at line 1767 of file planningutils.cpp.

virtual OpenRAVE::planningutils::ManipulatorIKGoalSampler::~ManipulatorIKGoalSampler ( )

Definition at line 384 of file planningutils.h.

Member Function Documentation

int OpenRAVE::planningutils::ManipulatorIKGoalSampler::GetIkParameterizationIndex ( int  index)

Definition at line 1973 of file planningutils.cpp.

IkReturnPtr OpenRAVE::planningutils::ManipulatorIKGoalSampler::Sample ( )

if can sample, returns IkReturn pointer

Definition at line 1800 of file planningutils.cpp.

bool OpenRAVE::planningutils::ManipulatorIKGoalSampler::Sample ( std::vector< dReal > &  vgoal)

Definition at line 1789 of file planningutils.cpp.

bool OpenRAVE::planningutils::ManipulatorIKGoalSampler::SampleAll ( std::list< IkReturnPtr > &  samples,
int  maxsamples = 0,
int  maxchecksamples = 0 

samples the rests of the samples until cannot be sampled anymore.

vsamplesvector is rest with samples
maxsamplesmax successful samples to gather before returning. If 0, will gather all.
maxchecksamplesmax samples to check before returning. If 0, will check all.
true if a sample was inserted into vsamples

Definition at line 1950 of file planningutils.cpp.

void OpenRAVE::planningutils::ManipulatorIKGoalSampler::SetJitter ( dReal  maxdist)

set a jitter distance for the goal

maxdistIf > 0, allows jittering of the goal IK if they cause the robot to be in collision and no IK solutions to be found

Definition at line 1986 of file planningutils.cpp.

void OpenRAVE::planningutils::ManipulatorIKGoalSampler::SetSamplingProb ( dReal  fsampleprob)

Definition at line 1981 of file planningutils.cpp.

Member Data Documentation

dReal OpenRAVE::planningutils::ManipulatorIKGoalSampler::_fjittermaxdist

Definition at line 423 of file planningutils.h.

dReal OpenRAVE::planningutils::ManipulatorIKGoalSampler::_fsampleprob

Definition at line 423 of file planningutils.h.

std::list<int> OpenRAVE::planningutils::ManipulatorIKGoalSampler::_listreturnedsamples

Definition at line 426 of file planningutils.h.

std::list<SampleInfo> OpenRAVE::planningutils::ManipulatorIKGoalSampler::_listsamples

Definition at line 421 of file planningutils.h.

int OpenRAVE::planningutils::ManipulatorIKGoalSampler::_nummaxsamples

Definition at line 420 of file planningutils.h.

int OpenRAVE::planningutils::ManipulatorIKGoalSampler::_nummaxtries

Definition at line 420 of file planningutils.h.

SpaceSamplerBasePtr OpenRAVE::planningutils::ManipulatorIKGoalSampler::_pindexsampler

Definition at line 422 of file planningutils.h.

RobotBase::ManipulatorConstPtr OpenRAVE::planningutils::ManipulatorIKGoalSampler::_pmanip

Definition at line 419 of file planningutils.h.

RobotBasePtr OpenRAVE::planningutils::ManipulatorIKGoalSampler::_probot

Definition at line 418 of file planningutils.h.

CollisionReportPtr OpenRAVE::planningutils::ManipulatorIKGoalSampler::_report

Definition at line 424 of file planningutils.h.

bool OpenRAVE::planningutils::ManipulatorIKGoalSampler::_searchfreeparameters

Definition at line 429 of file planningutils.h.

int OpenRAVE::planningutils::ManipulatorIKGoalSampler::_tempikindex

if _vikreturns.size() > 0, points to the original ik index of those solutions

Definition at line 428 of file planningutils.h.

std::vector<dReal> OpenRAVE::planningutils::ManipulatorIKGoalSampler::_vfreestart

Definition at line 427 of file planningutils.h.

std::vector< IkReturnPtr > OpenRAVE::planningutils::ManipulatorIKGoalSampler::_vikreturns

Definition at line 425 of file planningutils.h.

The documentation for this class was generated from the following files: