Public Types | Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | List of all members
MonteCarloScanMatcher Class Referenceabstract

Scan Matcher based on the Monte Carlo method. The focus of the scan matcher is to compare a scan and a built map; in this class the method of scan comparison is performed by comparing corresponding scan costs. More...

#include <monte_carlo_scan_matcher.h>

Inheritance diagram for MonteCarloScanMatcher:
Inheritance graph
[legend]

Public Types

using ObsPtr = std::shared_ptr< GridScanMatcherObserver >
 

Public Member Functions

 MonteCarloScanMatcher (std::shared_ptr< ScanCostEstimator > estimator, unsigned failed_iter, unsigned max_iter)
 Initializes the scan matcher with a certain scan cost estimator. More...
 
virtual double process_scan (const RobotState &init_pose, const TransformedLaserScan &scan, const GridMap &map, RobotState &pose_delta) override
 
- Public Member Functions inherited from GridScanMatcher
 GridScanMatcher (std::shared_ptr< ScanCostEstimator > estimator)
 
virtual void reset_state ()
 Invoked to reset the scan matcher's state. More...
 
void subscribe (std::shared_ptr< GridScanMatcherObserver > obs)
 
void unsubscribe (std::shared_ptr< GridScanMatcherObserver > obs)
 

Protected Member Functions

virtual unsigned on_estimate_update (unsigned sample_num, unsigned sample_limit)=0
 
virtual void sample_pose (RobotState &base_pose)=0
 
- Protected Member Functions inherited from GridScanMatcher
std::shared_ptr< ScanCostEstimatorcost_estimator ()
 Returns a pointer to the cost estimator. More...
 
std::vector< std::weak_ptr< GridScanMatcherObserver > > & observers ()
 Returns a reference to the vector of pointers on observers. More...
 

Private Member Functions

void do_for_each_observer (std::function< void(ObsPtr)> op)
 

Private Attributes

unsigned _failed_tries_limit
 
unsigned _total_tries_limit
 

Detailed Description

Scan Matcher based on the Monte Carlo method. The focus of the scan matcher is to compare a scan and a built map; in this class the method of scan comparison is performed by comparing corresponding scan costs.

Definition at line 30 of file monte_carlo_scan_matcher.h.

Member Typedef Documentation

Definition at line 32 of file monte_carlo_scan_matcher.h.

Constructor & Destructor Documentation

MonteCarloScanMatcher::MonteCarloScanMatcher ( std::shared_ptr< ScanCostEstimator estimator,
unsigned  failed_iter,
unsigned  max_iter 
)
inline

Initializes the scan matcher with a certain scan cost estimator.

Parameters
estimatorAn estimator of Scan Cost.
failed_iterA limit of generated samples that have a higher cost comparing with the best estimated pose.
max_iterA maximum number of hypothesis to be tested.

Definition at line 42 of file monte_carlo_scan_matcher.h.

Member Function Documentation

void MonteCarloScanMatcher::do_for_each_observer ( std::function< void(ObsPtr)>  op)
inlineprivate

Definition at line 129 of file monte_carlo_scan_matcher.h.

virtual unsigned MonteCarloScanMatcher::on_estimate_update ( unsigned  sample_num,
unsigned  sample_limit 
)
protectedpure virtual

A callback invoked when a better estimate is found.

Parameters
sample_numAmount of tries that were complited.
sample_limitTotla amount of tries allowed.

Implemented in TinyScanMatcher.

virtual double MonteCarloScanMatcher::process_scan ( const RobotState init_pose,
const TransformedLaserScan scan,
const GridMap map,
RobotState pose_delta 
)
inlineoverridevirtual

Estimates the most probable position according to a given scan; the greater this probability, the lower cost of the scan.

Parameters
init_poseThe first approxiamtion of pose.
scanA current scan.
mapA current GridMap.
pose_deltaAn output parameter of the best pose_delta.
Returns
The lowest scan cost that corresponds to output pose_delta.

Implements GridScanMatcher.

Definition at line 56 of file monte_carlo_scan_matcher.h.

virtual void MonteCarloScanMatcher::sample_pose ( RobotState base_pose)
protectedpure virtual

Generates the pose of a robot in a vicinity of a base pose.

Parameters
base_poseA basical pose of a robot.

Implemented in TinyScanMatcher.

Member Data Documentation

unsigned MonteCarloScanMatcher::_failed_tries_limit
private

Definition at line 138 of file monte_carlo_scan_matcher.h.

unsigned MonteCarloScanMatcher::_total_tries_limit
private

Definition at line 139 of file monte_carlo_scan_matcher.h.


The documentation for this class was generated from the following file:


tiny_slam
Author(s):
autogenerated on Mon Jun 10 2019 15:30:57