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  }
51  m_deltaPose = transform * m_deltaPose;
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 */
void addScan(SLAMScanPtr scan)
Definition: Metascan.cpp:72
virtual Vector3d point(size_t index) const override
Returns the Point at the specified index in global Coordinates.
Definition: Metascan.cpp:59
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
Eigen::Vector3d Vector3d
Eigen 3D vector, double precision.
std::shared_ptr< Scan > ScanPtr
Shared pointer to scans.
Definition: ScanTypes.hpp:98
Transform< double > Transformd
4x4 double precision transformation matrix
Definition: MatrixTypes.hpp:71
A Wrapper around Scan to allow for SLAM usage.
size_t numPoints() const
Returns the number of Points in the Scan.
std::vector< SLAMScanPtr > m_scans
Definition: Metascan.hpp:60
std::shared_ptr< SLAMScanWrapper > SLAMScanPtr
void writeFrame(const Transform< T > &transform, const boost::filesystem::path &framesOut)
Writes a Eigen transformation into a .frames file.
void addFrame(FrameUse use=FrameUse::UNUSED)
Adds a new animation Frame with the current Pose.
FrameUse
Annotates the use of a Scan when creating an slam6D .frames file.


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 Mon Feb 28 2022 22:46:08