Describes a common and serializable interface for planning parameters. [詳細]
#include <planner.h>
構成 | |
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. | |
![]() | |
enum | ProcessElement { PE_Pass =0, PE_Support =1, PE_Ignore =2 } |
Public メソッド | |
PlannerParameters () | |
virtual | ~PlannerParameters () |
virtual PlannerParameters & | operator= (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. | |
![]() | |
BaseXMLReader () | |
virtual | ~BaseXMLReader () |
virtual XMLReadablePtr | GetReadable () |
![]() | |
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 | |
![]() | |
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< dReal > | vinitialconfig |
std::vector< dReal > | vgoalconfig |
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. | |
![]() | |
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.
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.
q0 | is the configuration the robot is coming from (currently set). |
q1 | is the configuration the robot should move to. |
interval | Specifies whether to check the end points of the interval for constraints |
configurations | Optional 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. |
typedef boost::function<dReal(const std::vector<dReal>&)> OpenRAVE::PlannerBase::PlannerParameters::CostFn |
typedef boost::function<void (std::vector<dReal>&,const std::vector<dReal>&)> OpenRAVE::PlannerBase::PlannerParameters::DiffStateFn |
typedef boost::function<dReal(const std::vector<dReal>&, const std::vector<dReal>&)> OpenRAVE::PlannerBase::PlannerParameters::DistMetricFn |
typedef boost::function<void (std::vector<dReal>&)> OpenRAVE::PlannerBase::PlannerParameters::GetStateFn |
typedef boost::function<dReal(const std::vector<dReal>&)> OpenRAVE::PlannerBase::PlannerParameters::GoalFn |
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)
q | the current state. In order to save computation, assumes this state is the currently set configuration. |
qdelta | the delta to add |
fromgoal | 1 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).
typedef boost::function<bool (std::vector<dReal>&)> OpenRAVE::PlannerBase::PlannerParameters::SampleFn |
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)
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)
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. |
typedef boost::function<void (const std::vector<dReal>&)> OpenRAVE::PlannerBase::PlannerParameters::SetStateFn |
typedef boost::shared_ptr<StateSaver> OpenRAVE::PlannerBase::PlannerParameters::StateSaverPtr |
OpenRAVE::PlannerBase::PlannerParameters::PlannerParameters | ( | ) |
planner.cpp の 89 行で定義されています。
|
inlinevirtual |
|
protectedvirtual |
gets called for all data in between tags.
ch | a string to the data |
OpenRAVE::BaseXMLReaderを実装しています。
OpenRAVE::WorkspaceTrajectoryParametersで再定義されています。
planner.cpp の 321 行で定義されています。
|
virtual |
planner.cpp の 153 行で定義されています。
|
protectedvirtual |
Gets called at the end of each "</type>" expression. In this case, name is "type"
name | of the tag, will be always lower case |
OpenRAVE::BaseXMLReaderを実装しています。
OpenRAVE::BasicRRTParameters, OpenRAVE::RRTParameters, OpenRAVE::WorkspaceTrajectoryParameters, OpenRAVE::ConstraintTrajectoryTimingParameters, OpenRAVE::TrajectoryTimingParameters, OpenRAVE::GraspParameters, OpenRAVE::GraspSetParameters, OpenRAVE::RAStarParameters, と OpenRAVE::ExplorationParametersで再定義されています。
planner.cpp の 261 行で定義されています。
|
inlinevirtual |
|
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.cpp の 114 行で定義されています。
|
protectedvirtual |
output the planner parameters in a string (in XML format)
options | if 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.cpp の 158 行で定義されています。
|
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:
openrave_exception | If the configuration specification is invalid or points to targets that are not present in the environment. |
planner.cpp の 552 行で定義されています。
|
virtual |
sets up the planner parameters to use the active joints of the robot
planner.cpp の 340 行で定義されています。
|
inlineprotected |
|
inlineprotected |
|
protectedvirtual |
Gets called in the beginning of each "<type>" expression. In this case, name is "type"
name | of the tag, will be always lower case |
atts | string of attributes where the first std::string is the attribute name and second is the value |
OpenRAVE::BaseXMLReaderを実装しています。
OpenRAVE::BasicRRTParameters, OpenRAVE::RRTParameters, OpenRAVE::WorkspaceTrajectoryParameters, OpenRAVE::ConstraintTrajectoryTimingParameters, OpenRAVE::TrajectoryTimingParameters, OpenRAVE::GraspParameters, OpenRAVE::GraspSetParameters, OpenRAVE::RAStarParameters, と OpenRAVE::ExplorationParametersで再定義されています。
planner.cpp の 206 行で定義されています。
|
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_exception | If not consistent, will throw an exception |
planner.cpp の 664 行で定義されています。
|
friend |
outputs the data and surrounds it with
<PlannerParameters>
tags
|
friend |
expects
<PlannerParameters>
to be the first token. Parses stream until
</PlannerParameters>
reached
CheckPathConstraintFn OpenRAVE::PlannerBase::PlannerParameters::_checkpathconstraintsfn |
ConfigurationSpecification OpenRAVE::PlannerBase::PlannerParameters::_configurationspecification |
DiffStateFn OpenRAVE::PlannerBase::PlannerParameters::_diffstatefn |
DistMetricFn OpenRAVE::PlannerBase::PlannerParameters::_distmetricfn |
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.
GetStateFn OpenRAVE::PlannerBase::PlannerParameters::_getstatefn |
NeighStateFn OpenRAVE::PlannerBase::PlannerParameters::_neighstatefn |
int OpenRAVE::PlannerBase::PlannerParameters::_nMaxIterations |
SampleGoalFn OpenRAVE::PlannerBase::PlannerParameters::_samplegoalfn |
SampleInitialFn OpenRAVE::PlannerBase::PlannerParameters::_sampleinitialfn |
SampleNeighFn OpenRAVE::PlannerBase::PlannerParameters::_sampleneighfn |
SetStateFn OpenRAVE::PlannerBase::PlannerParameters::_setstatefn |
std::string OpenRAVE::PlannerBase::PlannerParameters::_sExtraParameters |
std::string OpenRAVE::PlannerBase::PlannerParameters::_sPostProcessingParameters |
std::string OpenRAVE::PlannerBase::PlannerParameters::_sPostProcessingPlanner |
|
protected |
|
protected |
std::vector<dReal> OpenRAVE::PlannerBase::PlannerParameters::_vConfigAccelerationLimit |
std::vector<dReal> OpenRAVE::PlannerBase::PlannerParameters::_vConfigLowerLimit |
std::vector<dReal> OpenRAVE::PlannerBase::PlannerParameters::_vConfigResolution |
std::vector<dReal> OpenRAVE::PlannerBase::PlannerParameters::_vConfigUpperLimit |
std::vector<dReal> OpenRAVE::PlannerBase::PlannerParameters::_vConfigVelocityLimit |
|
protected |
std::vector<dReal> OpenRAVE::PlannerBase::PlannerParameters::vgoalconfig |
std::vector<dReal> OpenRAVE::PlannerBase::PlannerParameters::vinitialconfig |