openrave.org

 全て クラス ネームスペース ファイル 関数 変数 型定義 列挙型 列挙型の値 フレンド マクロ定義 グループ ページ
構成 | Public 型 | Public メソッド | Public 変数 | Protected メソッド | フレンド | すべてのメンバ一覧
クラス OpenRAVE::PlannerBase::PlannerParameters

Describes a common and serializable interface for planning parameters. [詳細]

#include <planner.h>

OpenRAVE::PlannerBase::PlannerParametersに対する継承グラフ
Inheritance graph
[凡例]
OpenRAVE::PlannerBase::PlannerParametersのコラボレーション図
Collaboration graph
[凡例]

構成

class  StateSaver
 saves and restores the state using PlannerParameters::_setstatefn and PlannerParameters::_getstatefn [詳細]
 

Public 型

typedef boost::shared_ptr
< StateSaver
StateSaverPtr
 
typedef boost::function< dReal(const
std::vector< dReal > &)> 
CostFn
 Cost function on the state pace (optional).
 
typedef boost::function< dReal(const
std::vector< dReal > &)> 
GoalFn
 Goal heuristic function.(optional)
 
typedef boost::function< dReal(const
std::vector< dReal > &, const
std::vector< dReal > &)> 
DistMetricFn
 Distance metric between configuration spaces (optional)
 
typedef boost::function< bool(const
std::vector< dReal > &, const
std::vector< dReal >
&, IntervalType,
PlannerBase::ConfigurationListPtr)> 
CheckPathConstraintFn
 Checks that all the constraints are satisfied between two configurations.
 
typedef boost::function< bool(std::vector
< dReal > &)> 
SampleFn
 Samples a random configuration (mandatory)
 
typedef boost::function< bool(std::vector
< dReal > &)> 
SampleGoalFn
 Samples a valid goal configuration (optional).
 
typedef boost::function< bool(std::vector
< dReal > &)> 
SampleInitialFn
 Samples a valid initial configuration (optional).
 
typedef boost::function< bool(std::vector
< dReal > &, const std::vector
< dReal > &, dReal)> 
SampleNeighFn
 Returns a random configuration around a neighborhood (optional).
 
typedef boost::function< void(const
std::vector< dReal > &)> 
SetStateFn
 Sets the state of the robot. Default is active robot joints (mandatory).
 
typedef boost::function< void(std::vector
< dReal > &)> 
GetStateFn
 Gets the state of the robot. Default is active robot joints (mandatory).
 
typedef boost::function< void(std::vector
< dReal > &, const std::vector
< dReal > &)> 
DiffStateFn
 Computes the difference of two states.
 
typedef boost::function< bool(std::vector
< dReal > &, const std::vector
< dReal > &, int)> 
NeighStateFn
 Adds a delta state to a curent state, acting like a next-nearest-neighbor function along a given direction.
 
- Public 型 inherited from OpenRAVE::BaseXMLReader
enum  ProcessElement { PE_Pass =0, PE_Support =1, PE_Ignore =2 }
 

Public メソッド

 PlannerParameters ()
 
virtual ~PlannerParameters ()
 
virtual PlannerParametersoperator= (const PlannerParameters &r)
 Attemps to copy data from one set of parameters to another in the safest manner.
 
virtual void copy (boost::shared_ptr< PlannerParameters const > r)
 
virtual void SetRobotActiveJoints (RobotBasePtr robot)
 sets up the planner parameters to use the active joints of the robot
 
virtual void SetConfigurationSpecification (EnvironmentBasePtr env, const ConfigurationSpecification &spec)
 sets up the planner parameters to use the configuration specification space
 
virtual void Validate () const
 veriries that the configuration space and all parameters are consistent
 
virtual int GetDOF () const
 Return the degrees of freedom of the planning configuration space.
 
- Public メソッド inherited from OpenRAVE::BaseXMLReader
 BaseXMLReader ()
 
virtual ~BaseXMLReader ()
 
virtual XMLReadablePtr GetReadable ()
 
- Public メソッド inherited from OpenRAVE::XMLReadable
 XMLReadable (const std::string &xmlid)
 
