Classes | Public Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
cartographer::mapping_2d::SparsePoseGraph Class Referenceabstract

#include <sparse_pose_graph.h>

Inheritance diagram for cartographer::mapping_2d::SparsePoseGraph:
Inheritance graph
[legend]

Classes

struct  SubmapData
 
class  TrimmingHandle
 

Public Member Functions

void AddImuData (int trajectory_id, common::Time time, const Eigen::Vector3d &linear_acceleration, const Eigen::Vector3d &angular_velocity)
 
void AddScan (common::Time time, const transform::Rigid3d &tracking_to_pose, const sensor::RangeData &range_data_in_pose, const transform::Rigid2d &pose, int trajectory_id, const mapping::Submap *matching_submap, const std::vector< const mapping::Submap * > &insertion_submaps) EXCLUDES(mutex_)
 
void AddTrimmer (std::unique_ptr< mapping::PoseGraphTrimmer > trimmer) override
 
std::vector< Constraintconstraints () override EXCLUDES(mutex_)
 
std::vector< std::vector< int > > GetConnectedTrajectories () override
 
transform::Rigid3d GetLocalToGlobalTransform (int trajectory_id) EXCLUDES(mutex_) override
 
transform::Rigid3d GetSubmapTransform (const mapping::SubmapId &submap_id) EXCLUDES(mutex_) override
 
std::vector< std::vector< mapping::TrajectoryNode > > GetTrajectoryNodes () override EXCLUDES(mutex_)
 
int num_submaps (int trajectory_id) EXCLUDES(mutex_) override
 
SparsePoseGraphoperator= (const SparsePoseGraph &)=delete
 
void RunFinalOptimization () override
 
 SparsePoseGraph (const mapping::proto::SparsePoseGraphOptions &options, common::ThreadPool *thread_pool)
 
 SparsePoseGraph (const SparsePoseGraph &)=delete
 
 ~SparsePoseGraph () override
 
- Public Member Functions inherited from cartographer::mapping::SparsePoseGraph
virtual void AddTrimmer (std::unique_ptr< PoseGraphTrimmer > trimmer)=0
 
SparsePoseGraphoperator= (const SparsePoseGraph &)=delete
 
 SparsePoseGraph ()
 
 SparsePoseGraph (const SparsePoseGraph &)=delete
 
proto::SparsePoseGraph ToProto ()
 

Private Types

enum  SubmapState { SubmapState::kActive, SubmapState::kFinished, SubmapState::kTrimmed }
 

Private Member Functions

void AddWorkItem (std::function< void()> work_item) REQUIRES(mutex_)
 
void ComputeConstraint (const mapping::NodeId &node_id, const mapping::SubmapId &submap_id) REQUIRES(mutex_)
 
void ComputeConstraintsForOldScans (const mapping::Submap *submap) REQUIRES(mutex_)
 
void ComputeConstraintsForScan (const mapping::Submap *matching_submap, std::vector< const mapping::Submap * > insertion_submaps, const mapping::Submap *finished_submap, const transform::Rigid2d &pose) REQUIRES(mutex_)
 
transform::Rigid3d ComputeLocalToGlobalTransform (const std::vector< std::vector< sparse_pose_graph::SubmapData >> &submap_transforms, int trajectory_id) const REQUIRES(mutex_)
 
mapping::SubmapId GetSubmapId (const mapping::Submap *submap) const REQUIRES(mutex_)
 
void GrowSubmapTransformsAsNeeded (const std::vector< const mapping::Submap * > &insertion_submaps) REQUIRES(mutex_)
 
std::unique_ptr< std::deque< std::function< void()> > > scan_queue_ GUARDED_BY (mutex_)
 
mapping::TrajectoryConnectivity trajectory_connectivity_ GUARDED_BY (mutex_)
 
std::unordered_map< int, std::unique_ptr< common::FixedRatioSampler > > global_localization_samplers_ GUARDED_BY (mutex_)
 
int num_scans_since_last_loop_closure_ GUARDED_BY (mutex_)=0
 
bool run_loop_closure_ GUARDED_BY (mutex_)
 
sparse_pose_graph::ConstraintBuilder constraint_builder_ GUARDED_BY (mutex_)
 
std::vector< Constraint > constraints_ GUARDED_BY (mutex_)
 
std::map< const mapping::Submap *, mapping::SubmapId > submap_ids_ GUARDED_BY (mutex_)
 
mapping::NestedVectorsById< SubmapData, mapping::SubmapId > submap_data_ GUARDED_BY (mutex_)
 
mapping::NestedVectorsById< mapping::TrajectoryNode, mapping::NodeId > trajectory_nodes_ GUARDED_BY (mutex_)
 
int num_trajectory_nodes_ GUARDED_BY (mutex_)=0
 
std::vector< std::vector< sparse_pose_graph::SubmapData > > optimized_submap_transforms_ GUARDED_BY (mutex_)
 
std::vector< std::unique_ptr< mapping::PoseGraphTrimmer > > trimmers_ GUARDED_BY (mutex_)
 
