Classes | Public Member Functions | Private Types | Private Member Functions
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]

List of all members.

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

Private Types

enum  IntersLocation { Bot = 0, Left = 1, Top = 2, 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)

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 Enumeration Documentation

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 
) [inline, private]

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 
) [inline, private]

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 
) [inline, override, virtual]

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 
) [inline, private]

Definition at line 178 of file area_occupancy_estimator.h.

Intersections AreaOccupancyEstimator::find_intersections ( const Beam beam,
const Rectangle bnds,
bool  is_occ 
) [inline, private]

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 Thu Jun 6 2019 17:44:58