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

Arak::ArakPosteriorSonarObs Class Reference

#include <sonar_obs.hpp>

Inheritance diagram for Arak::ArakPosteriorSonarObs:

Inheritance graph
[legend]
Collaboration diagram for Arak::ArakPosteriorSonarObs:

Collaboration graph
[legend]
List of all members.

Detailed Description

An posterior Arak process conditioned on localized sonar measurements with Gaussian noise.

Definition at line 222 of file sonar_obs.hpp.

Public Member Functions

 ArakPosteriorSonarObs (const ArakProcess &prior, const Arak::Util::PropertyMap &props)
 Stream constructor.

virtual ~ArakPosteriorSonarObs ()
 Destructor.

const Geometry::Rectangleboundary () const
 Returns a const reference to a rectangle that encloses the observed data.

virtual double scale () const
 Returns the scale of this Arak process.

virtual double logMeasure () const
 Computes the (log) measure associated with the Arak process for the coloring.

virtual double potential () const
 Computes the potential associated with this posterior Arak process.

virtual void visualize (CGAL::Qt_widget &widget) const
 Renders a graphical representation of this Arak posterior using the supplied widget.

virtual void update (const Geometry::Point &a, const Geometry::Point &b, const Geometry::Point &c)
 This method recalculates the likelihood of all observations that are out of date and are sensitive to a given triangle.

virtual void recolored (const Geometry::Point &a, const Geometry::Point &b, const Geometry::Point &c)
 This method is invoked to inform this process that the triangle with the supplied vertices has been recolored.

virtual void recolored (const Geometry::Point &a, const Geometry::Point &b, const Geometry::Point &c, const Geometry::Point &d)
 This method is invoked to inform this process that the quadrilateral with the supplied vertices has been recolored.

double returnProb (const SonarImpact &impact) const
 Computes the probability of obtaining a sonar return given the location and orientation of the sensor and the position of the impact face.

double distLikelihood (const SonarImpact &impact, const double obs) const
 Returns the likelihood of obtaining an observed sonar range given a true sonar impact.

template<typename ImpactIterator> double likelihood (double range, ImpactIterator begin, ImpactIterator end) const
 Computes the likelihood of a sonar range reading given a set of true sonar impacts.


Protected Types

typedef PointerHandle< SonarObsSonarObsHandle
typedef Grid< SonarObsHandleSonarObsIndex
 A grid where each cell stores handles to all observations whose cones intersect the cell's boundary.


Protected Member Functions

double updateObsLP (SonarObs &o, bool init=false) const
 Updates the log probability of the supplied observation under the current coloring and process parameters.


Protected Attributes

const ArakProcessprior
 The prior process.

std::vector< SonarObs * > obs
 An array of the observations.

SonarObsIndexobsIndex
 An index of the observations.

unsigned long int updateId
 The update sequence number.

double aperture
 The width of the sonar cones (in radians).

double maxRange
 This is the sonar measurement obtained when the sensor does not impact a surface.

double prob_max_range
 The probability of obtaining a max-range measurement given the reading is not generated by a sonar contact.

double unif_outlier_weight
 The weight of a uniform model for outlier measurements.

double exp_outlier_coef
 The parameter of an exponential model for outlier measurements.

double face_const_coef
 The constant coefficient (or bias) of the logistic return probability model for face features.

double face_proj_angle_coef
 The coefficient of the projection angle term in the logistic return probability model for face features.

double face_min_range_coef
 The coefficient of the minimum range term in the logistic return probability model for face features.

double face_vis_angle_coef
 The coefficient of the visible angle term in the logistic return probability model for face features.

double corner_const_coef
 The constant coefficient (or bias) of the logistic return probability model for corner features.

double corner_range_coef
 The coefficient of the range term in the logistic return probability model for corner features.

double faceRelErrStDev
 The standard deviation in sonar face range measurements, expressed as relative error.

double cornerRelErrStDev
 The standard deviation in sonar corner range measurements, expressed as relative error.

double lp
 The current potential arising from observations.


Member Typedef Documentation

typedef PointerHandle<SonarObs> Arak::ArakPosteriorSonarObs::SonarObsHandle [protected]
 

Definition at line 228 of file sonar_obs.hpp.

Referenced by update(), and updateObsLP().

typedef Grid<SonarObsHandle> Arak::ArakPosteriorSonarObs::SonarObsIndex [protected]
 

A grid where each cell stores handles to all observations whose cones intersect the cell's boundary.

