Main Page | Modules | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

Arak::OccupancyGrid Class Reference

#include <occupancy_grid.hpp>

List of all members.


Detailed Description

This is a simple class that implements "evidence grid" maps for laser and sonar updates.

Definition at line 16 of file occupancy_grid.hpp.

Public Member Functions

 OccupancyGrid (const Util::PropertyMap &props)
 Constructor.

 ~OccupancyGrid ()
 Destructor.

void laser (const Geometry::Point &source, const Geometry::Point &impact, double maxRange, double obstacleWidth, double p_given_obs, double p_given_free)
 Conditions this occupancy grid on a range observation.

void laser_scan (const Geometry::Point &source, const std::vector< Geometry::Point > &impacts, double maxRange, double obstacleWidth, double p_given_obs, double p_given_free)
 Conditions this occupancy grid on a range observation.

void sonar (const Geometry::Point &source, double angle, double range, double maxRange, double obstacleWidth, double width, double p_given_obs, double p_given_free)
 Conditions this occupancy grid on a sonar observation.

template<typename charT, typename traits> void write (std::basic_ostream< charT, traits > &out) const
 Writes an ASCII representation of the current estimates to the supplied stream.

template<typename charT, typename traits>  OccupancyGrid (std::basic_istream< charT, traits > &in)
 Stream constructor.


Protected Types

typedef Grid< OccupancyEstimator * > EstimatorGrid

Protected Attributes

EstimatorGridgrid
 An index of the grid cells whose occupancies are estimated.


Member Typedef Documentation

typedef Grid<OccupancyEstimator*> Arak::OccupancyGrid::EstimatorGrid [protected]
 

Definition at line 27 of file occupancy_grid.hpp.

Referenced by OccupancyGrid().


Constructor & Destructor Documentation

OccupancyGrid::OccupancyGrid const Util::PropertyMap props  ) 
 

Constructor.

Parameters:
props a property map

Definition at line 11 of file occupancy_grid.cpp.

References EstimatorGrid, laser_scan(), Arak::Geometry::Point, Arak::Util::PropertyMap, Arak::Geometry::Rectangle, and sonar().

OccupancyGrid::~OccupancyGrid  ) 
 

Destructor.

Definition at line 107 of file occupancy_grid.cpp.

template<typename charT, typename traits>
Arak::OccupancyGrid::OccupancyGrid std::basic_istream< charT, traits > &  in  )  [inline]
 

Stream constructor.

Parameters:
in an input stream from which the occupancy grid is read.

Definition at line 209 of file occupancy_grid.hpp.

References EstimatorGrid, Arak::OccupancyGrid::OccupancyEstimator::log_odds, Arak::OccupancyGrid::OccupancyEstimator::prior_log_odds, Arak::Geometry::Rectangle, and Arak::skipcomments().


Member Function Documentation

void OccupancyGrid::laser const Geometry::Point source,
const Geometry::Point impact,
double  maxRange,
double  obstacleWidth,
double  p_given_obs,
double  p_given_free
 

Conditions this occupancy grid on a range observation.

Parameters:
source the point from which the observation was made
impact the measurement, backprojected into the global coordinate frame
maxRange the maximum valid range measurement
obstacleWidth the depth of an obstacle
p_given_obs the posterior probability a cell is occupied given an obstacle is observed crossing the cell
p_given_free the posterior probability a cell is free given no obstacle is observed crossing the cell

Definition at line 117 of file occupancy_grid.cpp.

References Arak::OccupancyGrid::OccupancyEstimator::condition(), Arak::Geometry::Point, Arak::Geometry::Segment, and Arak::Geometry::Vector.

void OccupancyGrid::laser_scan const Geometry::Point source,
const std::vector< Geometry::Point > &  impacts,
double  maxRange,
double  obstacleWidth,
double  p_given_obs,
double  p_given_free
 

Conditions this occupancy grid on a range observation.

Parameters:
source the point from which the observation was made
impacts a vector of the scan measurements, backprojected into the global coordinate frame
maxRange the maximum valid range measurement
obstacleWidth the depth of an obstacle
p_given_obs the posterior probability a cell is occupied given an obstacle is observed crossing the cell
p_given_free the posterior probability a cell is free given no obstacle is observed crossing the cell

Definition at line 149 of file occupancy_grid.cpp.

References Arak::OccupancyGrid::OccupancyEstimator::condition(), Arak::Geometry::Line, Arak::Geometry::Point, and Arak::Geometry::Rectangle.

Referenced by OccupancyGrid().

void OccupancyGrid::sonar const Geometry::Point source,
double  angle,
double  range,
double  maxRange,
double  obstacleWidth,
double  width,
double  p_given_obs,
double  p_given_free
 

Conditions this occupancy grid on a sonar observation.

Parameters:
source the location of the sensor (meters)
angle the orientation of the sensor (radians)
range the observed range measurement (meters)
maxRange the maximum range measurement
obstacleWidth the depth of an obstacle
width the width of the sonar cone (radians)
p_given_obs the posterior probability a cell is occupied given an obstacle is observed crossing the cell
p_given_free the posterior probability a cell is free given no obstacle is observed crossing the cell

Definition at line 210 of file occupancy_grid.cpp.

References Arak::OccupancyGrid::OccupancyEstimator::condition(), Arak::Geometry::Direction, Arak::outerApprox(), Arak::Geometry::Point, and Arak::Geometry::Triangle.

Referenced by OccupancyGrid().

template<typename charT, typename traits>
void Arak::OccupancyGrid::write std::basic_ostream< charT, traits > &  out  )  const [inline]
 

Writes an ASCII representation of the current estimates to the supplied stream.

The first line gives the number of rows and columns of the grid; the third line is the boundary of the grid. Then the estimates are written out as a matrix (one line per row) in reverse-row order (so the first element corresponds to the upper left corner of the grid). Each estimate is the probability the cell is occupied.

Parameters:
out the stream on which to write the estimates

Definition at line 183 of file occupancy_grid.hpp.

References Arak::OccupancyGrid::OccupancyEstimator::estimate().

Referenced by main().


Member Data Documentation

EstimatorGrid* Arak::OccupancyGrid::grid [protected]
 

An index of the grid cells whose occupancies are estimated.

Definition at line 84 of file occupancy_grid.hpp.


The documentation for this class was generated from the following files:
Generated on Wed May 25 14:41:24 2005 for Arak by doxygen 1.3.6