Classes | Public Member Functions | Private Types | Private Member Functions | List of all members
AreaOccupancyEstimator Class Reference

A strategy that estimates a grid cell's occupancy based on how a laser beam passes through the cell. More...

#include <area_occupancy_estimator.h>

Inheritance diagram for AreaOccupancyEstimator:
Inheritance graph
[legend]

Classes

struct  Intersection
 
struct  Ray
 

Public Member Functions

 AreaOccupancyEstimator (double occ, double empty)
 
virtual Occupancy estimate_occupancy (const Beam &beam, const Rectangle &cell_bnds, bool is_occ) override
 
- Public Member Functions inherited from CellOccupancyEstimator
 CellOccupancyEstimator (double base_occ_prob, double base_empty_prob)
 

Private Types

using Intersections = std::vector< Intersection >
 
enum  IntersLocation : char { IntersLocation::Bot = 0, IntersLocation::Left = 1, IntersLocation::Top = 2, IntersLocation::Right = 3 }
 

Private Member Functions

bool are_on_the_same_side (double line_x1, double line_y1, double line_x2, double line_y2, double x1, double y1, double x2, double y2)
 
double compute_chunk_area (const Beam &beam, const Rectangle &bnds, bool is_occ, const std::vector< Intersection > inters)
 
Occupancy estimate_occupancy (double chunk_area, double total_area, bool is_occ)
 
Intersections find_intersections (const Beam &beam, const Rectangle &bnds, bool is_occ)
 

Additional Inherited Members

- Protected Member Functions inherited from CellOccupancyEstimator
double base_empty_prob ()
 Returns the probability of being empty. More...
 
double base_occ_prob ()
 Returns the probability of being occupied. More...
 

Detailed Description

A strategy that estimates a grid cell's occupancy based on how a laser beam passes through the cell.

The estimation is based on a ratio between cell's chunks produced by cutting the cell with a laser beam.

Definition at line 17 of file area_occupancy_estimator.h.

Member Typedef Documentation

Definition at line 34 of file area_occupancy_estimator.h.

Member Enumeration Documentation

enum AreaOccupancyEstimator::IntersLocation : char
strongprivate
Enumerator
Bot 
Left 
Top 
Right 

Definition at line 19 of file area_occupancy_estimator.h.

Constructor & Destructor Documentation

AreaOccupancyEstimator::AreaOccupancyEstimator ( double  occ,
double  empty 
)
inline

Initializes the estimator with base probabilities.

Parameters
[in]occ,empty- base probabilities of occupied/empty cells.

Definition at line 75 of file area_occupancy_estimator.h.

Member Function Documentation

bool AreaOccupancyEstimator::are_on_the_same_side ( double  line_x1,
double  line_y1,
double  line_x2,
double  line_y2,
double  x1,
double  y1,
double  x2,
double  y2 
)
inlineprivate

Definition at line 170 of file area_occupancy_estimator.h.

double AreaOccupancyEstimator::compute_chunk_area ( const Beam beam,
const Rectangle bnds,
bool  is_occ,
const std::vector< Intersection inters 
)
inlineprivate

Definition at line 111 of file area_occupancy_estimator.h.

virtual Occupancy AreaOccupancyEstimator::estimate_occupancy ( const Beam beam,
const Rectangle cell_bnds,
bool  is_occ 
)
inlineoverridevirtual

Finds the probability of a cell to be occupied based on chunk's areas.

Implements CellOccupancyEstimator.

Definition at line 81 of file area_occupancy_estimator.h.

Occupancy AreaOccupancyEstimator::estimate_occupancy ( double  chunk_area,
double  total_area,
bool  is_occ 
)
inlineprivate

Definition at line 178 of file area_occupancy_estimator.h.

Intersections AreaOccupancyEstimator::find_intersections ( const Beam beam,
const Rectangle bnds,
bool  is_occ 
)
inlineprivate

Definition at line 90 of file area_occupancy_estimator.h.


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


tiny_slam
Author(s):
autogenerated on Mon Jun 10 2019 15:30:57