Definition at line 234 of file sonar_obs.hpp.

Referenced by ArakPosteriorSonarObs().


Constructor & Destructor Documentation

ArakPosteriorSonarObs::ArakPosteriorSonarObs const ArakProcess prior,
const Arak::Util::PropertyMap props
 

Stream constructor.

The observations are read from a file of numbers with the following format:

* n * source-1-x source-1-y angle-1 range-1 * source-2-x source-2-y angle-2 range-2 * ... * source-n-x source-n-y angle-n range-n *

Parameters:
coloring The coloring whose probability is evaluated. This is fixed for each process object so that likelihood changes due to coloring updates can be processed efficiently.
props the properties that define the posterior

Definition at line 198 of file sonar_obs.cpp.

References Arak::Coloring::addListener(), Arak::Coloring::addQueryPoints(), aperture, Arak::Coloring::boundary(), corner_const_coef, corner_range_coef, cornerRelErrStDev, exp_outlier_coef, face_const_coef, face_min_range_coef, face_proj_angle_coef, face_vis_angle_coef, faceRelErrStDev, Arak::ArakProcess::getColoring(), Arak::Geometry::Point, prob_max_range, Arak::Util::PropertyMap, Arak::Geometry::Rectangle, SonarObsIndex, unif_outlier_weight, and updateObsLP().

ArakPosteriorSonarObs::~ArakPosteriorSonarObs  )  [virtual]
 

Destructor.

Definition at line 379 of file sonar_obs.cpp.


Member Function Documentation

const Geometry::Rectangle& Arak::ArakPosteriorSonarObs::boundary  )  const [inline]
 

Returns a const reference to a rectangle that encloses the observed data.

Definition at line 473 of file sonar_obs.hpp.

References Arak::Grid< ItemType >::boundary(), and Arak::Geometry::Rectangle.

double Arak::ArakPosteriorSonarObs::distLikelihood const SonarImpact impact,
const double  obs
const [inline]
 

Returns the likelihood of obtaining an observed sonar range given a true sonar impact.

This model is a Gaussian model with multiplicative noise.

Parameters:
impact the impact
obs the observed sonar range
Returns:
the likelihood of the observation given the impact

Definition at line 591 of file sonar_obs.hpp.

References cornerRelErrStDev, faceRelErrStDev, Arak::SonarImpact::isCorner(), and Arak::SonarImpact::min_range.

Referenced by likelihood().

template<typename ImpactIterator>
double Arak::ArakPosteriorSonarObs::likelihood double  range,
ImpactIterator  begin,
ImpactIterator  end
const [inline]
 

Computes the likelihood of a sonar range reading given a set of true sonar impacts.

Definition at line 606 of file sonar_obs.hpp.

References distLikelihood(), exp_outlier_coef, prob_max_range, returnProb(), and unif_outlier_weight.

Referenced by updateObsLP().

double ArakPosteriorSonarObs::logMeasure  )  const [virtual]
 

Computes the (log) measure associated with the Arak process for the coloring.

(This is actually multiplied by an elementary Poisson measure over the vertex locations to yield the coloring measure.)

Returns:
the measure of the coloring

Implements Arak::ArakProcess.

Definition at line 371 of file sonar_obs.cpp.

References Arak::ArakProcess::logMeasure().

double ArakPosteriorSonarObs::potential  )  const [virtual]
 

Computes the potential associated with this posterior Arak process.

Returns:
the current potential
See also:
ArakProcess

Implements Arak::ArakProcess.

Definition at line 375 of file sonar_obs.cpp.

References Arak::ArakProcess::potential().

void ArakPosteriorSonarObs::recolored const Geometry::Point a,
const Geometry::Point b,
const Geometry::Point c,
const Geometry::Point d
[virtual]
 

This method is invoked to inform this process that the quadrilateral with the supplied vertices has been recolored.

The vertices are supplied in either clockwise or counter-clockwise order. Note that this quadrilateral is simple, but not necessarily convex.

Parameters:
a the first vertex of the quadrilateral
b the second vertex of the quadrilateral
c the third vertex of the quadrilateral
d the fourth vertex of the quadrilateral

Reimplemented from Arak::Coloring::Listener.

Definition at line 466 of file sonar_obs.cpp.

References Arak::Geometry::Point, and update().

void ArakPosteriorSonarObs::recolored const Geometry::Point a,
const Geometry::Point b,
const Geometry::Point c
[virtual]
 

