DART  6.7.3
dart::planning::PathPlanner< R > Class Template Reference

The path planner class - a common interface to motion planners. More...

#include <PathPlanner.hpp>

Public Member Functions

 PathPlanner ()
 The default constructor. More...
 
 PathPlanner (simulation::World &world, bool bidirectional_=true, bool connect_=true, double stepSize_=0.1, std::size_t maxNodes_=1e6, double goalBias_=0.3)
 The desired constructor - you should use this one. More...
 
virtual ~PathPlanner ()
 The destructor. More...
 
bool planPath (dynamics::Skeleton *robot, const std::vector< int > &dofs, const Eigen::VectorXd &start, const Eigen::VectorXd &goal, std::list< Eigen::VectorXd > &path)
 Plan a path from a single start configuration to a single goal. More...
 
bool planPath (dynamics::Skeleton *robot, const std::vector< std::size_t > &dofs, const std::vector< Eigen::VectorXd > &start, const std::vector< Eigen::VectorXd > &goal, std::list< Eigen::VectorXd > &path)
 Plan a path from a set of start configurations to a set of goals. More...
 

Public Attributes

bool connect
 Whether we take a small step or shoot for the target node. More...
 
bool bidirectional
 Whether two trees try to meet each other or one goes for the goal. More...
 
double stepSize
 Step size from a node in the tree to the random/goal node. More...
 
double goalBias
 Choose btw goal and random value (for goal-biased search) More...
 
std::size_t maxNodes
 Maximum number of iterations the sampling would continue. More...
 
simulation::WorldPtr world
 The world that the robot is in (for obstacles and etc.) More...
 
R * start_rrt
 The rrt for unidirectional search. More...
 
R * goal_rrt
 The second rrt if bidirectional search is executed. More...
 

Private Member Functions

bool planSingleTreeRrt (dynamics::Skeleton *robot, const std::vector< int > &dofs, const std::vector< Eigen::VectorXd > &start, const Eigen::VectorXd &goal, std::list< Eigen::VectorXd > &path)
 Performs a unidirectional RRT with the given options. More...
 
bool planBidirectionalRrt (dynamics::Skeleton *robot, const std::vector< int > &dofs, const std::vector< Eigen::VectorXd > &start, const std::vector< Eigen::VectorXd > &goal, std::list< Eigen::VectorXd > &path)
 Performs bidirectional RRT with the given options. More...
 

Detailed Description

template<class R = RRT>
class dart::planning::PathPlanner< R >

The path planner class - a common interface to motion planners.

Constructor & Destructor Documentation

◆ PathPlanner() [1/2]

template<class R = RRT>
dart::planning::PathPlanner< R >::PathPlanner ( )
inline

The default constructor.

◆ PathPlanner() [2/2]

template<class R = RRT>
dart::planning::PathPlanner< R >::PathPlanner ( simulation::World world,
bool  bidirectional_ = true,
bool  connect_ = true,
double  stepSize_ = 0.1,
std::size_t  maxNodes_ = 1e6,
double  goalBias_ = 0.3 
)
inline

The desired constructor - you should use this one.

◆ ~PathPlanner()

template<class R = RRT>
virtual dart::planning::PathPlanner< R >::~PathPlanner ( )
inlinevirtual

The destructor.

Member Function Documentation

◆ planBidirectionalRrt()

template<class R >
bool dart::planning::PathPlanner< R >::planBidirectionalRrt ( dynamics::Skeleton robot,
const std::vector< int > &  dofs,
const std::vector< Eigen::VectorXd > &  start,
const std::vector< Eigen::VectorXd > &  goal,
std::list< Eigen::VectorXd > &  path 
)
private

Performs bidirectional RRT with the given options.

NOTE This algorithm has several different popular implementations. The implementation in the kinodynamic paper (1999) by LaValle and Kuffner extend the two RRTs towards a common random configurations whereas here, first, start rrt extends towards a random node and creates some node N. Afterwards, the second rrt extends towards the node N and they continue swapping roles.

◆ planPath() [1/2]

template<class R = RRT>
bool dart::planning::PathPlanner< R >::planPath ( dynamics::Skeleton robot,
const std::vector< int > &  dofs,
const Eigen::VectorXd &  start,
const Eigen::VectorXd &  goal,
std::list< Eigen::VectorXd > &  path 
)
inline

Plan a path from a single start configuration to a single goal.

◆ planPath() [2/2]

template<class R >
bool dart::planning::PathPlanner< R >::planPath ( dynamics::Skeleton robot,
const std::vector< std::size_t > &  dofs,
const std::vector< Eigen::VectorXd > &  start,
const std::vector< Eigen::VectorXd > &  goal,
std::list< Eigen::VectorXd > &  path 
)

Plan a path from a set of start configurations to a set of goals.

◆ planSingleTreeRrt()

template<class R >
bool dart::planning::PathPlanner< R >::planSingleTreeRrt ( dynamics::Skeleton robot,
const std::vector< int > &  dofs,
const std::vector< Eigen::VectorXd > &  start,
const Eigen::VectorXd &  goal,
std::list< Eigen::VectorXd > &  path 
)
private

Performs a unidirectional RRT with the given options.

Member Data Documentation

◆ bidirectional

template<class R = RRT>
bool dart::planning::PathPlanner< R >::bidirectional

Whether two trees try to meet each other or one goes for the goal.

◆ connect

template<class R = RRT>
bool dart::planning::PathPlanner< R >::connect

Whether we take a small step or shoot for the target node.

◆ goal_rrt

template<class R = RRT>
R* dart::planning::PathPlanner< R >::goal_rrt

The second rrt if bidirectional search is executed.

◆ goalBias

template<class R = RRT>
double dart::planning::PathPlanner< R >::goalBias

Choose btw goal and random value (for goal-biased search)

◆ maxNodes

template<class R = RRT>
std::size_t dart::planning::PathPlanner< R >::maxNodes

Maximum number of iterations the sampling would continue.

◆ start_rrt

template<class R = RRT>
R* dart::planning::PathPlanner< R >::start_rrt

The rrt for unidirectional search.

◆ stepSize

template<class R = RRT>
double dart::planning::PathPlanner< R >::stepSize

Step size from a node in the tree to the random/goal node.

◆ world

template<class R = RRT>
simulation::WorldPtr dart::planning::PathPlanner< R >::world

The world that the robot is in (for obstacles and etc.)