void HandleScanQueue () REQUIRES(mutex_)
 
void RunOptimization () EXCLUDES(mutex_)
 
void WaitForAllComputations () EXCLUDES(mutex_)
 

Private Attributes

std::vector< std::vector< int > > connected_components_
 
common::Mutex mutex_
 
sparse_pose_graph::OptimizationProblem optimization_problem_
 
const mapping::proto::SparsePoseGraphOptions options_
 
std::map< int, size_t > reverse_connected_components_
 

Detailed Description

Definition at line 56 of file 2d/sparse_pose_graph.h.

Member Enumeration Documentation

Enumerator
kActive 
kFinished 
kTrimmed 

Definition at line 98 of file 2d/sparse_pose_graph.h.

Constructor & Destructor Documentation

cartographer::mapping_2d::SparsePoseGraph::SparsePoseGraph ( const mapping::proto::SparsePoseGraphOptions &  options,
common::ThreadPool thread_pool 
)

Definition at line 42 of file 2d/sparse_pose_graph.cc.

cartographer::mapping_2d::SparsePoseGraph::~SparsePoseGraph ( )
overridevirtual

Reimplemented from cartographer::mapping::SparsePoseGraph.

Definition at line 49 of file 2d/sparse_pose_graph.cc.

cartographer::mapping_2d::SparsePoseGraph::SparsePoseGraph ( const SparsePoseGraph )
delete

Member Function Documentation

void cartographer::mapping_2d::SparsePoseGraph::AddImuData ( int  trajectory_id,
common::Time  time,
const Eigen::Vector3d &  linear_acceleration,
const Eigen::Vector3d &  angular_velocity 
)

Definition at line 144 of file 2d/sparse_pose_graph.cc.

void cartographer::mapping_2d::SparsePoseGraph::AddScan ( common::Time  time,
const transform::Rigid3d tracking_to_pose,
const sensor::RangeData range_data_in_pose,
const transform::Rigid2d pose,
int  trajectory_id,
const mapping::Submap matching_submap,
const std::vector< const mapping::Submap * > &  insertion_submaps 
)

Definition at line 91 of file 2d/sparse_pose_graph.cc.

void cartographer::mapping_2d::SparsePoseGraph::AddTrimmer ( std::unique_ptr< mapping::PoseGraphTrimmer trimmer)
override

Definition at line 341 of file 2d/sparse_pose_graph.cc.

void cartographer::mapping_2d::SparsePoseGraph::AddWorkItem ( std::function< void()>  work_item)
private

Definition at line 136 of file 2d/sparse_pose_graph.cc.

void cartographer::mapping_2d::SparsePoseGraph::ComputeConstraint ( const mapping::NodeId node_id,
const mapping::SubmapId submap_id 
)
private

Definition at line 154 of file 2d/sparse_pose_graph.cc.

void cartographer::mapping_2d::SparsePoseGraph::ComputeConstraintsForOldScans ( const mapping::Submap submap)
private

Definition at line 191 of file 2d/sparse_pose_graph.cc.

void cartographer::mapping_2d::SparsePoseGraph::ComputeConstraintsForScan ( const mapping::Submap matching_submap,
std::vector< const mapping::Submap * >  insertion_submaps,
const mapping::Submap finished_submap,
const transform::Rigid2d pose 
)
private

Definition at line 211 of file 2d/sparse_pose_graph.cc.

transform::Rigid3d cartographer::mapping_2d::SparsePoseGraph::ComputeLocalToGlobalTransform ( const std::vector< std::vector< sparse_pose_graph::SubmapData >> &  submap_transforms,
int  trajectory_id 
) const
private

Definition at line 458 of file 2d/sparse_pose_graph.cc.

std::vector< SparsePoseGraph::Constraint > cartographer::mapping_2d::SparsePoseGraph::constraints ( )
overridevirtual

Implements cartographer::mapping::SparsePoseGraph.

Definition at line 413 of file 2d/sparse_pose_graph.cc.

std::vector< std::vector< int > > cartographer::mapping_2d::SparsePoseGraph::GetConnectedTrajectories ( )
overridevirtual

Implements cartographer::mapping::SparsePoseGraph.

Definition at line 425 of file 2d/sparse_pose_graph.cc.

transform::Rigid3d cartographer::mapping_2d::SparsePoseGraph::GetLocalToGlobalTransform ( int  trajectory_id)
overridevirtual

Implements cartographer::mapping::SparsePoseGraph.

Definition at line 418 of file 2d/sparse_pose_graph.cc.

mapping::SubmapId cartographer::mapping_2d::SparsePoseGraph::GetSubmapId ( const mapping::Submap submap) const
inlineprivate

Definition at line 113 of file 2d/sparse_pose_graph.h.

transform::Rigid3d cartographer::mapping_2d::SparsePoseGraph::GetSubmapTransform ( const mapping::SubmapId submap_id)
overridevirtual

Implements cartographer::mapping::SparsePoseGraph.

