openrave.org

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Static Public Member Functions | List of all members
OpenRAVE::SpaceSamplerBase Class Referenceabstract

[interface] Contains space samplers commonly used in planners. If not specified, method is not multi-thread safe. See SpaceSampler Concepts. More...

#include <spacesampler.h>

Inheritance diagram for OpenRAVE::SpaceSamplerBase:
Inheritance graph
[legend]
Collaboration diagram for OpenRAVE::SpaceSamplerBase:
Collaboration graph
[legend]

Public Member Functions

 SpaceSamplerBase (EnvironmentBasePtr penv)
 
virtual ~SpaceSamplerBase ()
 
virtual void SetSeed (uint32_t seed) OPENRAVE_DUMMY_IMPLEMENTATION
 sets a new seed. For sequence samplers, the seed describes the n^th sample to begin at.
 
virtual void SetSpaceDOF (int dof) OPENRAVE_DUMMY_IMPLEMENTATION
 Sets the degrees of freedom of the space (note this is different from the parameterization dimension)
 
virtual int GetDOF () const =0
 returns the degrees of freedom of the sampling space
 
virtual int GetNumberOfValues () const =0
 Dimension of the return samples.
 
virtual bool Supports (SampleDataType type) const =0
 
virtual void GetLimits (std::vector< dReal > &vLowerLimit, std::vector< dReal > &vUpperLimit) const OPENRAVE_DUMMY_IMPLEMENTATION
 returns the minimum and maximum values returned for each dimension (size is GetNumberOfValues())
 
virtual void GetLimits (std::vector< uint32_t > &vLowerLimit, std::vector< uint32_t > &vUpperLimit) const OPENRAVE_DUMMY_IMPLEMENTATION
 returns the minimum and maximum values returned for each dimension (size is GetNumberOfValues())
 
virtual void SampleSequence (std::vector< dReal > &samples, size_t num=1, IntervalType interval=IT_Closed) OPENRAVE_DUMMY_IMPLEMENTATION
 sequentially sampling returning the next 'num' samples
 
virtual dReal SampleSequenceOneReal (IntervalType interval=IT_Closed)
 samples the real next value on the sequence, only valid for 1 DOF sequences.
 
virtual void SampleSequence (std::vector< uint32_t > &sample, size_t num=1) OPENRAVE_DUMMY_IMPLEMENTATION
 sequentially sampling returning the next 'num' samples
 
virtual uint32_t SampleSequenceOneUInt32 ()
 samples the unsigned integer next value on the sequence, only valid for 1 DOF sequences.
 
virtual void SampleComplete (std::vector< dReal > &samples, size_t num, IntervalType interval=IT_Closed) OPENRAVE_DUMMY_IMPLEMENTATION
 returns N samples that best approximate the entire sampling space.
 
virtual void SampleComplete (std::vector< uint32_t > &samples, size_t num) OPENRAVE_DUMMY_IMPLEMENTATION
 returns N samples that best approximate the entire sampling space.
 
- Public Member Functions inherited from OpenRAVE::InterfaceBase
 InterfaceBase (InterfaceType type, EnvironmentBasePtr penv)
 
virtual ~InterfaceBase ()
 
InterfaceType GetInterfaceType () const
 
const std::string & GetXMLId () const
 
const std::string & GetPluginName () const
 
EnvironmentBasePtr GetEnv () const
 
const READERSMAPGetReadableInterfaces () const
 Returns the raw map reference, this is not multithread safe and the GetInterfaceMutex should be locked before using.
 
virtual XMLReadablePtr GetReadableInterface (const std::string &xmltag) const
 Returns the readable interface. [multi-thread safe]
 
virtual XMLReadablePtr SetReadableInterface (const std::string &xmltag, XMLReadablePtr readable)
 Set a new readable interface and return the previously set interface if it exists. [multi-thread safe]
 
virtual const std::string & GetDescription () const
 Documentation of the interface in reStructuredText format. See Documenting Interfaces. [multi-thread safe]
 
virtual void SetDescription (const std::string &description)
 sets a description [multi-thread safe]
 
virtual void SetUserData (const std::string &key, UserDataPtr data) const
 set user data for a specific key. [multi-thread safe]
 
virtual UserDataPtr GetUserData (const std::string &key=std::string()) const
 return the user custom data [multi-thread safe]
 
virtual bool RemoveUserData (const std::string &key) const
 removes a user data pointer. if user data pointer does not exist, then return 0, otherwise 1. [multi-thread safe]
 
virtual void SetUserData (UserDataPtr data) RAVE_DEPRECATED
 
virtual const std::string & GetURI () const
 the URI used to load the interface (sometimes this is not possible if the definition lies inside an environment file). [multi-thread safe]
 
virtual const std::string & GetXMLFilename () const
 
virtual void Clone (InterfaceBaseConstPtr preference, int cloningoptions)
 Clone the contents of an interface to the current interface.
 
virtual bool SendCommand (std::ostream &os, std::istream &is)
 Used to send special commands to the interface and receive output.
 
virtual void Serialize (BaseXMLWriterPtr writer, int options=0) const
 serializes the interface
 

Static Public Member Functions

static InterfaceType GetInterfaceTypeStatic ()
 return the static interface type this class points to (used for safe casting)
 

Additional Inherited Members

