NDEVR
API Documentation
SLAMEngine.h
1#pragma once
2#include "DLLInfo.h"
3#include <NDEVR/SoftwareService.h>
4#include <NDEVR/Buffer.h>
5#include <NDEVR/UUID.h>
6#include <NDEVR/RGBColor.h>
7#include <NDEVR/Vertex.h>
8#include <NDEVR/Matrix.h>
9#include <NDEVR/Dictionary.h>
10namespace NDEVR
11{
16 {
17 public:
22 fltp08 time = Constant<fltp08>::Invalid;
23 fltp08 max_distance_error = Constant<fltp08>::Invalid;
24 fltp08 max_transform_error = Constant<fltp08>::Invalid;
25 bool request_filter = true;
26 };
27
31 {
32 public:
37 virtual void addFrame(const SLAMFrame& frame) = 0;
38
45
50 virtual Matrix<fltp08> getTransform() const = 0;
51
55 virtual void reset() = 0;
56 };
57
62 {
63 public:
69
74 virtual UUID id() const = 0;
75 };
76
79 class NDEVR_DESIGN_API SLAMEngineManager : public SoftwareServiceManager
80 {
81 public:
87 static void RegisterEngine(SLAMEngineFactory* engine, bool make_default);
88
94
100
106 private:
107 static Dictionary<UUID, SLAMEngineFactory*> s_engines;
108 static UUID s_default_engine;
109 };
110
111}
The equivelent of std::vector but with a bit more control.
Definition Buffer.hpp:58
A hash-based key-value store, useful for quick associative lookups.
Definition Dictionary.h:64
Templated logic for doing matrix multiplication.
Definition Matrix.hpp:182
Creates a SLAM engine when required.
Definition SLAMEngine.h:62
virtual UUID id() const =0
Returns the unique identifier for this SLAM engine factory.
virtual SLAMEngine * createSLAMEngine()=0
Creates a new instance of a SLAM engine.
Registers engines which can be used in the SLAM process.
Definition SLAMEngine.h:80
static Dictionary< UUID, SLAMEngineFactory * > & Engines()
Returns the dictionary of all registered SLAM engine factories.
static void RegisterEngine(SLAMEngineFactory *engine, bool make_default)
Registers a SLAM engine factory with the manager.
static SLAMEngineFactory * DefaultEngineFactory()
Returns the default SLAM engine factory.
static SLAMEngine * CreateDefaultSLAMEngine()
Creates a new SLAM engine instance using the default factory.
Provides logic to perform SLAM on an object.
Definition SLAMEngine.h:31
virtual void addFrame(const SLAMFrame &frame)=0
Adds a new data frame to the SLAM engine for processing and alignment.
virtual void reset()=0
Resets the SLAM engine to its initial state, clearing all accumulated data and transforms.
virtual Matrix< fltp08 > getTransform() const =0
Gets the current accumulated transform computed by the SLAM engine.
virtual void setTransform(Matrix< fltp08 > &transform)=0
Sets the current accumulated transform of the SLAM engine.
A frame of data that can be processed by a SLAM engine to determine relative location.
Definition SLAMEngine.h:16
Buffer< RGBColor > colors
Per-point color data corresponding to entries in points.
Definition SLAMEngine.h:20
fltp08 max_transform_error
The maximum allowable transform error threshold for alignment convergence.
Definition SLAMEngine.h:24
Buffer< Vertex< 3, fltp04 > > points
The 3D point cloud data captured in this frame.
Definition SLAMEngine.h:19
fltp08 time
The timestamp at which this frame was captured.
Definition SLAMEngine.h:22
Matrix< fltp08 > estimated_transform
The estimated transform for this frame, used as an initial guess for alignment.
Definition SLAMEngine.h:18
bool request_filter
Whether to request outlier filtering during frame processing.
Definition SLAMEngine.h:25
fltp08 max_distance_error
The maximum allowable distance error threshold for point matching.
Definition SLAMEngine.h:23
Buffer< Ray< 3, fltp04 > > normals
Per-point surface normals corresponding to entries in points.
Definition SLAMEngine.h:21
Software Service Managers take a Software service to modify the behavior of the software.
Base interface for services that extend or modify software behavior through modules.
A universally unique identifier (UUID) is a 128-bit number used to identify information in computer s...
Definition UUID.h:61
The primary namespace for the NDEVR SDK.
double fltp08
Defines an alias representing an 8 byte floating-point number.
@ transform
A 4x4 transform matrix that maps local coordinates into global space.
Defines for a given type (such as sint04, fltp08, UUID, etc) a maximum, minimum, and reserved 'invali...