Robot Planning and its Applications Project
Classes | Typedefs | Enumerations | Functions
ompl_planning.hpp File Reference

Contains most of the Functions related to OMPL planer. More...

#include <ompl/base/SpaceInformation.h>
#include <ompl/base/objectives/PathLengthOptimizationObjective.h>
#include <ompl/base/objectives/StateCostIntegralObjective.h>
#include <ompl/base/objectives/MaximizeMinClearanceObjective.h>
#include <ompl/base/spaces/RealVectorStateSpace.h>
#include "ompl/util/Console.h"
#include <ompl/geometric/planners/prm/PRMstar.h>
#include <ompl/geometric/planners/rrt/RRTstar.h>
#include <ompl/base/PlannerDataGraph.h>
#include <boost/program_options.hpp>
#include <boost/algorithm/string.hpp>
#include <boost/graph/adjacency_list.hpp>
#include <boost/geometry.hpp>
#include <boost/geometry/geometries/point_xy.hpp>
#include <boost/geometry/geometries/polygon.hpp>
#include <boost/geometry/geometries/linestring.hpp>
#include <boost/graph/dijkstra_shortest_paths.hpp>
#include <memory>
#include <fstream>
#include "utils.hpp"
#include <iostream>
Include dependency graph for ompl_planning.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  ClearanceObjective
 
class  ValidityChecker
 Class to check if new random state is valid or not. More...
 

Typedefs

typedef bg::model::d2::point_xy< double > boost_point
 
typedef bg::model::polygon< boost_pointboost_polygon
 
typedef boost::geometry::model::linestring< boost_pointboost_linestring
 

Enumerations

enum  optimalPlanner { PLANNER_PRMSTAR, PLANNER_RRTSTAR }
 Choice of Optimal planner. More...
 
enum  planningObjective { OBJECTIVE_PATHCLEARANCE, OBJECTIVE_PATHLENGTH, OBJECTIVE_THRESHOLDPATHLENGTH, OBJECTIVE_WEIGHTEDCOMBO }
 An enum of the supported optimization objectives. More...
 

Functions

ob::OptimizationObjectivePtr getPathLengthObjective (const ob::SpaceInformationPtr &si)
 get path length objective using the space information configured More...
 
ob::OptimizationObjectivePtr getThresholdPathLengthObj (const ob::SpaceInformationPtr &si)
 get path length objective with threshold using the space information configured More...
 
ob::OptimizationObjectivePtr getClearanceObjective (const ob::SpaceInformationPtr &si)
 get Obstace clearance objective using the space information configured More...
 
ob::OptimizationObjectivePtr getPathLengthObjWithCostToGo (const ob::SpaceInformationPtr &si)
 get Path length objective with go to heuristic cost using the space information configured More...
 
ob::OptimizationObjectivePtr getBalancedObjective2 (const ob::SpaceInformationPtr &si)
 get balanced objective between Path length optimization and Object clearance More...
 
ob::OptimizationObjectivePtr getBalancedObjective1 (const ob::SpaceInformationPtr &si)
 get balanced objective between Path length optimization, Object clearance and Multi Optimization More...
 
ob::PlannerPtr allocatePlanner (ob::SpaceInformationPtr si, optimalPlanner plannerType)
 Allocate planner. More...
 
ob::OptimizationObjectivePtr allocateObjective (const ob::SpaceInformationPtr &si, planningObjective objectiveType)
 Allocate objective. More...
 
boost_polygon convertPolygonToBoostPolygon (const Polygon &poly)
 Convert Polygon To Boost polygon. More...
 

Detailed Description

Contains most of the Functions related to OMPL planer.

Author
Aravind Swaminathan
Date
10-Jan-2020

Typedef Documentation

typedef boost::geometry::model::linestring<boost_point> boost_linestring
typedef bg::model::d2::point_xy<double> boost_point
typedef bg::model::polygon<boost_point> boost_polygon

Enumeration Type Documentation

Choice of Optimal planner.

Enumerator
PLANNER_PRMSTAR 

PRM STAR implementation.

PLANNER_RRTSTAR 

RRT Star implementation.

An enum of the supported optimization objectives.

Enumerator
OBJECTIVE_PATHCLEARANCE 

Path clearance objective.

OBJECTIVE_PATHLENGTH 

Path length objective.

OBJECTIVE_THRESHOLDPATHLENGTH 

Path length with threshold based objective.

OBJECTIVE_WEIGHTEDCOMBO 

Weighted combination obejctive of all the above three or two.

Function Documentation

ob::OptimizationObjectivePtr allocateObjective ( const ob::SpaceInformationPtr &  si,
planningObjective  objectiveType 
)

Allocate objective.

Four objectives of planning

Parameters
siSpace information which includes PATHCLEARANCE, PATHLENGTH, THRESHOLDPATHLENGTH, WEIGHTEDCOMBO
objectiveTypeType of Objective to be used
Returns
Objective Pointer with corresponding planner
ob::PlannerPtr allocatePlanner ( ob::SpaceInformationPtr  si,
optimalPlanner  plannerType 
)

Allocate planner.

only two types of planner are considered RRT* and PRM_RRT*

Parameters
siSpace information
plannerTypeType of planner to be used
Returns
Planner Pointer with corresponding planner
boost_polygon convertPolygonToBoostPolygon ( const Polygon poly)

Convert Polygon To Boost polygon.

Interface polygon struct is converted to boost polygon for easy operation

Parameters
polyPolygon to be converted
Returns
Boost polygon object
ob::OptimizationObjectivePtr getBalancedObjective1 ( const ob::SpaceInformationPtr &  si)

get balanced objective between Path length optimization, Object clearance and Multi Optimization

Parameters
siSpace information
Returns
Optimization objective pointer
ob::OptimizationObjectivePtr getBalancedObjective2 ( const ob::SpaceInformationPtr &  si)

get balanced objective between Path length optimization and Object clearance

Parameters
siSpace information
Returns
Optimization objective pointer
ob::OptimizationObjectivePtr getClearanceObjective ( const ob::SpaceInformationPtr &  si)

get Obstace clearance objective using the space information configured

Parameters
siSpace information
Returns
Optimization objective pointer
ob::OptimizationObjectivePtr getPathLengthObjective ( const ob::SpaceInformationPtr &  si)

get path length objective using the space information configured

Parameters
siSpace information
Returns
Optimization objective pointer
ob::OptimizationObjectivePtr getPathLengthObjWithCostToGo ( const ob::SpaceInformationPtr &  si)

get Path length objective with go to heuristic cost using the space information configured

Parameters
siSpace information
Returns
Optimization objective pointer
ob::OptimizationObjectivePtr getThresholdPathLengthObj ( const ob::SpaceInformationPtr &  si)

get path length objective with threshold using the space information configured

Parameters
siSpace information
Returns
Optimization objective pointer