Bench-MR
A Motion Planning Benchmark for Wheeled Mobile Robots
Public Member Functions | Static Public Member Functions | List of all members
PolygonMaze Class Reference

Implements a maze consisting of convex shapes as obstacles. More...

#include <PolygonMaze.h>

Inheritance diagram for PolygonMaze:
Inheritance graph
[legend]
Collaboration diagram for PolygonMaze:
Collaboration graph
[legend]

Public Member Functions

 PolygonMaze ()
 
std::string name () const override
 
const std::vector< Polygon > & obstacles () const
 
bool collides (double x, double y) override
 
bool collides (const Polygon &polygon) override
 
void to_json (nlohmann::json &j) override
 
double unit () const override
 Unit, e.g. More...
 
- Public Member Functions inherited from Environment
 Environment ()
 
virtual ~Environment ()=default
 
void setStart (const Point &point)
 
const Pointstart () const
 
void setGoal (const Point &point)
 
const Pointgoal () const
 
virtual bool collides (double x, double y)
 
virtual bool collides (const Polygon &polygon)
 
bool collides (const Point &p)
 
bool collides (const ompl::geometric::PathGeometric &trajectory)
 
bool collides (const ob::State *state)
 
bool checkValidity (const ob::State *state)
 Used by planners to determine if the state is valid or not. More...
 
const ob::RealVectorBounds & bounds () const
 
double width () const
 
double height () const
 
virtual double distance (double x, double y)
 Compute distance from xy-coordinate to the closest obstacle if possible. More...
 
double distance (const ob::State *state)
 Compute distance of a state to the closest obstacle if possible. More...
 
double bilinearDistance (double x, double y, double cellSize=1)
 Bilinear filtering of distance. More...
 
double bilinearDistance (const Point &point, double cellSize=1)
 
double bilinearDistance (const ob::State *state, double cellSize=1)
 
bool distanceGradient (double x, double y, double &dx, double &dy, double p=0.1, double cellSize=1)
 Computes negative gradient of distance field at position x, y. More...
 
virtual std::string name () const
 
void estimateStartGoalOrientations ()
 Estimates potentially suitable theta values for the start and goal state by running a simple line search from start to goal. More...
 
bool thetasDefined () const
 
void setThetas (double start, double goal)
 
ompl::base::StatestartState () const
 
ompl::base::StategoalState () const
 
ompl::base::ScopedState< ob::SE2StateSpace > startScopedState () const
 
ompl::base::ScopedState< ob::SE2StateSpace > goalScopedState () const
 
ob::RealVectorBounds getBounds () const
 
double startTheta () const
 
double goalTheta () const
 
virtual void to_json (nlohmann::json &j)
 
virtual double unit () const
 Unit, e.g. More...
 
void resetCollisionTimer ()
 
double elapsedCollisionTime () const
 

Static Public Member Functions

static std::shared_ptr< PolygonMazeloadFromSvg (const std::string &filename)
 

Additional Inherited Members

- Protected Attributes inherited from Environment
Point _start
 
Point _goal
 
double _start_theta {0}
 
double _goal_theta {0}
 
bool _thetas_defined {false}
 
ob::RealVectorBounds _bounds {2}
 
Stopwatch _collision_timer
 

Detailed Description

Implements a maze consisting of convex shapes as obstacles.

Constructor & Destructor Documentation

◆ PolygonMaze()

PolygonMaze::PolygonMaze ( )
inline

Member Function Documentation

◆ collides() [1/2]

bool PolygonMaze::collides ( const Polygon polygon)
inlineoverridevirtual

Reimplemented from Environment.

◆ collides() [2/2]

bool PolygonMaze::collides ( double  x,
double  y 
)
inlineoverridevirtual

Reimplemented from Environment.

◆ loadFromSvg()

static std::shared_ptr< PolygonMaze > PolygonMaze::loadFromSvg ( const std::string &  filename)
inlinestatic

◆ name()

std::string PolygonMaze::name ( ) const
inlineoverridevirtual

Reimplemented from Environment.

◆ obstacles()

const std::vector< Polygon > & PolygonMaze::obstacles ( ) const
inline

◆ to_json()

void PolygonMaze::to_json ( nlohmann::json &  j)
inlineoverridevirtual

Reimplemented from Environment.

◆ unit()

double PolygonMaze::unit ( ) const
inlineoverridevirtual

Unit, e.g.

used by Theta* to determine neighboring states.

Reimplemented from Environment.


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