virtual ~XMLReadable ()
 
virtual const std::string & GetXMLId () const
 
virtual void Serialize (BaseXMLWriterPtr writer, int options=0) const
 serializes the interface
 
- Public メソッド inherited from OpenRAVE::UserData
virtual ~UserData ()
 

Public 変数

ConfigurationSpecification _configurationspecification
 the configuration specification in which the planner works in. This specification is passed to the trajecotry creation modules.
 
CostFn _costfn
 
GoalFn _goalfn
 
DistMetricFn _distmetricfn
 
CheckPathConstraintFn _checkpathconstraintsfn
 
SampleFn _samplefn
 
SampleGoalFn _samplegoalfn
 
SampleInitialFn _sampleinitialfn
 
SampleNeighFn _sampleneighfn
 
SetStateFn _setstatefn
 
GetStateFn _getstatefn
 
DiffStateFn _diffstatefn
 
NeighStateFn _neighstatefn
 
std::vector< dRealvinitialconfig
 
std::vector< dRealvgoalconfig
 
std::vector< dReal_vConfigLowerLimit
 the absolute limits of the configuration space.
 
std::vector< dReal_vConfigUpperLimit
 
std::vector< dReal_vConfigVelocityLimit
 the absolute velocity limits of each DOF of the configuration space.
 
std::vector< dReal_vConfigAccelerationLimit
 the absolute acceleration limits of each DOF of the configuration space.
 
std::vector< dReal_vConfigResolution
 the discretization resolution of each dimension of the configuration space
 
dReal _fStepLength
 a discretization between the path that connects two configurations
 
int _nMaxIterations
 maximum number of iterations before the planner gives up. If 0 or less, planner chooses best iterations.
 
std::string _sPostProcessingPlanner
 Specifies the planner that will perform the post-processing path smoothing before returning.
 
std::string _sPostProcessingParameters
 The serialized planner parameters to pass to the path optimizer.
 
std::string _sExtraParameters
 Extra parameters data that does not fit within this planner parameters structure, but is still important not to lose all the information.
 
- Public 変数 inherited from OpenRAVE::BaseXMLReader
std::string _filename
 XML filename/resource used for this class (can be empty)
 

Protected メソッド

boost::shared_ptr
< PlannerBase::PlannerParameters
shared_parameters ()
 
boost::shared_ptr
< PlannerBase::PlannerParameters
const > 
shared_parameters_const () const
 
virtual bool serialize (std::ostream &O, int options=0) const
 output the planner parameters in a string (in XML format)
 

フレンド

OPENRAVE_API std::ostream & operator<< (std::ostream &O, const PlannerParameters &v)
 outputs the data and surrounds it with
 
OPENRAVE_API std::istream & operator>> (std::istream &I, PlannerParameters &v)
 expects
 
std::stringstream _ss
 holds the data read by characters
 
boost::shared_ptr
< std::stringstream > 
_sslocal
 
std::vector< std::string > _vXMLParameters
 all the top-level XML parameter tags (lower case) that are handled by this parameter structure, should be registered in the constructor
 
virtual ProcessElement startElement (const std::string &name, const AttributesList &atts)
 
virtual bool endElement (const std::string &name)
 
virtual void characters (const std::string &ch)
 

説明

Describes a common and serializable interface for planning parameters.

The class is serializable to XML, so can be loaded from file or passed around the network. If extra parameters need to be specified, derive from this class and

Also allows the parameters and descriptions to be serialized to reStructuredText for documentation purposes.

例:
orplanning_door.cpp, orplanning_multirobot.cpp, と orplanning_planner.cpp.

planner.h63 行で定義されています。

型定義

typedef boost::function<bool (const std::vector<dReal>&, const std::vector<dReal>&, IntervalType, PlannerBase::ConfigurationListPtr)> OpenRAVE::PlannerBase::PlannerParameters::CheckPathConstraintFn

Checks that all the constraints are satisfied between two configurations.

The simplest and most fundamental constraint is line-collision checking. The robot goes from q0 to q1.

success = _checkpathconstraints(q0,q1,interval,configurations)

