Point Cloud Library (PCL)
1.11.1-dev
|
43 #include <pcl/registration/boost.h>
44 #include <pcl/registration/boost_graph.h>
45 #include <pcl/registration/icp.h>
46 #include <pcl/registration/registration.h>
48 #include <pcl/pcl_base.h>
50 #include <pcl/point_cloud.h>
54 namespace registration {
59 template <
typename Po
intT>
62 using Ptr = shared_ptr<ELCH<PointT>>;
63 using ConstPtr = shared_ptr<const ELCH<PointT>>;
76 using LoopGraph = boost::adjacency_list<boost::listS,
106 typename boost::graph_traits<LoopGraph>::vertex_descriptor vd =
107 add_vertex(*loop_graph_);
108 (*loop_graph_)[vd].cloud = cloud;
109 if (num_vertices(*loop_graph_) > 1)
110 add_edge(vd_, vd, *loop_graph_);
118 return (loop_graph_);
127 loop_graph_ = loop_graph;
131 inline typename boost::graph_traits<LoopGraph>::vertex_descriptor
134 return (loop_start_);
142 const typename boost::graph_traits<LoopGraph>::vertex_descriptor& loop_start)
144 loop_start_ = loop_start;
148 inline typename boost::graph_traits<LoopGraph>::vertex_descriptor
158 setLoopEnd(
const typename boost::graph_traits<LoopGraph>::vertex_descriptor& loop_end)
160 loop_end_ = loop_end;
181 inline Eigen::Matrix4f
184 return (loop_transform_);
193 loop_transform_ = loop_transform;
194 compute_loop_ =
false;
213 using LOAGraph = boost::adjacency_list<boost::listS,
217 boost::property<boost::edge_weight_t, double>>;
227 loopOptimizerAlgorithm(LOAGraph& g,
double* weights);
233 typename boost::graph_traits<LoopGraph>::vertex_descriptor loop_start_;
236 typename boost::graph_traits<LoopGraph>::vertex_descriptor loop_end_;
242 Eigen::Matrix4f loop_transform_;
246 typename boost::graph_traits<LoopGraph>::vertex_descriptor vd_;
254 #include <pcl/registration/impl/elch.hpp>
void addPointCloud(PointCloudPtr cloud)
Add a new point cloud to the internal graph.
void setLoopStart(const typename boost::graph_traits< LoopGraph >::vertex_descriptor &loop_start)
Setter for the first scan of a loop.
Defines all the PCL and non-PCL macros used.
typename Registration::Ptr RegistrationPtr
shared_ptr< const ELCH< PointT > > ConstPtr
typename PointCloud::ConstPtr PointCloudConstPtr
typename PointCloud::Ptr PointCloudPtr
boost::graph_traits< LoopGraph >::vertex_descriptor getLoopStart()
Getter for the first scan of a loop.
typename Registration::ConstPtr RegistrationConstPtr
void compute()
Computes new poses for all point clouds by closing the loop between start and end point cloud.
void setReg(RegistrationPtr reg)
Setter for the registration algorithm.
void setLoopEnd(const typename boost::graph_traits< LoopGraph >::vertex_descriptor &loop_end)
Setter for the last scan of a loop.
LoopGraphPtr getLoopGraph()
Getter for the internal graph.
void setLoopTransform(const Eigen::Matrix4f &loop_transform)
Setter for the transformation between the first and the last scan.
IterativeClosestPoint provides a base implementation of the Iterative Closest Point algorithm.
shared_ptr< ELCH< PointT > > Ptr
PointCloud represents the base class in PCL for storing collections of 3D points.
A point structure representing Euclidean xyz coordinates, and the RGB color.
shared_ptr< Registration< PointT, PointT, float > > Ptr
void setLoopGraph(LoopGraphPtr loop_graph)
Setter for a new internal graph.
ELCH (Explicit Loop Closing Heuristic) class
virtual bool initCompute()
This method should get called before starting the actual computation.
#define PCL_MAKE_ALIGNED_OPERATOR_NEW
Macro to signal a class requires a custom allocator.
shared_ptr< LoopGraph > LoopGraphPtr
Eigen::Matrix4f getLoopTransform()
Getter for the transformation between the first and the last scan.
Eigen::Affine3f transform
shared_ptr< PointCloud< PointT > > Ptr
shared_ptr< const PointCloud< PointT > > ConstPtr
RegistrationPtr getReg()
Getter for the registration algorithm.
boost::graph_traits< LoopGraph >::vertex_descriptor getLoopEnd()
Getter for the last scan of a loop.
Defines functions, macros and traits for allocating and using memory.
shared_ptr< const Registration< PointT, PointT, float > > ConstPtr
boost::adjacency_list< boost::listS, boost::eigen_vecS, boost::undirectedS, Vertex, boost::no_property > LoopGraph
graph structure to hold the SLAM graph