Klamp't
0.8.1
|
A real-time planner. Supports constant time-stepping or adaptive time-stepping. More...
#include <RealTimePlanner.h>
Public Types | |
enum | SplitUpdateProtocol { Constant, ExponentialBackoff, Learning } |
Public Member Functions | |
void | SetSpace (SingleRobotCSpace *space) |
Convenience fn: will set up the planner's robot, space, settings pointers. | |
void | SetConstantPath (const Config &q) |
Should be called at the start to initialize the start configuration. | |
void | SetCurrentPath (Real tglobal, const ParabolicRamp::DynamicPath &path) |
virtual void | Reset (shared_ptr< PlannerObjectiveBase > newgoal) |
Set the objective function. | |
shared_ptr< PlannerObjectiveBase > | Objective () const |
Gets the objective function. | |
virtual bool | PlanUpdate (Real tglobal, Real &splitTime, Real &planTime) |
bool | StopPlanning () |
Tells the planner to stop, when called from an external thread. | |
virtual void | MarkSendFailure () |
Public Attributes | |
shared_ptr< DynamicMotionPlannerBase > | planner |
Users must set these members before planning. More... | |
Real | pathStartTime |
Set the current path before planning, using SetConstantPath or SetCurrentPath. | |
ParabolicRamp::DynamicPath | currentPath |
shared_ptr< SendPathCallbackBase > | sendPathCallback |
Users should set this up to capture the outputted path. | |
Real | cognitiveMultiplier |
bool | acceptTimeOverruns |
SplitUpdateProtocol | protocol |
Real | currentSplitTime |
Real | currentPadding |
Real | currentExternalPadding |
Real | maxPadding |
StatCollector | planFailTimeStats |
Statistics captured on planning times, depending on PlanMore output. | |
StatCollector | planSuccessTimeStats |
StatCollector | planTimeoutTimeStats |
A real-time planner. Supports constant time-stepping or adaptive time-stepping.
Users must set up the underlying planner, the planning problem and may add in path sending hooks.
Setup: Given a world and a robotIndex (typically 0), assuming the robot model is set to its current configuration ...
Online: The planner should be launched in a parallel thread to the execution thread. The planning thread should maintain a global timer, synchronized with the execution thread.
|
virtual |
Called whenever the sendPathCallback returned false on a planned path (e.g., the padding was too short)
|
virtual |
Calls the planner, returns the splitting time and planning time. tglobal is a global clock synchronized between the planning and execution threads. Default implementation: fix the split time, call planner->PlanFrom Returns true if the path changed and planTime < splitTime
void RealTimePlanner::SetCurrentPath | ( | Real | tglobal, |
const ParabolicRamp::DynamicPath & | path | ||
) |
If the robot's path has changed for a reason outside of the planner's control, call this before planning
bool RealTimePlanner::acceptTimeOverruns |
Use only in simulation: set to true if you want to allow PlanFrom instances that overrun their alloted time to still update the path.
Real RealTimePlanner::cognitiveMultiplier |
Use only in simulation: multiplies the effective computational power of this machine (i.e., simulate a machine that's x times faster)
shared_ptr<DynamicMotionPlannerBase> RealTimePlanner::planner |
Users must set these members before planning.
The underlying planing algorithm