When called, q0 is guaranteed to be set on the robot. The function returns true if the path to q1 satisfies all the constraints of the planner. If q0==q1, and interval==IT_OpenStart or IT_OpenEnd, then only one configuration should be checked. It is recommended to use IT_OpenStart. Because this function can internally use neighstatefn, need to make sure that Q0->Q1 is going from initial to goal direction.

引数
q0is the configuration the robot is coming from (currently set).
q1is the configuration the robot should move to.
intervalSpecifies whether to check the end points of the interval for constraints
configurationsOptional argument that will hold the intermediate configuraitons checked between q0 and q1 configurations. The appended configurations will be all valid and in free space. They are appended after the items already stored on the list.

planner.h179 行で定義されています。

typedef boost::function<dReal(const std::vector<dReal>&)> OpenRAVE::PlannerBase::PlannerParameters::CostFn

Cost function on the state pace (optional).

cost = _costfn(config)

引数
costthe cost of being in the current state

planner.h142 行で定義されています。

typedef boost::function<void (std::vector<dReal>&,const std::vector<dReal>&)> OpenRAVE::PlannerBase::PlannerParameters::DiffStateFn

Computes the difference of two states.

_diffstatefn(q1,q2) -> q1 -= q2

An explicit difference function is necessary for correct interpolation when there are circular joints. Default is regular subtraction.

planner.h236 行で定義されています。

typedef boost::function<dReal(const std::vector<dReal>&, const std::vector<dReal>&)> OpenRAVE::PlannerBase::PlannerParameters::DistMetricFn

Distance metric between configuration spaces (optional)

distmetric(config1,config2)

Two configurations are considered the same when function returns 0.

planner.h160 行で定義されています。

typedef boost::function<void (std::vector<dReal>&)> OpenRAVE::PlannerBase::PlannerParameters::GetStateFn

Gets the state of the robot. Default is active robot joints (mandatory).

planner.h226 行で定義されています。

typedef boost::function<dReal(const std::vector<dReal>&)> OpenRAVE::PlannerBase::PlannerParameters::GoalFn

Goal heuristic function.(optional)

distance = _goalfn(config)

Goal is complete when returns 0

引数
distance- distance to closest goal

planner.h152 行で定義されています。

typedef boost::function<bool (std::vector<dReal>&,const std::vector<dReal>&, int)> OpenRAVE::PlannerBase::PlannerParameters::NeighStateFn

Adds a delta state to a curent state, acting like a next-nearest-neighbor function along a given direction.

success = _neighstatefn(q,qdelta,fromgoal) -> q = Filter(q+qdelta)

引数
qthe current state. In order to save computation, assumes this state is the currently set configuration.
qdeltathe delta to add
fromgoal1 if q is coming from a goal state, 0 if it is coming from an initial state

In RRTs this is used for the extension operation. The new state is stored in the first parameter q. Note that the function can also add a filter to the final destination (like projecting onto a constraint manifold).

planner.h249 行で定義されています。

typedef boost::function<bool (std::vector<dReal>&)> OpenRAVE::PlannerBase::PlannerParameters::SampleFn

Samples a random configuration (mandatory)

The dimension of the returned sample is the dimension of the configuration space. success = samplefn(newsample)

planner.h187 行で定義されています。

typedef boost::function<bool (std::vector<dReal>&)> OpenRAVE::PlannerBase::PlannerParameters::SampleGoalFn

Samples a valid goal configuration (optional).

If valid, the function should be called at every iteration. Any type of sampling probabilities and conditions can be encoded inside the function. The dimension of the returned sample is the dimension of the configuration space. success = samplegoalfn(newsample)

planner.h197 行で定義されています。

typedef boost::function<bool (std::vector<dReal>&)> OpenRAVE::PlannerBase::PlannerParameters::SampleInitialFn

Samples a valid initial configuration (optional).

If valid, the function should be called at every iteration. Any type of sampling probabilities and conditions can be encoded inside the function. The dimension of the returned sample is the dimension of the configuration space. success = sampleinitialfn(newsample)

planner.h207 行で定義されています。

typedef boost::function<bool (std::vector<dReal>&, const std::vector<dReal>&, dReal)> OpenRAVE::PlannerBase::PlannerParameters::SampleNeighFn