This method is invoked to inform this process that the triangle with the supplied vertices has been recolored.

Parameters:
a the first vertex of the triangle
b the second vertex of the triangle
c the third vertex of the triangle

Reimplemented from Arak::Coloring::Listener.

Definition at line 459 of file sonar_obs.cpp.

References Arak::Geometry::Point, and update().

double Arak::ArakPosteriorSonarObs::returnProb const SonarImpact impact  )  const [inline]
 

Computes the probability of obtaining a sonar return given the location and orientation of the sensor and the position of the impact face.

The returned probability is given by the following logistic model:

\[ p = \frac{1}{1 + \exp \left\{ a + b \log \sin \theta + cr + d\phi \right\}} \]

where $\theta$ is the impact's projection angle, $r$ is the impact's minimum range, $\phi$ is the impact's visible angle, $a$, $b$, $c$ and $d$ are model parameters.

Parameters:
impact the impact
Returns:
the probability a sonar return is generated from the supplied impact (given the model parameters)

Definition at line 569 of file sonar_obs.hpp.

References corner_const_coef, corner_range_coef, face_const_coef, face_min_range_coef, face_proj_angle_coef, face_vis_angle_coef, Arak::SonarImpact::isCorner(), Arak::SonarImpact::min_range, Arak::SonarImpact::proj_angle, and Arak::SonarImpact::visible_angle.

Referenced by likelihood().

virtual double Arak::ArakPosteriorSonarObs::scale  )  const [inline, virtual]
 

Returns the scale of this Arak process.

Implements Arak::ArakProcess.

Definition at line 480 of file sonar_obs.hpp.

References Arak::ArakProcess::scale().

void ArakPosteriorSonarObs::update const Geometry::Point a,
const Geometry::Point b,
const Geometry::Point c
[virtual]
 

This method recalculates the likelihood of all observations that are out of date and are sensitive to a given triangle.

Parameters:
a the first vertex of the triangle
b the second vertex of the triangle
c the third vertex of the triangle

Definition at line 433 of file sonar_obs.cpp.

References Arak::Geometry::Point, SonarObsHandle, Arak::Geometry::Triangle, and updateObsLP().

Referenced by recolored().

double ArakPosteriorSonarObs::updateObsLP SonarObs o,
bool  init = false
const [protected]
 

Updates the log probability of the supplied observation under the current coloring and process parameters.

The change in its log probability is returned.

Definition at line 291 of file sonar_obs.cpp.

References Arak::BLACK, Arak::Coloring::color(), Arak::computeFirstSonarImpact(), Arak::computeSonarImpacts(), cornerRelErrStDev, Arak::ArakPosteriorSonarObs::SonarObs::entries, faceRelErrStDev, likelihood(), Arak::ln(), Arak::ArakPosteriorSonarObs::SonarObs::lp, Arak::ArakPosteriorSonarObs::SonarObs::max, Arak::ArakPosteriorSonarObs::SonarObs::min, Arak::SonarImpact::min_range, Arak::outerApprox(), Arak::ArakPosteriorSonarObs::SonarObs::range, Arak::ArakPosteriorSonarObs::SonarObs::relevantRegion, SonarObsHandle, Arak::ArakPosteriorSonarObs::SonarObs::source, Arak::ArakPosteriorSonarObs::SonarObs::unused, and Arak::ArakPosteriorSonarObs::SonarObs::updateId.

Referenced by ArakPosteriorSonarObs(), and update().

void ArakPosteriorSonarObs::visualize CGAL::Qt_widget &  widget  )  const [virtual]
 

Renders a graphical representation of this Arak posterior using the supplied widget.

The Gaussian observations are rendered as disks of varying gray level.

Parameters:
widget the widget on which to visualize the process

Reimplemented from Arak::ArakProcess.

Definition at line 386 of file sonar_obs.cpp.

References Arak::jet_colors, Arak::jet_size, Arak::ArakPosteriorSonarObs::SonarObs::lp, Arak::ArakPosteriorSonarObs::SonarObs::max, Arak::ArakPosteriorSonarObs::SonarObs::min, Arak::Geometry::Point, Arak::ArakPosteriorSonarObs::SonarObs::range, Arak::Geometry::Segment, Arak::ArakPosteriorSonarObs::SonarObs::source, and Arak::Geometry::Vector.


Member Data Documentation

double Arak::ArakPosteriorSonarObs::aperture [protected]
 

The width of the sonar cones (in radians).

