Function Observation::fromObsType
Defined in File coverage_observation.h
Function Documentation
-
std::pair<std::vector<IMacObservation>, bool> Observation::fromObsType(const despot::OBS_TYPE &obsInt, const std::vector<GridCell> &fov, const GridCell &robotPos = GridCell{0, 0})
Converts a uint64_t representing an observation into a vector of IMacObservations.
This is much easier for me to work with.
- Parameters:
obsInt – The uint64_t representing the observation. The first bit is an action success flag. The remaining bits are the map observations in fov order
fov – A vector of GridCells releative to the robot’s position capturing its field of view
robotPos – The robot’s current position, allows the output vector to have absolute positions (optional, we may want the relative observations)
- Throws:
tooManyCells – Raised if > 63 cells in FOV
- Returns:
A vector of observations capturing the robot’s absolute observation paired with an action success flag