Returns a random configuration around a neighborhood (optional).

_sampleneighfn(newsample,pCurSample,fRadius)

引数
pCurSample- the neighborhood to sample around
fRadius- specifies the max distance of sampling. The higher the value, the farther the samples will go The distance metric can be arbitrary, but is usually PlannerParameters::pdistmetric.
戻り値
if sample was successfully generated return true, otherwise false

planner.h219 行で定義されています。

typedef boost::function<void (const std::vector<dReal>&)> OpenRAVE::PlannerBase::PlannerParameters::SetStateFn

Sets the state of the robot. Default is active robot joints (mandatory).

planner.h223 行で定義されています。

planner.h87 行で定義されています。

コンストラクタとデストラクタ

OpenRAVE::PlannerBase::PlannerParameters::PlannerParameters ( )

planner.cpp89 行で定義されています。

virtual OpenRAVE::PlannerBase::PlannerParameters::~PlannerParameters ( )
inlinevirtual

planner.h67 行で定義されています。

関数

void OpenRAVE::PlannerBase::PlannerParameters::characters ( const std::string &  ch)
protectedvirtual

gets called for all data in between tags.

引数
cha string to the data

OpenRAVE::BaseXMLReaderを実装しています。

OpenRAVE::WorkspaceTrajectoryParametersで再定義されています。

planner.cpp321 行で定義されています。

void OpenRAVE::PlannerBase::PlannerParameters::copy ( boost::shared_ptr< PlannerParameters const >  r)
virtual

planner.cpp153 行で定義されています。

bool OpenRAVE::PlannerBase::PlannerParameters::endElement ( const std::string &  name)
protectedvirtual

Gets called at the end of each "</type>" expression. In this case, name is "type"

引数
nameof the tag, will be always lower case
戻り値
true if XMLReader has finished parsing (one condition is that name==_fieldname) , otherwise false

OpenRAVE::BaseXMLReaderを実装しています。

OpenRAVE::BasicRRTParameters, OpenRAVE::RRTParameters, OpenRAVE::WorkspaceTrajectoryParameters, OpenRAVE::ConstraintTrajectoryTimingParameters, OpenRAVE::TrajectoryTimingParameters, OpenRAVE::GraspParameters, OpenRAVE::GraspSetParameters, OpenRAVE::RAStarParameters, と OpenRAVE::ExplorationParametersで再定義されています。

planner.cpp261 行で定義されています。

virtual int OpenRAVE::PlannerBase::PlannerParameters::GetDOF ( ) const
inlinevirtual

Return the degrees of freedom of the planning configuration space.

planner.h294 行で定義されています。

PlannerBase::PlannerParameters & OpenRAVE::PlannerBase::PlannerParameters::operator= ( const PlannerParameters r)
virtual

Attemps to copy data from one set of parameters to another in the safest manner.

First serializes the data of the right hand into a string, then initializes the current parameters via >> pointers to functions are copied directly

have to do this or otherwise precision gets lost and planners' initial conditions can vioalte constraints

planner.cpp114 行で定義されています。

bool OpenRAVE::PlannerBase::PlannerParameters::serialize ( std::ostream &  O,
int  options = 0 
) const
protectedvirtual

output the planner parameters in a string (in XML format)

引数
optionsif 1 will skip writing the extra parameters don't use PlannerParameters as a tag!

OpenRAVE::BasicRRTParameters, OpenRAVE::RRTParameters, OpenRAVE::WorkspaceTrajectoryParameters, OpenRAVE::ConstraintTrajectoryTimingParameters, OpenRAVE::TrajectoryTimingParameters, OpenRAVE::GraspParameters, OpenRAVE::GraspSetParameters, OpenRAVE::RAStarParameters, と OpenRAVE::ExplorationParametersで再定義されています。

planner.cpp158 行で定義されています。

void OpenRAVE::PlannerBase::PlannerParameters::SetConfigurationSpecification ( EnvironmentBasePtr  env,
const ConfigurationSpecification spec 
)
virtual

sets up the planner parameters to use the configuration specification space