Definition at line 438 of file 2d/sparse_pose_graph.cc.

std::vector< std::vector< mapping::TrajectoryNode > > cartographer::mapping_2d::SparsePoseGraph::GetTrajectoryNodes ( )
overridevirtual

Implements cartographer::mapping::SparsePoseGraph.

Definition at line 408 of file 2d/sparse_pose_graph.cc.

void cartographer::mapping_2d::SparsePoseGraph::GrowSubmapTransformsAsNeeded ( const std::vector< const mapping::Submap * > &  insertion_submaps)
private

Definition at line 55 of file 2d/sparse_pose_graph.cc.

std::unique_ptr<std::deque<std::function<void()> > > scan_queue_ cartographer::mapping_2d::SparsePoseGraph::GUARDED_BY ( mutex_  )
private
mapping::TrajectoryConnectivity trajectory_connectivity_ cartographer::mapping_2d::SparsePoseGraph::GUARDED_BY ( mutex_  )
private
std::unordered_map<int, std::unique_ptr<common::FixedRatioSampler> > global_localization_samplers_ cartographer::mapping_2d::SparsePoseGraph::GUARDED_BY ( mutex_  )
private
int num_scans_since_last_loop_closure_ cartographer::mapping_2d::SparsePoseGraph::GUARDED_BY ( mutex_  )
privatepure virtual
bool run_loop_closure_ cartographer::mapping_2d::SparsePoseGraph::GUARDED_BY ( mutex_  )
private
sparse_pose_graph::ConstraintBuilder constraint_builder_ cartographer::mapping_2d::SparsePoseGraph::GUARDED_BY ( mutex_  )
private
std::vector<Constraint> constraints_ cartographer::mapping_2d::SparsePoseGraph::GUARDED_BY ( mutex_  )
private
std::map<const mapping::Submap*, mapping::SubmapId> submap_ids_ cartographer::mapping_2d::SparsePoseGraph::GUARDED_BY ( mutex_  )
private
mapping::NestedVectorsById<SubmapData, mapping::SubmapId> submap_data_ cartographer::mapping_2d::SparsePoseGraph::GUARDED_BY ( mutex_  )
private
mapping::NestedVectorsById<mapping::TrajectoryNode, mapping::NodeId> trajectory_nodes_ cartographer::mapping_2d::SparsePoseGraph::GUARDED_BY ( mutex_  )
private
int num_trajectory_nodes_ cartographer::mapping_2d::SparsePoseGraph::GUARDED_BY ( mutex_  )
privatepure virtual
std::vector<std::vector<sparse_pose_graph::SubmapData> > optimized_submap_transforms_ cartographer::mapping_2d::SparsePoseGraph::GUARDED_BY ( mutex_  )
private
std::vector<std::unique_ptr<mapping::PoseGraphTrimmer> > trimmers_ cartographer::mapping_2d::SparsePoseGraph::GUARDED_BY ( mutex_  )
private
void cartographer::mapping_2d::SparsePoseGraph::HandleScanQueue ( )
private

Definition at line 284 of file 2d/sparse_pose_graph.cc.

int cartographer::mapping_2d::SparsePoseGraph::num_submaps ( int  trajectory_id)
overridevirtual

Implements cartographer::mapping::SparsePoseGraph.

Definition at line 430 of file 2d/sparse_pose_graph.cc.

SparsePoseGraph& cartographer::mapping_2d::SparsePoseGraph::operator= ( const SparsePoseGraph )
delete
void cartographer::mapping_2d::SparsePoseGraph::RunFinalOptimization ( )
overridevirtual

Implements cartographer::mapping::SparsePoseGraph.

Definition at line 350 of file 2d/sparse_pose_graph.cc.

void cartographer::mapping_2d::SparsePoseGraph::RunOptimization ( )
private

Definition at line 361 of file 2d/sparse_pose_graph.cc.

void cartographer::mapping_2d::SparsePoseGraph::WaitForAllComputations ( )
private

Definition at line 310 of file 2d/sparse_pose_graph.cc.

Member Data Documentation

std::vector<std::vector<int> > cartographer::mapping_2d::SparsePoseGraph::connected_components_
private

Definition at line 194 of file 2d/sparse_pose_graph.h.

common::Mutex cartographer::mapping_2d::SparsePoseGraph::mutex_
private

Definition at line 161 of file 2d/sparse_pose_graph.h.

sparse_pose_graph::OptimizationProblem cartographer::mapping_2d::SparsePoseGraph::optimization_problem_
private

Definition at line 182 of file 2d/sparse_pose_graph.h.

const mapping::proto::SparsePoseGraphOptions cartographer::mapping_2d::SparsePoseGraph::options_
private

Definition at line 160 of file 2d/sparse_pose_graph.h.

std::map<int, size_t> cartographer::mapping_2d::SparsePoseGraph::reverse_connected_components_
private

Definition at line 196 of file 2d/sparse_pose_graph.h.


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


cartographer
Author(s):
autogenerated on Mon Jun 10 2019 12:51:39