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>
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... | |
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.
|
private |
Definition at line 34 of file area_occupancy_estimator.h.
|
strongprivate |
Enumerator | |
---|---|
Bot | |
Left | |
Top | |
Right |
Definition at line 19 of file area_occupancy_estimator.h.
|
inline |
Initializes the estimator with base probabilities.
[in] | occ,empty | - base probabilities of occupied/empty cells. |
Definition at line 75 of file area_occupancy_estimator.h.
|
inlineprivate |
Definition at line 170 of file area_occupancy_estimator.h.
|
inlineprivate |
Definition at line 111 of file area_occupancy_estimator.h.
|
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.
|
inlineprivate |
Definition at line 178 of file area_occupancy_estimator.h.
|
inlineprivate |
Definition at line 90 of file area_occupancy_estimator.h.