The configuraiton groups should point to controllable target objects. By default, this includes:

  • joint_values
  • joint_velocities
  • affine_transform
  • affine_velocities
  • grab The following internal parameters will be set:
  • _diffstatefn
  • _distmetricfn - weights used for distance metric are retrieved at this time and stored
  • _samplefn
  • _sampleneighfn
  • _setstatefn
  • _getstatefn
  • _neighstatefn
  • _checkpathconstraintsfn
  • _vConfigLowerLimit
  • _vConfigUpperLimit
  • _vConfigVelocityLimit
  • _vConfigAccelerationLimit
  • _vConfigResolution
  • vinitialconfig
  • _configurationspecification
    例外
    openrave_exceptionIf the configuration specification is invalid or points to targets that are not present in the environment.

planner.cpp552 行で定義されています。

void OpenRAVE::PlannerBase::PlannerParameters::SetRobotActiveJoints ( RobotBasePtr  robot)
virtual

sets up the planner parameters to use the active joints of the robot

planner.cpp340 行で定義されています。

boost::shared_ptr<PlannerBase::PlannerParameters> OpenRAVE::PlannerBase::PlannerParameters::shared_parameters ( )
inlineprotected

planner.h299 行で定義されています。

boost::shared_ptr<PlannerBase::PlannerParameters const > OpenRAVE::PlannerBase::PlannerParameters::shared_parameters_const ( ) const
inlineprotected

planner.h302 行で定義されています。

BaseXMLReader::ProcessElement OpenRAVE::PlannerBase::PlannerParameters::startElement ( const std::string &  name,
const AttributesList atts 
)
protectedvirtual

Gets called in the beginning of each "<type>" expression. In this case, name is "type"

引数
nameof the tag, will be always lower case
attsstring of attributes where the first std::string is the attribute name and second is the value
戻り値
true if tag is accepted and this class will process it, otherwise false

OpenRAVE::BaseXMLReaderを実装しています。

OpenRAVE::BasicRRTParameters, OpenRAVE::RRTParameters, OpenRAVE::WorkspaceTrajectoryParameters, OpenRAVE::ConstraintTrajectoryTimingParameters, OpenRAVE::TrajectoryTimingParameters, OpenRAVE::GraspParameters, OpenRAVE::GraspSetParameters, OpenRAVE::RAStarParameters, と OpenRAVE::ExplorationParametersで再定義されています。

planner.cpp206 行で定義されています。

void OpenRAVE::PlannerBase::PlannerParameters::Validate ( ) const
virtual

veriries that the configuration space and all parameters are consistent

Assumes at minimum that _setstatefn and _getstatefn are set. Correct environment should be locked when this function is called since _getstatefn will be called.

例外
openrave_exceptionIf not consistent, will throw an exception

planner.cpp664 行で定義されています。

フレンドと関連する関数

OPENRAVE_API std::ostream& operator<< ( std::ostream &  O,
const PlannerParameters v 
)
friend

outputs the data and surrounds it with

<PlannerParameters> 

tags

OPENRAVE_API std::istream& operator>> ( std::istream &  I,
PlannerBase::PlannerParameters v 
)
friend

expects

<PlannerParameters> 

to be the first token. Parses stream until

</PlannerParameters> 

reached

変数

CheckPathConstraintFn OpenRAVE::PlannerBase::PlannerParameters::_checkpathconstraintsfn

planner.h180 行で定義されています。

ConfigurationSpecification OpenRAVE::PlannerBase::PlannerParameters::_configurationspecification

the configuration specification in which the planner works in. This specification is passed to the trajecotry creation modules.

planner.h136 行で定義されています。

CostFn OpenRAVE::PlannerBase::PlannerParameters::_costfn

planner.h143 行で定義されています。

DiffStateFn OpenRAVE::PlannerBase::PlannerParameters::_diffstatefn

planner.h237 行で定義されています。

DistMetricFn OpenRAVE::PlannerBase::PlannerParameters::_distmetricfn

planner.h161 行で定義されています。

dReal OpenRAVE::PlannerBase::PlannerParameters::_fStepLength

a discretization between the path that connects two configurations

