An occupancy map built from range sensors, each cell holding the probability that it is occupied.
More...
|
| | ProbabilityGrid (uint_t n_cols, uint_t n_rows, real_t cell_size, real_t x0=0.0, real_t y0=0.0) |
| | ProbabilityGrid (uint_t n_cols, uint_t n_rows, real_t cell_size, real_t x0, real_t y0, const Parameters ¶meters) |
| | As above, with the inverse sensor model given.
|
| uint_t | n_cols () const noexcept |
| uint_t | n_rows () const noexcept |
| real_t | cell_size () const noexcept |
| bool | in_bounds (const GridCell &c) const noexcept |
| GridCell | to_cell (real_t x, real_t y) const noexcept |
| std::array< real_t, 2 > | to_world (const GridCell &c) const noexcept |
| real_t | probability (const GridCell &c) const noexcept |
| | The probability that the cell is occupied, 0.5 for an unknown or out-of-bounds cell.
|
| bool | is_known (const GridCell &c) const noexcept |
| | Whether any beam has touched the cell. An untouched cell keeps the 0.5 prior.
|
| void | integrate_beam (const Point &origin, const Point &endpoint, bool hit) |
| | Fold one range beam into the map: the cells from origin to endpoint are made more likely free, and if hit the endpoint cell is made more likely occupied. origin and endpoint are in world metres; set hit false when the beam reached its maximum range without striking anything. Cells outside the grid are ignored, so a hit beyond the grid only frees the cells the beam crossed: make the grid a little larger than the walls it should capture.
|
| void | integrate_scan (const std::array< real_t, 3 > &pose, const std::vector< real_t > &bearings, const std::vector< real_t > &ranges, real_t max_range) |
| | Fold a whole scan taken at pose (x, y, heading): beam i is cast along heading + bearings[i] and measured ranges[i]. A range of max_range or more, or not finite, is treated as a miss.
|
| OccupancyGrid | to_occupancy_grid (real_t occupied_threshold=0.5, bool unknown_is_occupied=true) const |
| | The map as an OccupancyGrid for a planner: a cell is occupied if its probability is at least occupied_threshold. An unknown cell, which no beam has seen, is occupied when unknown_is_occupied, the safe default, so a planner does not route through unseen space.
|
An occupancy map built from range sensors, each cell holding the probability that it is occupied.
Where an OccupancyGrid says only free or occupied, a ProbabilityGrid accumulates evidence: a robot drives through the world and a range sensor reports how far away the nearest obstacle is along each beam. Every beam marks the cells it passes through as a little more likely free, and the cell it ends on, if it struck something, as a little more likely occupied. A cell no beam has touched stays unknown.
The evidence is kept as log-odds, \(l = \log\frac{p}{1-p}\), so an update is just an addition and is clamped to a range, after which thresholding gives the OccupancyGrid a planner can search. The cells follow the same convention as OccupancyGrid: column (0, 0) has its lower left corner at (x0, y0), columns grow with x and rows with y.