43#include <pcl/registration/boost_graph.h>
44#include <pcl/registration/icp.h>
45#include <pcl/registration/registration.h>
47#include <pcl/pcl_base.h>
49#include <pcl/point_cloud.h>
53namespace registration {
58template <
typename Po
intT>
75 using LoopGraph = boost::adjacency_list<boost::listS,
105 typename boost::graph_traits<LoopGraph>::vertex_descriptor
vd =
107 (*loop_graph_)[
vd].cloud = cloud;
117 return (loop_graph_);
130 inline typename boost::graph_traits<LoopGraph>::vertex_descriptor
133 return (loop_start_);
141 const typename boost::graph_traits<LoopGraph>::vertex_descriptor&
loop_start)
147 inline typename boost::graph_traits<LoopGraph>::vertex_descriptor
180 inline Eigen::Matrix4f
183 return (loop_transform_);
193 compute_loop_ =
false;
212 using LOAGraph = boost::adjacency_list<boost::listS,
216 boost::property<boost::edge_weight_t, double>>;
226 loopOptimizerAlgorithm(LOAGraph& g,
double* weights);
232 typename boost::graph_traits<LoopGraph>::vertex_descriptor loop_start_;
235 typename boost::graph_traits<LoopGraph>::vertex_descriptor loop_end_;
241 Eigen::Matrix4f loop_transform_;
245 typename boost::graph_traits<LoopGraph>::vertex_descriptor vd_;
253#include <pcl/registration/impl/elch.hpp>
Iterator class for point clouds with or without given indices.
IterativeClosestPoint provides a base implementation of the Iterative Closest Point algorithm.
bool deinitCompute()
This method should get called after finishing the actual computation.
shared_ptr< PointCloud< PointT > > Ptr
shared_ptr< const PointCloud< PointT > > ConstPtr
shared_ptr< Registration< PointT, PointT, float > > Ptr
shared_ptr< const Registration< PointT, PointT, float > > ConstPtr
ELCH (Explicit Loop Closing Heuristic) class
boost::adjacency_list< boost::listS, boost::eigen_vecS, boost::undirectedS, Vertex, boost::no_property > LoopGraph
graph structure to hold the SLAM graph
typename PointCloud::Ptr PointCloudPtr
typename Registration::ConstPtr RegistrationConstPtr
void setLoopTransform(const Eigen::Matrix4f &loop_transform)
Setter for the transformation between the first and the last scan.
Eigen::Matrix4f getLoopTransform()
Getter for the transformation between the first and the last scan.
void setLoopEnd(const typename boost::graph_traits< LoopGraph >::vertex_descriptor &loop_end)
Setter for the last scan of a loop.
void addPointCloud(PointCloudPtr cloud)
Add a new point cloud to the internal graph.
void setLoopGraph(LoopGraphPtr loop_graph)
Setter for a new internal graph.
void setLoopStart(const typename boost::graph_traits< LoopGraph >::vertex_descriptor &loop_start)
Setter for the first scan of a loop.
shared_ptr< LoopGraph > LoopGraphPtr
void setReg(RegistrationPtr reg)
Setter for the registration algorithm.
typename PointCloud::ConstPtr PointCloudConstPtr
boost::graph_traits< LoopGraph >::vertex_descriptor getLoopEnd()
Getter for the last scan of a loop.
typename Registration::Ptr RegistrationPtr
boost::graph_traits< LoopGraph >::vertex_descriptor getLoopStart()
Getter for the first scan of a loop.
RegistrationPtr getReg()
Getter for the registration algorithm.
LoopGraphPtr getLoopGraph()
Getter for the internal graph.
virtual bool initCompute()
This method should get called before starting the actual computation.
void compute()
Computes new poses for all point clouds by closing the loop between start and end point cloud.
Defines all the PCL implemented PointT point type structures.
#define PCL_MAKE_ALIGNED_OPERATOR_NEW
Macro to signal a class requires a custom allocator.
Defines functions, macros and traits for allocating and using memory.
Defines all the PCL and non-PCL macros used.
A point structure representing Euclidean xyz coordinates, and the RGB color.
Eigen::Affine3f transform