Classes | Public Types | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | List of all members
cartographer::mapping::constraints::ConstraintBuilder2D Class Referenceabstract

#include <constraint_builder_2d.h>

Classes

struct  SubmapScanMatcher
 

Public Types

using Constraint = PoseGraphInterface::Constraint
 
using Result = std::vector< Constraint >
 

Public Member Functions

 ConstraintBuilder2D (const proto::ConstraintBuilderOptions &options, common::ThreadPoolInterface *thread_pool)
 
 ConstraintBuilder2D (const ConstraintBuilder2D &)=delete
 
void DeleteScanMatcher (const SubmapId &submap_id)
 
int GetNumFinishedNodes ()
 
void MaybeAddConstraint (const SubmapId &submap_id, const Submap2D *submap, const NodeId &node_id, const TrajectoryNode::Data *const constant_data, const transform::Rigid2d &initial_relative_pose)
 
void MaybeAddGlobalConstraint (const SubmapId &submap_id, const Submap2D *submap, const NodeId &node_id, const TrajectoryNode::Data *const constant_data)
 
void NotifyEndOfNode ()
 
ConstraintBuilder2Doperator= (const ConstraintBuilder2D &)=delete
 
void WhenDone (const std::function< void(const Result &)> &callback)
 
 ~ConstraintBuilder2D ()
 

Static Public Member Functions

static void RegisterMetrics (metrics::FamilyFactory *family_factory)
 

Private Member Functions

void ComputeConstraint (const SubmapId &submap_id, const Submap2D *submap, const NodeId &node_id, bool match_full_submap, const TrajectoryNode::Data *const constant_data, const transform::Rigid2d &initial_relative_pose, const SubmapScanMatcher &submap_scan_matcher, std::unique_ptr< Constraint > *constraint) EXCLUDES(mutex_)
 
const SubmapScanMatcherDispatchScanMatcherConstruction (const SubmapId &submap_id, const Grid2D *grid) REQUIRES(mutex_)
 
std::unique_ptr< std::function< void(const Result &)> > when_done_ GUARDED_BY (mutex_)
 
int num_started_nodes_ GUARDED_BY (mutex_)=0
 
int num_finished_nodes_ GUARDED_BY (mutex_)=0
 
std::unique_ptr< common::Task > finish_node_task_ GUARDED_BY (mutex_)
 
std::unique_ptr< common::Task > when_done_task_ GUARDED_BY (mutex_)
 
std::deque< std::unique_ptr< Constraint > > constraints_ GUARDED_BY (mutex_)
 
std::map< SubmapId, SubmapScanMatcher > submap_scan_matchers_ GUARDED_BY (mutex_)
 
common::Histogram score_histogram_ GUARDED_BY (mutex_)
 
void RunWhenDoneCallback () EXCLUDES(mutex_)
 

Private Attributes

scan_matching::CeresScanMatcher2D ceres_scan_matcher_
 
common::Mutex mutex_
 
const constraints::proto::ConstraintBuilderOptions options_
 
common::FixedRatioSampler sampler_
 
common::ThreadPoolInterfacethread_pool_
 

Detailed Description

Definition at line 59 of file constraint_builder_2d.h.

Member Typedef Documentation

◆ Constraint

Definition at line 61 of file constraint_builder_2d.h.

◆ Result

Definition at line 62 of file constraint_builder_2d.h.

Constructor & Destructor Documentation

◆ ConstraintBuilder2D() [1/2]

cartographer::mapping::constraints::ConstraintBuilder2D::ConstraintBuilder2D ( const proto::ConstraintBuilderOptions &  options,
common::ThreadPoolInterface thread_pool 
)

◆ ~ConstraintBuilder2D()

cartographer::mapping::constraints::ConstraintBuilder2D::~ConstraintBuilder2D ( )

Definition at line 66 of file constraint_builder_2d.cc.

◆ ConstraintBuilder2D() [2/2]

cartographer::mapping::constraints::ConstraintBuilder2D::ConstraintBuilder2D ( const ConstraintBuilder2D )
delete

Member Function Documentation

◆ ComputeConstraint()

void cartographer::mapping::constraints::ConstraintBuilder2D::ComputeConstraint ( const SubmapId submap_id,
const Submap2D submap,
const NodeId node_id,
bool  match_full_submap,
const TrajectoryNode::Data *const  constant_data,
const transform::Rigid2d initial_relative_pose,
const SubmapScanMatcher submap_scan_matcher,
std::unique_ptr< Constraint > *  constraint 
)
private

Definition at line 180 of file constraint_builder_2d.cc.

◆ DeleteScanMatcher()

void cartographer::mapping::constraints::ConstraintBuilder2D::DeleteScanMatcher ( const SubmapId submap_id)

Definition at line 298 of file constraint_builder_2d.cc.

◆ DispatchScanMatcherConstruction()