- Public Types inherited from OpenRAVE::InterfaceBase
typedef std::map< std::string,
XMLReadablePtr,
CaseInsensitiveCompare
READERSMAP
 
- Protected Types inherited from OpenRAVE::InterfaceBase
typedef boost::function< bool(std::ostream
&, std::istream &)> 
InterfaceCommandFn
 The function to be executed for every command.
 
- Protected Member Functions inherited from OpenRAVE::InterfaceBase
virtual void RegisterCommand (const std::string &cmdname, InterfaceCommandFn fncmd, const std::string &strhelp)
 Registers a command and its help string. [multi-thread safe]
 
virtual void UnregisterCommand (const std::string &cmdname)
 Unregisters the command. [multi-thread safe]
 
virtual boost::shared_mutex & GetInterfaceMutex () const
 
- Protected Attributes inherited from OpenRAVE::InterfaceBase
std::string __description
 

Detailed Description

[interface] Contains space samplers commonly used in planners. If not specified, method is not multi-thread safe. See SpaceSampler Concepts.

Definition at line 43 of file spacesampler.h.

Constructor & Destructor Documentation

OpenRAVE::SpaceSamplerBase::SpaceSamplerBase ( EnvironmentBasePtr  penv)
inline

Definition at line 46 of file spacesampler.h.

virtual OpenRAVE::SpaceSamplerBase::~SpaceSamplerBase ( )
inlinevirtual

Definition at line 48 of file spacesampler.h.

Member Function Documentation

virtual int OpenRAVE::SpaceSamplerBase::GetDOF ( ) const
pure virtual

returns the degrees of freedom of the sampling space

static InterfaceType OpenRAVE::SpaceSamplerBase::GetInterfaceTypeStatic ( )
inlinestatic

return the static interface type this class points to (used for safe casting)

Definition at line 52 of file spacesampler.h.

virtual void OpenRAVE::SpaceSamplerBase::GetLimits ( std::vector< dReal > &  vLowerLimit,
std::vector< dReal > &  vUpperLimit 
) const
virtual

returns the minimum and maximum values returned for each dimension (size is GetNumberOfValues())

By default the limits should be in [0,1]^N.

virtual void OpenRAVE::SpaceSamplerBase::GetLimits ( std::vector< uint32_t > &  vLowerLimit,
std::vector< uint32_t > &  vUpperLimit 
) const
virtual

returns the minimum and maximum values returned for each dimension (size is GetNumberOfValues())

By default the limits should be [0,2^32-1]

virtual int OpenRAVE::SpaceSamplerBase::GetNumberOfValues ( ) const
pure virtual

Dimension of the return samples.

Number of values used to represent the parameterization of the space (>= dof). For example, let a quaternion describe a 3D rotation. The DOF of the space is 3, while the dimension of the returned samples is 4.

virtual void OpenRAVE::SpaceSamplerBase::SampleComplete ( std::vector< dReal > &  samples,
size_t  num,
IntervalType  interval = IT_Closed 
)
virtual

returns N samples that best approximate the entire sampling space.

The sampler can fail by returning an array of size 0.

virtual void OpenRAVE::SpaceSamplerBase::SampleComplete ( std::vector< uint32_t > &  samples,
size_t  num 
)
virtual

returns N samples that best approximate the entire sampling space.

The sampler can fail by returning an array of size 0.

virtual void OpenRAVE::SpaceSamplerBase::SampleSequence ( std::vector< dReal > &  samples,
size_t  num = 1,
IntervalType  interval = IT_Closed 
)
virtual

sequentially sampling returning the next 'num' samples

The sampler can fail by returning an array of size 0.

Parameters
samplethe values of the samples. This is a num*GetNumberOfValues() array.
numnumber of samples to return
intervalthe sampling intervel for each of the dimensions.
virtual void OpenRAVE::SpaceSamplerBase::SampleSequence ( std::vector< uint32_t > &  sample,
size_t  num = 1 
)
virtual

sequentially sampling returning the next 'num' samples

The sampler can fail by returning an array of size 0.

Parameters
samplethe values of the samples. This is a num*GetNumberOfValues() array.
numnumber of samples to return
virtual dReal OpenRAVE::SpaceSamplerBase::SampleSequenceOneReal ( IntervalType  interval = IT_Closed)
inlinevirtual

samples the real next value on the sequence, only valid for 1 DOF sequences.

Exceptions
openrave_exceptionthrow if could not be sampled

Definition at line 96 of file spacesampler.h.

virtual uint32_t OpenRAVE::SpaceSamplerBase::SampleSequenceOneUInt32 ( )
inlinevirtual

samples the unsigned integer next value on the sequence, only valid for 1 DOF sequences.

Exceptions
openrave_exceptionthrow if could not be sampled

Definition at line 116 of file spacesampler.h.

virtual void OpenRAVE::SpaceSamplerBase::SetSeed ( uint32_t  seed)
virtual

sets a new seed. For sequence samplers, the seed describes the n^th sample to begin at.

virtual void OpenRAVE::SpaceSamplerBase::SetSpaceDOF ( int  dof)
virtual

Sets the degrees of freedom of the space (note this is different from the parameterization dimension)

virtual bool OpenRAVE::SpaceSamplerBase::Supports ( SampleDataType  type) const
pure virtual

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