Point Cloud Library (PCL) 1.12.0
Loading...
Searching...
No Matches
pcl::registration::GraphHandler< GraphT > Class Template Reference

GraphHandler class is a wrapper for a general SLAM graph The actual graph class must fulfill the following boost::graph concepts: More...

#include <pcl/registration/graph_handler.h>

Public Types

using Ptr = shared_ptr<GraphHandler<GraphT>>
 
using ConstPtr = shared_ptr<const GraphHandler<GraphT>>
 
using GraphPtr = shared_ptr<GraphT>
 
using GraphConstPtr = shared_ptr<const GraphT>
 
using Vertex = typename boost::graph_traits<GraphT>::vertex_descriptor
 
using Edge = typename boost::graph_traits<GraphT>::edge_descriptor
 

Public Member Functions

 GraphHandler ()
 Empty constructor.
 
 ~GraphHandler ()
 Destructor.
 
void clear ()
 Clear the graph.
 
GraphConstPtr getGraph () const
 Get a pointer to the BGL graph.
 
GraphPtr getGraph ()
 Get a pointer to the BGL graph.
 
template<class PointT >
Vertex addPointCloud (const typename pcl::PointCloud< PointT >::ConstPtr &cloud, const Eigen::Matrix4f &pose)
 Add a new point cloud to the graph and return the new vertex.
 
template<class EstimateT >
Vertex addGenericVertex (const EstimateT &estimate)
 Add a new generic vertex created according to the given estimate.
 
template<class InformationT >
Edge addPoseConstraint (const Vertex &v_start, const Vertex &v_end, const Eigen::Matrix4f &relative_transformation, const InformationT &information_matrix)
 Add a new constraint between two poses.
 
template<class MeasurementT >
Edge addGenericConstraint (const MeasurementT &measurement)
 Add a generic constraint created according to the given measurement.
 
void removeVertex (const Vertex &v)
 Remove a vertex from the graph.
 
void removeConstraint (const Edge &e)
 Remove a constraint from the graph.
 

Protected Member Functions

bool init ()
 This method is called right after the creation of graph_impl_.
 
bool deinit ()
 This method is called when graph_impl_ is going to be destroyed.
 

Detailed Description

template<typename GraphT>
class pcl::registration::GraphHandler< GraphT >

GraphHandler class is a wrapper for a general SLAM graph The actual graph class must fulfill the following boost::graph concepts:

  • BidirectionalGraph
  • AdjacencyGraph
  • VertexAndEdgeListGraph
  • MutableGraph

Other valid expressions:

  • add_edge (m,g) add a new edge according to the given measurement. Return type: std::pair<edge_descriptor, bool>
  • add_vertex (e,g) add a new vertex according to the given estimate. Return type: vertex_descriptor
  • get_pose (v,g) retrieve the pose estimate for v, if any. Return type: Eigen::Matrix4f
  • get_cloud (v,g) retrieve the cloud pointer associated to v, if any. Return type: pcl::PointCloud<PointT>::ConstPtr
  • set_estimate (v,e,g) set the estimate for an existing vertex. Return type: void.
  • set_measurement (d,m,g) set the measurement for an existing edge. Return type: void. Notation:
  • m an edge measurement
  • e a vertex estimate
  • v a vertex
  • d an edge
  • g a graph A valid graph implementation should accept at least the PoseEstimate estimate and the PoseMeasurement measurement

If a specific graph implementation needs initialization and/or finalization, specialize the protected methods init() and deinit() for your graph type

Author
Nicola Fioraio

Definition at line 85 of file graph_handler.h.

Member Typedef Documentation

◆ ConstPtr

template<typename GraphT >
using pcl::registration::GraphHandler< GraphT >::ConstPtr = shared_ptr<const GraphHandler<GraphT>>

Definition at line 88 of file graph_handler.h.

◆ Edge

template<typename GraphT >
using pcl::registration::GraphHandler< GraphT >::Edge = typename boost::graph_traits<GraphT>::edge_descriptor

Definition at line 93 of file graph_handler.h.

◆ GraphConstPtr

template<typename GraphT >
using pcl::registration::GraphHandler< GraphT >::GraphConstPtr = shared_ptr<const GraphT>

Definition at line 90 of file graph_handler.h.

◆ GraphPtr

template<typename GraphT >
using pcl::registration::GraphHandler< GraphT >::GraphPtr = shared_ptr<GraphT>

Definition at line 89 of file graph_handler.h.

◆ Ptr

template<typename GraphT >
using pcl::registration::GraphHandler< GraphT >::Ptr = shared_ptr<GraphHandler<GraphT>>