const ConstraintBuilder2D::SubmapScanMatcher * cartographer::mapping::constraints::ConstraintBuilder2D::DispatchScanMatcherConstruction ( const SubmapId submap_id,
const Grid2D grid 
)
private

Definition at line 160 of file constraint_builder_2d.cc.

◆ GetNumFinishedNodes()

int cartographer::mapping::constraints::ConstraintBuilder2D::GetNumFinishedNodes ( )

Definition at line 293 of file constraint_builder_2d.cc.

◆ GUARDED_BY() [1/8]

std::unique_ptr<std::function<void(const Result&)> > when_done_ cartographer::mapping::constraints::ConstraintBuilder2D::GUARDED_BY ( mutex_  )
private

◆ GUARDED_BY() [2/8]

int num_started_nodes_ cartographer::mapping::constraints::ConstraintBuilder2D::GUARDED_BY ( mutex_  )
privatepure virtual

◆ GUARDED_BY() [3/8]

int num_finished_nodes_ cartographer::mapping::constraints::ConstraintBuilder2D::GUARDED_BY ( mutex_  )
privatepure virtual

◆ GUARDED_BY() [4/8]

std::unique_ptr<common::Task> finish_node_task_ cartographer::mapping::constraints::ConstraintBuilder2D::GUARDED_BY ( mutex_  )
private

◆ GUARDED_BY() [5/8]

std::unique_ptr<common::Task> when_done_task_ cartographer::mapping::constraints::ConstraintBuilder2D::GUARDED_BY ( mutex_  )
private

◆ GUARDED_BY() [6/8]

std::deque<std::unique_ptr<Constraint> > constraints_ cartographer::mapping::constraints::ConstraintBuilder2D::GUARDED_BY ( mutex_  )
private

◆ GUARDED_BY() [7/8]

std::map<SubmapId, SubmapScanMatcher> submap_scan_matchers_ cartographer::mapping::constraints::ConstraintBuilder2D::GUARDED_BY ( mutex_  )
private

◆ GUARDED_BY() [8/8]

common::Histogram score_histogram_ cartographer::mapping::constraints::ConstraintBuilder2D::GUARDED_BY ( mutex_  )
private

◆ MaybeAddConstraint()

void cartographer::mapping::constraints::ConstraintBuilder2D::MaybeAddConstraint ( const SubmapId submap_id,
const Submap2D submap,
const NodeId node_id,
const TrajectoryNode::Data *const  constant_data,
const transform::Rigid2d initial_relative_pose 
)

Definition at line 75 of file constraint_builder_2d.cc.

◆ MaybeAddGlobalConstraint()

void cartographer::mapping::constraints::ConstraintBuilder2D::MaybeAddGlobalConstraint ( const SubmapId submap_id,
const Submap2D submap,
const NodeId node_id,
const TrajectoryNode::Data *const  constant_data 
)

Definition at line 107 of file constraint_builder_2d.cc.

◆ NotifyEndOfNode()

void cartographer::mapping::constraints::ConstraintBuilder2D::NotifyEndOfNode ( )

Definition at line 132 of file constraint_builder_2d.cc.

◆ operator=()

ConstraintBuilder2D& cartographer::mapping::constraints::ConstraintBuilder2D::operator= ( const ConstraintBuilder2D )
delete

◆ RegisterMetrics()

void cartographer::mapping::constraints::ConstraintBuilder2D::RegisterMetrics ( metrics::FamilyFactory family_factory)
static

Definition at line 307 of file constraint_builder_2d.cc.

◆ RunWhenDoneCallback()

void cartographer::mapping::constraints::ConstraintBuilder2D::RunWhenDoneCallback ( )
private

Definition at line 270 of file constraint_builder_2d.cc.

◆ WhenDone()

void cartographer::mapping::constraints::ConstraintBuilder2D::WhenDone ( const std::function< void(const Result &)> &  callback)

Definition at line 146 of file constraint_builder_2d.cc.

Member Data Documentation

◆ ceres_scan_matcher_

scan_matching::CeresScanMatcher2D cartographer::mapping::constraints::ConstraintBuilder2D::ceres_scan_matcher_
private

Definition at line 164 of file constraint_builder_2d.h.

◆ mutex_

common::Mutex cartographer::mapping::constraints::ConstraintBuilder2D::mutex_
private

Definition at line 136 of file constraint_builder_2d.h.

◆ options_

const constraints::proto::ConstraintBuilderOptions cartographer::mapping::constraints::ConstraintBuilder2D::options_
private

Definition at line 134 of file constraint_builder_2d.h.

◆ sampler_

common::FixedRatioSampler cartographer::mapping::constraints::ConstraintBuilder2D::sampler_
private

Definition at line 163 of file constraint_builder_2d.h.

◆ thread_pool_

common::ThreadPoolInterface* cartographer::mapping::constraints::ConstraintBuilder2D::thread_pool_
private

Definition at line 135 of file constraint_builder_2d.h.


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


cartographer
Author(s): The Cartographer Authors
autogenerated on Mon Feb 28 2022 22:00:59