Public Member Functions | Private Attributes
base_local_planner::SimpleScoredSamplingPlanner Class Reference

Generates a local plan using the given generator and cost functions. Assumes less cost are best, and negative costs indicate infinite costs. More...

#include <simple_scored_sampling_planner.h>

Inheritance diagram for base_local_planner::SimpleScoredSamplingPlanner:
Inheritance graph

List of all members.

Public Member Functions

bool findBestTrajectory (Trajectory &traj, std::vector< Trajectory > *all_explored=0)
double scoreTrajectory (Trajectory &traj, double best_traj_cost)
 SimpleScoredSamplingPlanner ()
 SimpleScoredSamplingPlanner (std::vector< TrajectorySampleGenerator * > gen_list, std::vector< TrajectoryCostFunction * > &critics, int max_samples=-1)
 ~SimpleScoredSamplingPlanner ()

Private Attributes

< TrajectoryCostFunction * > 
< TrajectorySampleGenerator * > 
int max_samples_

Detailed Description

Generates a local plan using the given generator and cost functions. Assumes less cost are best, and negative costs indicate infinite costs.

This is supposed to be a simple and robust implementation of the TrajectorySearch interface. More efficient search may well be possible using search heuristics, parallel search, etc.

Definition at line 58 of file simple_scored_sampling_planner.h.

Constructor & Destructor Documentation

Definition at line 61 of file simple_scored_sampling_planner.h.

Definition at line 63 of file simple_scored_sampling_planner.h.

base_local_planner::SimpleScoredSamplingPlanner::SimpleScoredSamplingPlanner ( std::vector< TrajectorySampleGenerator * >  gen_list,
std::vector< TrajectoryCostFunction * > &  critics,
int  max_samples = -1 

Takes a list of generators and critics. Critics return costs > 0, or negative costs for invalid trajectories. Generators other than the first are fallback generators, meaning they only get to generate if the previous generator did not find a valid trajectory. Will use every generator until it stops returning trajectories or count reaches max_samples. Then resets count and tries for the next in the list. passing max_samples = -1 (default): Each Sampling planner will continue to call generator until generator runs out of samples (or forever if that never happens)

Definition at line 44 of file simple_scored_sampling_planner.cpp.

Member Function Documentation

bool base_local_planner::SimpleScoredSamplingPlanner::findBestTrajectory ( Trajectory traj,
std::vector< Trajectory > *  all_explored = 0 
) [virtual]

Calls generator until generator has no more samples or max_samples is reached. For each generated traj, calls critics in turn. If any critic returns negative value, that value is assumed as costs, else the costs are the sum of all critics result. Returns true and sets the traj parameter to the first trajectory with minimal non-negative costs if sampling yields trajectories with non-negative costs, else returns false.

trajThe container to write the result to
all_exploredpass NULL or a container to collect all trajectories for debugging (has a penalty)

Implements base_local_planner::TrajectorySearch.

Definition at line 81 of file simple_scored_sampling_planner.cpp.

double base_local_planner::SimpleScoredSamplingPlanner::scoreTrajectory ( Trajectory traj,
double  best_traj_cost 

runs all scoring functions over the trajectory creating a weigthed sum of positive costs, aborting as soon as a negative cost are found or costs greater than positive best_traj_cost accumulated

Definition at line 50 of file simple_scored_sampling_planner.cpp.

Member Data Documentation

Definition at line 99 of file simple_scored_sampling_planner.h.

Definition at line 98 of file simple_scored_sampling_planner.h.

Definition at line 101 of file simple_scored_sampling_planner.h.

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

Author(s): Eitan Marder-Eppstein, Eric Perko
autogenerated on Mon Oct 6 2014 02:45:34