openrave.org

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

[interface] Planner interface that generates trajectories for target objects to follow through the environment. If not specified, method is not multi-thread safe. See Planner Concepts. More...

#include <planner.h>

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

Classes

class  PlannerParameters
 Describes a common and serializable interface for planning parameters. More...
 
class  PlannerProgress
 Planner progress information passed to each callback function. More...
 

Public Types

typedef std::list< std::vector
< dReal > > 
ConfigurationList
 
typedef boost::shared_ptr
< PlannerBase::ConfigurationList
ConfigurationListPtr
 
typedef boost::shared_ptr
< PlannerBase::PlannerParameters
PlannerParametersPtr
 
typedef boost::shared_ptr
< PlannerBase::PlannerParameters
const > 
PlannerParametersConstPtr
 
typedef boost::weak_ptr
< PlannerBase::PlannerParameters
PlannerParametersWeakPtr
 
typedef boost::function
< PlannerAction(const
PlannerProgress &)> 
PlanCallbackFn
 Callback function during planner execute.
 
- Public Types inherited from OpenRAVE::InterfaceBase
typedef std::map< std::string,
XMLReadablePtr,
CaseInsensitiveCompare
READERSMAP
 

Public Member Functions

 PlannerBase (EnvironmentBasePtr penv)
 
virtual ~PlannerBase ()
 
virtual bool InitPlan (RobotBasePtr robot, PlannerParametersConstPtr params)=0
 Setup scene, robot, and properties of the plan, and reset all internal structures.
 
virtual bool InitPlan (RobotBasePtr robot, std::istream &isParameters)
 Setup scene, robot, and properties of the plan, and reset all structures with pparams.
 
virtual PlannerStatus PlanPath (TrajectoryBasePtr ptraj)=0
 Executes the main planner trying to solve for the goal condition.
 
virtual PlannerStatus PlanPath (TrajectoryBasePtr ptraj, boost::shared_ptr< std::ostream > pOutStream) RAVE_DEPRECATED
 
virtual PlannerParametersConstPtr GetParameters () const =0
 return the internal parameters of the planner
 
virtual UserDataPtr RegisterPlanCallback (const PlanCallbackFn &callbackfn)
 register a function that is called periodically during the plan loop.
 
- 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 ()
 

Protected Member Functions

PlannerBasePtr shared_planner ()
 
PlannerBaseConstPtr shared_planner_const () const
 
virtual PlannerStatus _ProcessPostPlanners (RobotBasePtr probot, TrajectoryBasePtr ptraj)
 Calls a planner to optimizes the trajectory path.
 
virtual bool _OptimizePath (RobotBasePtr probot, TrajectoryBasePtr ptraj) RAVE_DEPRECATED
 
virtual PlannerAction _CallCallbacks (const PlannerProgress &progress)
 Calls the registered callbacks in order and returns immediately when an action other than PA_None is returned.
 
- 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
 

Additional Inherited Members

- Protected Types inherited from OpenRAVE::InterfaceBase
typedef boost::function< bool(std::ostream
&, std::istream &)> 
InterfaceCommandFn
 The function to be executed for every command.
 
- Protected Attributes inherited from OpenRAVE::InterfaceBase
std::string __description
 

Detailed Description

[interface] Planner interface that generates trajectories for target objects to follow through the environment. If not specified, method is not multi-thread safe. See Planner Concepts.

Definition at line 47 of file planner.h.

Member Typedef Documentation

typedef std::list< std::vector<dReal> > OpenRAVE::PlannerBase::ConfigurationList

Definition at line 50 of file planner.h.

Definition at line 51 of file planner.h.

Callback function during planner execute.

Parameters
progressplanner progress information

Definition at line 394 of file planner.h.

Definition at line 335 of file planner.h.

Definition at line 334 of file planner.h.

Definition at line 336 of file planner.h.

Constructor & Destructor Documentation

OpenRAVE::PlannerBase::PlannerBase ( EnvironmentBasePtr  penv)

Definition at line 741 of file planner.cpp.

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