This length represents how dense the samples get distributed across the configuration space. It represents the maximum distance between neighbors when adding new configuraitons. If 0 or less, planner chooses best step length.

planner.h275 行で定義されています。

GetStateFn OpenRAVE::PlannerBase::PlannerParameters::_getstatefn

planner.h227 行で定義されています。

GoalFn OpenRAVE::PlannerBase::PlannerParameters::_goalfn

planner.h153 行で定義されています。

NeighStateFn OpenRAVE::PlannerBase::PlannerParameters::_neighstatefn

planner.h250 行で定義されています。

int OpenRAVE::PlannerBase::PlannerParameters::_nMaxIterations

maximum number of iterations before the planner gives up. If 0 or less, planner chooses best iterations.

planner.h278 行で定義されています。

SampleFn OpenRAVE::PlannerBase::PlannerParameters::_samplefn

planner.h188 行で定義されています。

SampleGoalFn OpenRAVE::PlannerBase::PlannerParameters::_samplegoalfn

planner.h198 行で定義されています。

SampleInitialFn OpenRAVE::PlannerBase::PlannerParameters::_sampleinitialfn

planner.h208 行で定義されています。

SampleNeighFn OpenRAVE::PlannerBase::PlannerParameters::_sampleneighfn

planner.h220 行で定義されています。

SetStateFn OpenRAVE::PlannerBase::PlannerParameters::_setstatefn

planner.h224 行で定義されています。

std::string OpenRAVE::PlannerBase::PlannerParameters::_sExtraParameters

Extra parameters data that does not fit within this planner parameters structure, but is still important not to lose all the information.

planner.h291 行で定義されています。

std::string OpenRAVE::PlannerBase::PlannerParameters::_sPostProcessingParameters

The serialized planner parameters to pass to the path optimizer.

For example: std::stringstream(_sPostProcessingParameters) >> _parameters;

planner.h288 行で定義されています。

std::string OpenRAVE::PlannerBase::PlannerParameters::_sPostProcessingPlanner

Specifies the planner that will perform the post-processing path smoothing before returning.

If empty, will not path smooth the returned trajectories (used to measure algorithm time)

planner.h283 行で定義されています。

std::stringstream OpenRAVE::PlannerBase::PlannerParameters::_ss
protected

holds the data read by characters

planner.h316 行で定義されています。

boost::shared_ptr<std::stringstream> OpenRAVE::PlannerBase::PlannerParameters::_sslocal
protected

planner.h317 行で定義されています。

std::vector<dReal> OpenRAVE::PlannerBase::PlannerParameters::_vConfigAccelerationLimit

the absolute acceleration limits of each DOF of the configuration space.

planner.h264 行で定義されています。

std::vector<dReal> OpenRAVE::PlannerBase::PlannerParameters::_vConfigLowerLimit

the absolute limits of the configuration space.

planner.h258 行で定義されています。

std::vector<dReal> OpenRAVE::PlannerBase::PlannerParameters::_vConfigResolution

the discretization resolution of each dimension of the configuration space

planner.h267 行で定義されています。

std::vector<dReal> OpenRAVE::PlannerBase::PlannerParameters::_vConfigUpperLimit

planner.h258 行で定義されています。

std::vector<dReal> OpenRAVE::PlannerBase::PlannerParameters::_vConfigVelocityLimit

the absolute velocity limits of each DOF of the configuration space.

planner.h261 行で定義されています。

std::vector<std::string> OpenRAVE::PlannerBase::PlannerParameters::_vXMLParameters
protected

all the top-level XML parameter tags (lower case) that are handled by this parameter structure, should be registered in the constructor

planner.h319 行で定義されています。

std::vector<dReal> OpenRAVE::PlannerBase::PlannerParameters::vgoalconfig

planner.h255 行で定義されています。

std::vector<dReal> OpenRAVE::PlannerBase::PlannerParameters::vinitialconfig

to specify multiple initial or goal configurations, put them into the vector in series size always has to be a multiple of GetDOF() note: not all planners support multiple goals

planner.h255 行で定義されています。


このクラスの説明は次のファイルから生成されました: