MRSL Motion Primitive Library  1.2
A motion primitive library for generating trajectory for mobile robots
Public Member Functions | Protected Attributes | List of all members
MPL::PlannerBase< Dim, Coord > Class Template Reference

Motion planning base util class. More...

#include <planner_base.h>

Public Member Functions

 PlannerBase (bool verbose=false)
 Simple constructor.
 
bool initialized ()
 Check if the planner has been initialized.
 
Trajectory< Dim > getTraj () const
 Get optimal trajectory.
 
vec_E< Primitive< Dim > > getValidPrimitives () const
 Get expanded collision free primitives.
 
vec_E< Primitive< Dim > > getAllPrimitives () const
 Get expanded primitives.
 
vec_Vecf< Dim > getOpenSet () const
 Get points in open set.
 
vec_Vecf< Dim > getCloseSet () const
 Get points in close set.
 
vec_Vecf< Dim > getNullSet () const
 Get points neither in open nor close set.
 
vec_Vecf< Dim > getStates (const Coord &state) const
 Get points at certain state.
 
vec_Vecf< Dim > getExpandedNodes () const
 Get expanded nodes, for A* it should be the same as the close set.
 
vec_E< Primitive< Dim > > getExpandedEdges () const
 Get expanded edges, for A* it should be the same as the close set.
 
int getExpandedNum () const
 Get number of expanded nodes.
 
void getSubStateSpace (int time_step)
 Prune state space. More...
 
decimal_t getTrajCost () const
 Get trajectory total cost.
 
void checkValidation ()
 Check tree validation.
 
void reset ()
 Reset state space.
 
void setLPAstar (bool use_lpastar)
 Set max vel in each axis.
 
void setVmax (decimal_t v)
 Set max vel in each axis.
 
void setAmax (decimal_t a)
 Set max acc in each axis.
 
void setJmax (decimal_t j)
 Set max jerk in each axis.
 
void setYawmax (decimal_t yaw)
 Set max jerk in each axis.
 
void setTmax (decimal_t t)
 Set max time step to explore.
 
void setDt (decimal_t dt)
 Set dt for each primitive.
 
void setW (decimal_t w)
 Set weight for cost in time.
 
void setWyaw (decimal_t w)
 Set weight for cost in time.
 
void setEpsilon (decimal_t eps)
 Set greedy searching param.
 
void setHeurIgnoreDynamics (bool ignore)
 Calculate heuristic using dynamics.
 
void setMaxNum (int num)
 Set max number of expansion.
 
void setU (const vec_E< VecDf > &U)
 Set U.
 
void setPriorTrajectory (const Trajectory< Dim > &traj)
 Set prior trajectory.
 
void setTol (decimal_t tol_pos, decimal_t tol_vel=-1, decimal_t tol_acc=-1)
 Set tolerance in geometric and dynamic spaces.
 
bool plan (const Coord &start, const Coord &goal)
 Planning thread. More...
 

Protected Attributes

std::shared_ptr< MPL::env_base< Dim > > ENV_
 Environment class.
 
std::shared_ptr< MPL::StateSpace< Dim, Coord > > ss_ptr_
 Planner workspace.
 
Trajectory< Dim > traj_
 Optimal trajectory.
 
decimal_t traj_cost_
 Total cost of final trajectory.
 
decimal_t epsilon_ = 1.0
 Greedy searching parameter.
 
int max_num_ = -1
 Maxmum number of expansion, -1 means no limitation.
 
bool use_lpastar_ = false
 Enable LPAstar for planning.
 
bool planner_verbose_
 Enabled to display debug message.
 

Detailed Description

template<int Dim, typename Coord>
class MPL::PlannerBase< Dim, Coord >

Motion planning base util class.

Member Function Documentation

◆ getSubStateSpace()

template<int Dim, typename Coord>
void MPL::PlannerBase< Dim, Coord >::getSubStateSpace ( int  time_step)
inline

Prune state space.

Parameters
time_stepset the root of state space to be the waypoint on the best trajectory at best_child_[time_step]

◆ plan()

template<int Dim, typename Coord>
bool MPL::PlannerBase< Dim, Coord >::plan ( const Coord &  start,
const Coord &  goal 
)
inline

Planning thread.

Parameters
startstart waypoint
goalgoal waypoint

The goal waypoint is the center of the goal region, the planner cannot find the trajectory hits the exact goal state due to discretization


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