An optimization objective which defines path cost using the idea of mechanical work. More...
#include <cost_map_2d_optimization_objective.h>
Public Member Functions | |
CostMap2DOptimizationObjective (const SpaceInformationPtr &si, double pathLengthWeight=0.0001) | |
Constructor. | |
void | createCostMap () |
Helper Function: calculate cost map. | |
void | getMinMaxPixels () |
Helper Function: gets the min and max values of the cost map. | |
double | getPathLengthWeight () const |
void | loadImage (std::string image_path) |
virtual ompl::base::Cost | motionCost (const State *s1, const State *s2) const |
Defines motion cost. | |
int | natRound (double x) const |
NatRounding helper function to make readings from cost map more accurate. | |
void | setCostMatrix (ompl_visual_tools::intMatrixPtr cost) |
Passed in a cost matrix loaded from an image file, etc. | |
ompl::base::Cost | stateCost (const State *state) const |
~CostMap2DOptimizationObjective () | |
Deconstructor. | |
Public Attributes | |
ompl_visual_tools::intMatrixPtr | cost_ |
ompl_visual_tools::PPMImage * | image_ |
double | max_cost_threshold_ |
double | max_cost_threshold_percent_ |
Protected Attributes | |
int | max_pixel_ |
int | min_pixel_ |
double | pathLengthWeight_ |
The weighing factor for the path length in the mechanical work objective formulation. |
An optimization objective which defines path cost using the idea of mechanical work.
Definition at line 70 of file cost_map_2d_optimization_objective.h.
ompl::base::CostMap2DOptimizationObjective::CostMap2DOptimizationObjective | ( | const SpaceInformationPtr & | si, |
double | pathLengthWeight = 0.0001 |
||
) | [inline] |
Constructor.
Definition at line 74 of file cost_map_2d_optimization_objective.h.
Deconstructor.
Definition at line 86 of file cost_map_2d_optimization_objective.h.
void ompl::base::CostMap2DOptimizationObjective::createCostMap | ( | ) | [inline] |
Helper Function: calculate cost map.
Definition at line 161 of file cost_map_2d_optimization_objective.h.
void ompl::base::CostMap2DOptimizationObjective::getMinMaxPixels | ( | ) | [inline] |
Helper Function: gets the min and max values of the cost map.
Definition at line 204 of file cost_map_2d_optimization_objective.h.
double ompl::base::CostMap2DOptimizationObjective::getPathLengthWeight | ( | ) | const [inline] |
Definition at line 91 of file cost_map_2d_optimization_objective.h.
void ompl::base::CostMap2DOptimizationObjective::loadImage | ( | std::string | image_path | ) | [inline] |
Definition at line 130 of file cost_map_2d_optimization_objective.h.
virtual ompl::base::Cost ompl::base::CostMap2DOptimizationObjective::motionCost | ( | const State * | s1, |
const State * | s2 | ||
) | const [inline, virtual] |
Defines motion cost.
Definition at line 97 of file cost_map_2d_optimization_objective.h.
int ompl::base::CostMap2DOptimizationObjective::natRound | ( | double | x | ) | const [inline] |
NatRounding helper function to make readings from cost map more accurate.
double |
Definition at line 125 of file cost_map_2d_optimization_objective.h.
void ompl::base::CostMap2DOptimizationObjective::setCostMatrix | ( | ompl_visual_tools::intMatrixPtr | cost | ) | [inline] |
Passed in a cost matrix loaded from an image file, etc.
Definition at line 115 of file cost_map_2d_optimization_objective.h.
ompl::base::Cost ompl::base::CostMap2DOptimizationObjective::stateCost | ( | const State * | state | ) | const [inline] |
Definition at line 104 of file cost_map_2d_optimization_objective.h.
Definition at line 225 of file cost_map_2d_optimization_objective.h.
Definition at line 222 of file cost_map_2d_optimization_objective.h.
Definition at line 228 of file cost_map_2d_optimization_objective.h.
Definition at line 231 of file cost_map_2d_optimization_objective.h.
int ompl::base::CostMap2DOptimizationObjective::max_pixel_ [protected] |
Definition at line 239 of file cost_map_2d_optimization_objective.h.
int ompl::base::CostMap2DOptimizationObjective::min_pixel_ [protected] |
Definition at line 240 of file cost_map_2d_optimization_objective.h.
double ompl::base::CostMap2DOptimizationObjective::pathLengthWeight_ [protected] |
The weighing factor for the path length in the mechanical work objective formulation.
Definition at line 236 of file cost_map_2d_optimization_objective.h.