4#include <opencv2/core/core.hpp>
6#include "OrbSLAM/Headers/Tracking.h"
7#include "OrbSLAM/Headers/Atlas.h"
8#include "OrbSLAM/Headers/LocalMapping.h"
9#include "OrbSLAM/Headers/LoopClosing.h"
10#include "OrbSLAM/Headers/KeyFrameDatabase.h"
11#include "OrbSLAM/Headers/ORBVocabulary.h"
12#include "OrbSLAM/Headers/Viewer.h"
13#include "OrbSLAM/Headers/SLAMParameters.h"
14#include <NDEVR/IntegratedRotation.h>
160 Atlas* m_atlas =
nullptr;
178 std::thread* mptLocalMapping =
nullptr;
179 std::thread* mptLoopClosing =
nullptr;
182 std::mutex mMutexReset;
183 bool mbReset =
false;
184 bool mbResetActiveMap =
false;
187 std::mutex mMutexMode;
188 bool mbActivateLocalizationMode =
false;
189 bool mbDeactivateLocalizationMode =
false;
191 bool mbShutDown =
false;
195 std::mutex m_mutex_state;
197 fltp08 m_time_offset = Constant<fltp08>::Invalid;
198 int m_last_big_change_idx = 0;
208 for (
uint01 i = 0; i < 4; i++)
210 for (
uint01 x = 0; x < 4; x++)
212 transform[i][x] = mat.row(x).col(i).value();
Manages a collection of maps for the ORB-SLAM system.
The equivelent of std::vector but with a bit more control.
A core class where all Design Objects including models, materials, and geometries are stored.
Logic for reading or writing to a file as well as navigating filesystems or other common file operati...
A light-weight base class for Log that allows processes to update, without the need for additional in...
Database of keyframes for place recognition and relocalization.
Manages the visualization of keyframes in the design model.
A keyframe in the SLAM map, derived from Frame.
Manages the visualization of map points in the design model.
Manages local map building, keyframe processing, and local bundle adjustment.
A light-weight wrapper that will be a no-op if there is not a valid log reference,...
Detects and corrects loop closures and map merges.
Templated logic for doing matrix multiplication.
A core class that represents a node on model hierarchy.
const KeyFrame * lastKeyFrame() const
Returns the last processed keyframe.
double GetTimeFromIMUInit()
Returns the time elapsed since IMU initialization.
Sophus::SE3f TrackRGBD(OrbTrackingInfo &info)
Processes an RGB-D frame and returns the estimated camera pose.
bool isShutDown()
Checks whether the system has been shut down.
bool needsMapReset() const
Checks whether the map needs to be reset.
void setParams(const SLAMParameters ¶ms)
Updates the SLAM configuration parameters.
Buffer< KeyFrame * > getAllKeyFrames() const
Returns all keyframes across all maps.
void ResetActiveMap()
Resets only the active map.
OrbSLAM(const SLAMParameters ¶ms, LogPtr log)
Constructs and initializes the SLAM system without a vocabulary file.
void ActivateLocalizationMode()
Activates localization-only mode (stops map building).
void reset()
Resets the entire system, clearing the Atlas.
void updateInfo(const Matrix< fltp08 > &global_offset, DesignObjectLookup *lookup, const Model &frame_model, const Matrix< fltp08 > &frame_model_transform, bool show_keyframes, bool show_map_points)
Updates the visualization models with current SLAM data.
Sophus::SE3f TrackStereo(OrbTrackingInfo &info)
Processes a stereo frame and returns the estimated camera pose.
Tracking::eTrackingState GetTrackingState()
Returns the current tracking state.
Buffer< Sophus::SE3f > getAllKeyFramesAfter(uint04 index) const
Returns keyframe poses after a given index.
Buffer< MapPoint * > GetTrackedMapPoints()
Returns the tracked map points from the most recent frame.
OrbSLAM(const File &vocab, const SLAMParameters ¶ms, LogPtr log)
Constructs and initializes the SLAM system with a vocabulary file.
bool MapChanged()
Checks whether the map has changed since the last call.
void init(const File &vocab, const SLAMParameters ¶ms)
Initializes the system with a vocabulary file and parameters.
uint04 CurrentMapID() const
Returns the current map ID.
void Shutdown()
Shuts down all threads and waits for them to finish.
void DeactivateLocalizationMode()
Deactivates localization-only mode (resumes SLAM).
Sophus::SE3f TrackMonocular(OrbTrackingInfo &info)
Processes a monocular frame and returns the estimated camera pose.
void ChangeDataset()
Signals a dataset change for multi-sequence operation.
Configuration parameters for the ORB-SLAM system.
Main tracking thread that processes each frame and estimates camera pose.
eTrackingState
Tracking state enumeration.
@ NOT_INITIALIZED
Map not yet initialized.
The primary namespace for the NDEVR SDK.
TemplatedVocabulary< FORB::TDescriptor, FORB > ORBVocabulary
ORB visual vocabulary type for Bag-of-Words place recognition.
uint32_t uint04
-Defines an alias representing a 4 byte, unsigned integer -Can represent exact integer values 0 throu...
double fltp08
Defines an alias representing an 8 byte floating-point number.
uint8_t uint01
-Defines an alias representing a 1 byte, unsigned integer -Can represent exact integer values 0 throu...
@ transform
A 4x4 transform matrix that maps local coordinates into global space.
static Matrix< fltp04 > Convert(Eigen::Matrix4f mat)
Converts an Eigen 4x4 float matrix to an NDEVR Matrix.
Aggregates input and output data for a single tracking frame.
Describes the input sensor type and IMU usage.