Definition at line 353 of file sonar_obs.hpp.

Referenced by ArakPosteriorSonarObs().

double Arak::ArakPosteriorSonarObs::corner_const_coef [protected]
 

The constant coefficient (or bias) of the logistic return probability model for corner features.

Definition at line 405 of file sonar_obs.hpp.

Referenced by ArakPosteriorSonarObs(), and returnProb().

double Arak::ArakPosteriorSonarObs::corner_range_coef [protected]
 

The coefficient of the range term in the logistic return probability model for corner features.

Definition at line 411 of file sonar_obs.hpp.

Referenced by ArakPosteriorSonarObs(), and returnProb().

double Arak::ArakPosteriorSonarObs::cornerRelErrStDev [protected]
 

The standard deviation in sonar corner range measurements, expressed as relative error.

For example, a value of 0.01 would signify that the standard deviation of range measurements to a corner at range $d$ is $0.01 \times d$.

Definition at line 427 of file sonar_obs.hpp.

Referenced by ArakPosteriorSonarObs(), distLikelihood(), and updateObsLP().

double Arak::ArakPosteriorSonarObs::exp_outlier_coef [protected]
 

The parameter of an exponential model for outlier measurements.

Definition at line 375 of file sonar_obs.hpp.

Referenced by ArakPosteriorSonarObs(), and likelihood().

double Arak::ArakPosteriorSonarObs::face_const_coef [protected]
 

The constant coefficient (or bias) of the logistic return probability model for face features.

Definition at line 381 of file sonar_obs.hpp.

Referenced by ArakPosteriorSonarObs(), and returnProb().

double Arak::ArakPosteriorSonarObs::face_min_range_coef [protected]
 

The coefficient of the minimum range term in the logistic return probability model for face features.

Definition at line 393 of file sonar_obs.hpp.

Referenced by ArakPosteriorSonarObs(), and returnProb().

double Arak::ArakPosteriorSonarObs::face_proj_angle_coef [protected]
 

The coefficient of the projection angle term in the logistic return probability model for face features.

Definition at line 387 of file sonar_obs.hpp.

Referenced by ArakPosteriorSonarObs(), and returnProb().

double Arak::ArakPosteriorSonarObs::face_vis_angle_coef [protected]
 

The coefficient of the visible angle term in the logistic return probability model for face features.

Definition at line 399 of file sonar_obs.hpp.

Referenced by ArakPosteriorSonarObs(), and returnProb().

double Arak::ArakPosteriorSonarObs::faceRelErrStDev [protected]
 

The standard deviation in sonar face range measurements, expressed as relative error.

For example, a value of 0.01 would signify that the standard deviation of range measurements to a surface at range $d$ is $0.01 \times d$.

Definition at line 419 of file sonar_obs.hpp.

Referenced by ArakPosteriorSonarObs(), distLikelihood(), and updateObsLP().

double Arak::ArakPosteriorSonarObs::lp [protected]
 

The current potential arising from observations.

Definition at line 432 of file sonar_obs.hpp.

double Arak::ArakPosteriorSonarObs::maxRange [protected]
 

This is the sonar measurement obtained when the sensor does not impact a surface.

Definition at line 359 of file sonar_obs.hpp.

std::vector<SonarObs*> Arak::ArakPosteriorSonarObs::obs [protected]
 

An array of the observations.

Definition at line 338 of file sonar_obs.hpp.

SonarObsIndex* Arak::ArakPosteriorSonarObs::obsIndex [protected]
 

An index of the observations.

Definition at line 343 of file sonar_obs.hpp.

const ArakProcess& Arak::ArakPosteriorSonarObs::prior [protected]
 

The prior process.

Definition at line 333 of file sonar_obs.hpp.

double Arak::ArakPosteriorSonarObs::prob_max_range [protected]
 

The probability of obtaining a max-range measurement given the reading is not generated by a sonar contact.

Definition at line 365 of file sonar_obs.hpp.

Referenced by ArakPosteriorSonarObs(), and likelihood().

double Arak::ArakPosteriorSonarObs::unif_outlier_weight [protected]
 

The weight of a uniform model for outlier measurements.

Definition at line 370 of file sonar_obs.hpp.

Referenced by ArakPosteriorSonarObs(), and likelihood().

unsigned long int Arak::ArakPosteriorSonarObs::updateId [protected]
 

The update sequence number.

Definition at line 348 of file sonar_obs.hpp.


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