Metascan.cpp
Go to the documentation of this file.
1 
35 
36 namespace lvr2
37 {
38 
40  : SLAMScanWrapper(ScanPtr(nullptr))
41 {
42 
43 }
44 
46 {
47  for (auto& scan : m_scans)
48  {
49  scan->transform(transform, writeFrame, use);
50  }
52 
53  if (writeFrame)
54  {
55  addFrame(use);
56  }
57 }
58 
59 Vector3d Metascan::point(size_t index) const
60 {
61  for (auto& scan : m_scans)
62  {
63  if (index < scan->numPoints())
64  {
65  return scan->point(index);
66  }
67  index -= scan->numPoints();
68  }
69  return Vector3d();
70 }
71 
73 {
74  m_scans.push_back(scan);
75  m_numPoints += scan->numPoints();
76  m_deltaPose = scan->deltaPose();
77 }
78 
79 } /* namespace lvr2 */
lvr2::SLAMScanWrapper
A Wrapper around Scan to allow for SLAM usage.
Definition: SLAMScanWrapper.hpp:65
lvr2::SLAMScanWrapper::addFrame
void addFrame(FrameUse use=FrameUse::UNUSED)
Adds a new animation Frame with the current Pose.
Definition: SLAMScanWrapper.cpp:178
transform
Definition: src/tools/lvr2_transform/Options.cpp:44
lvr2::Transformd
Transform< double > Transformd
4x4 double precision transformation matrix
Definition: MatrixTypes.hpp:71
lvr2::writeFrame
void writeFrame(const Transform< T > &transform, const boost::filesystem::path &framesOut)
Writes a Eigen transformation into a .frames file.
lvr2::Metascan::m_scans
std::vector< SLAMScanPtr > m_scans
Definition: Metascan.hpp:60
lvr2::Metascan::transform
virtual void transform(const Transformd &transform, bool writeFrame=true, FrameUse use=FrameUse::UPDATED) override
Applies a relative Transformation to the Scan.
Definition: Metascan.cpp:45
Metascan.hpp
lvr2::Metascan::point
virtual Vector3d point(size_t index) const override
Returns the Point at the specified index in global Coordinates.
Definition: Metascan.cpp:59
lvr2::SLAMScanWrapper::m_numPoints
size_t m_numPoints
Definition: SLAMScanWrapper.hpp:214
lvr2::SLAMScanPtr
std::shared_ptr< SLAMScanWrapper > SLAMScanPtr
Definition: SLAMScanWrapper.hpp:221
lvr2::Metascan::Metascan
Metascan()
Definition: Metascan.cpp:39
lvr2::Vector3d
Eigen::Vector3d Vector3d
Eigen 3D vector, double precision.
Definition: MatrixTypes.hpp:121
lvr2::FrameUse
FrameUse
Annotates the use of a Scan when creating an slam6D .frames file.
Definition: SLAMScanWrapper.hpp:48
lvr2::Metascan::addScan
void addScan(SLAMScanPtr scan)
Definition: Metascan.cpp:72
lvr2
Definition: BaseBufferManipulators.hpp:39
lvr2::SLAMScanWrapper::m_deltaPose
Transformd m_deltaPose
Definition: SLAMScanWrapper.hpp:216
lvr2::SLAMScanWrapper::numPoints
size_t numPoints() const
Returns the number of Points in the Scan.
Definition: SLAMScanWrapper.cpp:153
lvr2::ScanPtr
std::shared_ptr< Scan > ScanPtr
Shared pointer to scans.
Definition: ScanTypes.hpp:98


lvr2
Author(s): Thomas Wiemann , Sebastian Pütz , Alexander Mock , Lars Kiesow , Lukas Kalbertodt , Tristan Igelbrink , Johan M. von Behren , Dominik Feldschnieders , Alexander Löhr
autogenerated on Wed Mar 2 2022 00:37:24