Definition at line 87 of file graph_handler.h.

◆ Vertex

template<typename GraphT >
using pcl::registration::GraphHandler< GraphT >::Vertex = typename boost::graph_traits<GraphT>::vertex_descriptor

Definition at line 92 of file graph_handler.h.

Constructor & Destructor Documentation

◆ GraphHandler()

template<typename GraphT >
pcl::registration::GraphHandler< GraphT >::GraphHandler ( )
inline

Empty constructor.

Definition at line 96 of file graph_handler.h.

References pcl::registration::GraphHandler< GraphT >::init().

◆ ~GraphHandler()

template<typename GraphT >
pcl::registration::GraphHandler< GraphT >::~GraphHandler ( )
inline

Destructor.

Definition at line 106 of file graph_handler.h.

References pcl::registration::GraphHandler< GraphT >::deinit().

Member Function Documentation

◆ addGenericConstraint()

template<typename GraphT >
template<class MeasurementT >
Edge pcl::registration::GraphHandler< GraphT >::addGenericConstraint ( const MeasurementT & measurement)
inline

Add a generic constraint created according to the given measurement.

Parameters
measurementthe measurement
Returns
a reference to the new edge

Definition at line 184 of file graph_handler.h.

◆ addGenericVertex()

template<typename GraphT >
template<class EstimateT >
Vertex pcl::registration::GraphHandler< GraphT >::addGenericVertex ( const EstimateT & estimate)
inline

Add a new generic vertex created according to the given estimate.

Parameters
estimatethe parameters' estimate
Returns
a reference to the new vertex

Definition at line 154 of file graph_handler.h.

◆ addPointCloud()

template<typename GraphT >
template<class PointT >
Vertex pcl::registration::GraphHandler< GraphT >::addPointCloud ( const typename pcl::PointCloud< PointT >::ConstPtr & cloud,
const Eigen::Matrix4f & pose )
inline

Add a new point cloud to the graph and return the new vertex.

Parameters
cloudthe new point cloud
posethe pose estimate
Returns
a reference to the new vertex

Definition at line 142 of file graph_handler.h.

◆ addPoseConstraint()

template<typename GraphT >
template<class InformationT >
Edge pcl::registration::GraphHandler< GraphT >::addPoseConstraint ( const Vertex & v_start,
const Vertex & v_end,
const Eigen::Matrix4f & relative_transformation,
const InformationT & information_matrix )
inline

Add a new constraint between two poses.

Parameters
v_startthe first pose
v_endthe second pose
relative_transformationthe transformation from v_start to v_end
information_matrixthe uncertainty
Returns
a reference to the new edge

Definition at line 168 of file graph_handler.h.

◆ clear()

template<typename GraphT >
void pcl::registration::GraphHandler< GraphT >::clear ( )
inline

◆ deinit()

template<typename GraphT >
bool pcl::registration::GraphHandler< GraphT >::deinit ( )
inlineprotected

This method is called when graph_impl_ is going to be destroyed.

Definition at line 217 of file graph_handler.h.

Referenced by pcl::registration::GraphHandler< GraphT >::clear(), and pcl::registration::GraphHandler< GraphT >::~GraphHandler().

◆ getGraph() [1/2]

template<typename GraphT >
GraphPtr pcl::registration::GraphHandler< GraphT >::getGraph ( )
inline

Get a pointer to the BGL graph.

Definition at line 130 of file graph_handler.h.

◆ getGraph() [2/2]

template<typename GraphT >
GraphConstPtr pcl::registration::GraphHandler< GraphT >::getGraph ( ) const
inline

Get a pointer to the BGL graph.

Definition at line 123 of file graph_handler.h.

◆ init()

template<typename GraphT >
bool pcl::registration::GraphHandler< GraphT >::init ( )
inlineprotected

This method is called right after the creation of graph_impl_.

Definition at line 210 of file graph_handler.h.

Referenced by pcl::registration::GraphHandler< GraphT >::clear(), and pcl::registration::GraphHandler< GraphT >::GraphHandler().

◆ removeConstraint()

template<typename GraphT >
void pcl::registration::GraphHandler< GraphT >::removeConstraint ( const Edge & e)
inline

Remove a constraint from the graph.

Parameters
ethe edge

Definition at line 202 of file graph_handler.h.

◆ removeVertex()

template<typename GraphT >
void pcl::registration::GraphHandler< GraphT >::removeVertex ( const Vertex & v)
inline

Remove a vertex from the graph.

Parameters
vthe vertex

Definition at line 193 of file graph_handler.h.


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