|
NavMap
|
Log-odds occupancy over an int16 layer of a NavMap. More...
#include <Occupancy.hpp>

Public Member Functions | |
| void | add (NavCelId cid, int16_t delta) |
Adds delta (fixed point) to cid and clamps to [p_min, p_max]. | |
| void | hit (NavCelId cid) |
A measurement ended in cid (occupied evidence). | |
| float | logodds (NavCelId cid) const |
| void | miss (NavCelId cid) |
A measurement crossed cid (free evidence). | |
| const std::string & | name () const |
| OccupancyLayer (NavMap &nm, const std::string &name="occupancy_logodds", OccupancyParams p={}) | |
Uses (or creates, all unknown) the int16 layer name of nm. | |
| float | probability (NavCelId cid) const |
| void | reset (NavCelId cid) |
Forgets cid (back to unknown). | |
| OccupancyState | state (NavCelId cid) const |
| void | update (NavCelId cid, bool occupied) |
| const std::shared_ptr< LayerView< int16_t > > & | view () const |
Static Public Member Functions | |
| static float | logodds_of (float p) |
| static float | probability_of (float logodds) |
| static int16_t | to_fixed (float logodds) |
Static Public Attributes | |
| static constexpr float | kScale = 1000.0f |
| int16 units per log-odds unit | |
Log-odds occupancy over an int16 layer of a NavMap.
Values are log-odds in units of 1/kScale; 0 (probability 0.5) is "never observed" and is declared as the layer's unknown value. Updates add the hit/miss log-odds and clamp.
|
explicit |
Uses (or creates, all unknown) the int16 layer name of nm.
| void add | ( | NavCelId | cid, |
| int16_t | delta ) |
Adds delta (fixed point) to cid and clamps to [p_min, p_max].
| void hit | ( | NavCelId | cid | ) |
A measurement ended in cid (occupied evidence).
| float logodds | ( | NavCelId | cid | ) | const |
|
static |
| void miss | ( | NavCelId | cid | ) |
A measurement crossed cid (free evidence).
| const std::string & name | ( | ) | const |
| float probability | ( | NavCelId | cid | ) | const |
|
static |
| void reset | ( | NavCelId | cid | ) |
Forgets cid (back to unknown).
| OccupancyState state | ( | NavCelId | cid | ) | const |
|
static |
| void update | ( | NavCelId | cid, |
| bool | occupied ) |
| const std::shared_ptr< LayerView< int16_t > > & view | ( | ) | const |
|
staticconstexpr |
int16 units per log-odds unit