Definition at line 347 of file planner.h.

Member Function Documentation

PlannerAction OpenRAVE::PlannerBase::_CallCallbacks ( const PlannerProgress progress)
protectedvirtual

Calls the registered callbacks in order and returns immediately when an action other than PA_None is returned.

Parameters
progressplanner progress information

Definition at line 797 of file planner.cpp.

virtual bool OpenRAVE::PlannerBase::_OptimizePath ( RobotBasePtr  probot,
TrajectoryBasePtr  ptraj 
)
inlineprotectedvirtual

Definition at line 420 of file planner.h.

PlannerStatus OpenRAVE::PlannerBase::_ProcessPostPlanners ( RobotBasePtr  probot,
TrajectoryBasePtr  ptraj 
)
protectedvirtual

Calls a planner to optimizes the trajectory path.

The PlannerParameters structure passed into the optimization planner is constructed with the same freespace constraints as this planner. This function should always be called in PlanPath to post-process the trajectory.

Parameters
probotthe robot this trajectory is meant for, also uses the robot for checking collisions.
ptrajInitial trajectory to be smoothed is inputted. If optimization path succeeds, final trajectory output is set in this variable. The trajectory is for the configuration degrees of freedom defined by the planner parameters.

Definition at line 761 of file planner.cpp.

static InterfaceType OpenRAVE::PlannerBase::GetInterfaceTypeStatic ( )
inlinestatic
Returns
the static interface type this class points to (used for safe casting)

Definition at line 351 of file planner.h.

virtual PlannerParametersConstPtr OpenRAVE::PlannerBase::GetParameters ( ) const
pure virtual

return the internal parameters of the planner

virtual bool OpenRAVE::PlannerBase::InitPlan ( RobotBasePtr  robot,
PlannerParametersConstPtr  params 
)
pure virtual

Setup scene, robot, and properties of the plan, and reset all internal structures.

Parameters
robotmain robot to be used for planning
paramsThe parameters of the planner, any class derived from PlannerParameters can be passed. The planner should copy these parameters for future instead of storing the pointer.
bool OpenRAVE::PlannerBase::InitPlan ( RobotBasePtr  robot,
std::istream &  isParameters 
)
virtual

Setup scene, robot, and properties of the plan, and reset all structures with pparams.

Parameters
robotmain robot to be used for planning
isParametersThe serialized form of the parameters. By default, this exists to allow third parties to pass information to planners without excplicitly knowning the format/internal structures used
Returns
true if plan is initialized successfully and initial conditions are satisfied.

Definition at line 745 of file planner.cpp.

virtual PlannerStatus OpenRAVE::PlannerBase::PlanPath ( TrajectoryBasePtr  ptraj)
pure virtual

Executes the main planner trying to solve for the goal condition.

Fill ptraj with the trajectory of the planned path that the robot needs to execute

Parameters
ptrajThe output trajectory the robot has to follow in order to successfully complete the plan. If this planner is a path optimizer, the trajectory can be used as an input for generating a smoother path. The trajectory is for the configuration degrees of freedom defined by the planner parameters.
Returns
the status that the planner returned in.
virtual PlannerStatus OpenRAVE::PlannerBase::PlanPath ( TrajectoryBasePtr  ptraj,
boost::shared_ptr< std::ostream >  pOutStream 
)
inlinevirtual
Deprecated:
(11/10/03)

Definition at line 380 of file planner.h.

UserDataPtr OpenRAVE::PlannerBase::RegisterPlanCallback ( const PlanCallbackFn callbackfn)
virtual

register a function that is called periodically during the plan loop.

Allows the calling process to control the behavior of the planner from a high-level perspective

Definition at line 754 of file planner.cpp.

PlannerBasePtr OpenRAVE::PlannerBase::shared_planner ( )
inlineprotected

Definition at line 403 of file planner.h.

PlannerBaseConstPtr OpenRAVE::PlannerBase::shared_planner_const ( ) const
inlineprotected

Definition at line 406 of file planner.h.


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