You’re reading an older version of the Slamcore SDK documenation. The latest one is 23.01.

File types.hpp

Types used across the API.

Helper functions for slamcore::SensorType

template<class Archive>
static inline void load_minimal(const Archive&, SensorType &obj, const std::string &value)
template<class Archive>
static inline std::string save_minimal(const Archive&, const SensorType &obj)
static inline std::ostream &operator<<(std::ostream &os, const SensorType obj)

Helper functions for slamcore::ImageFormat

template<class Archive>
static inline void load_minimal(const Archive&, ImageFormat &obj, const std::string &value)
template<class Archive>
static inline std::string save_minimal(const Archive&, const ImageFormat &obj)
static inline std::ostream &operator<<(std::ostream &os, const ImageFormat obj)

Helper conversion methods

slamcore::ImageFormat \(\leftrightarrow\) BytesPerPixel

template<ImageFormat fmt>
static inline std::size_t ImageFormatToBytesPerPixel()
static inline std::size_t ImageFormatToBytesPerPixel(const ImageFormat fmt)

Helper functions for slamcore::MetaDataID

template<class Archive>
static inline void load_minimal(const Archive&, MetaDataID &obj, const std::string &value)
template<class Archive>
static inline std::string save_minimal(const Archive&, const MetaDataID &obj)
static inline std::ostream &operator<<(std::ostream &os, const MetaDataID obj)

Typedefs

using ScalarT = double

Default scalar type.

using EnumBaseT = uint16_t

Enum underlying integer type.

using IDT = uint64_t

Generic ID type.

using SessionIDT = uint64_t

Session ID type.

using SensorIndexT = uint16_t

Sensor Index type.

using SensorIDT = std::pair<SensorType, SensorIndexT>

Sensor ID type.

SensorType and Sensor Index.

Enums

enum class SensorType : EnumBaseT

Possible Sensor Types.

Values:

enumerator SLAM

Outputs from SLAM.

enumerator Visible

Standard Visible (Grey/RGB) Sensor (Camera).

enumerator Depth

Standard Depth Sensor (Camera).

enumerator Infrared

Standard Infrared Sensor (Camera).

enumerator Confidence

For time-of-flight Sensors (Camera).

enumerator Phase

For time-of-flight Sensors (Camera).

enumerator Accelerometer

Inertial Accelerometer Sensor (IMU).

enumerator Gyroscope

Inertial Gyroscope Sensor (IMU).

enumerator Magnetometer

Inertial Magnetometer Sensor (IMU).

enumerator GPS

GPS Sensor.

enumerator Odometry

Odometry Sensor.

enumerator Encoder

Encoder, for wheel ticks.

enumerator Pose

Pose “Sensor”, e.g. ground truth.

enumerator Bumper

Bumper

enumerator Proximity

Proximity sensor.

enumerator LIDAR

LIDAR (2D).

enumerator Count
enum class ImageFormat : EnumBaseT

Various internal image formats.

Values:

enumerator Custom

Undefined.

enumerator Mono_8

8 bit per pixel

enumerator Mono_16

16 bit per pixel

enumerator Mono_F

32 bit float per pixel

enumerator RGB_8

8 bit per component, RGB

enumerator RGBA_8

8 bit per component, RGBA

enumerator RGB_F

32 bit float per component, RGB

enumerator RGBA_F

32 bit float per component, RGBA

enumerator JPEG

Binary JPEG data.

enumerator Mono_32

32 bit per pixel

enumerator Mono_64

64 bit per pixel

enumerator Count
enum class MetaDataID : EnumBaseT

Various supported MetaData variables.

Values:

enumerator TrackingStatus
enumerator NumFeatures
enumerator TrackedFeatures
enumerator DistanceTravelled
enumerator ProcessedFrameRate
enumerator TotalDroppedFrames
enumerator Count
enum class TrackingStatus

Enumerate for the Tracking status.

Values:

enumerator NOT_INITIALISED

System is not initialised (waiting for initialisation)

enumerator OK

System is initialised and we are tracking.

enumerator LOST

System is lost and we are in relocalisation mode.

enumerator RELOCALISED

System has just relocalised.

enumerator LOOP_CLOSURE

A loop closure event has been triggered.

enumerator Count
enum class PositioningMode : EnumBaseT

Type of positioning mode.

Values:

enumerator ODOMETRY_ONLY

Visual-only or visual inertial odometry.

enumerator SLAM

SLAM mode enables relocalisation and loop-closure.

enumerator MULTISESSION_LOCALISATION

Bootstrap from pure_relocalisation and then VIO and reuse of old landmarks with the Visibility Classifier.

enumerator Count

Functions

static inline bool strcasecmp(const std::string &str1, const std::string &str2)

Static insensitive comparison of two strings.

static inline std::ostream &operator<<(std::ostream &os, const SensorIDT obj)
template<class Archive>
std::string save_minimal(const Archive&, const TrackingStatus &obj)
template<class Archive>
void load_minimal(const Archive&, TrackingStatus &obj, const std::string &value)
static inline std::ostream &operator<<(std::ostream &os, const TrackingStatus &obj)
template<class Archive>
std::string save_minimal(const Archive&, const PositioningMode &obj)
template<class Archive>
void load_minimal(const Archive&, PositioningMode &obj, const std::string &value)
static inline std::ostream &operator<<(std::ostream &os, const PositioningMode &obj)
template<>
struct ImageFormatTraits<ImageFormat::Mono_8>
#include <types.hpp>

Public Types

using ChannelType = uint8_t

Public Static Attributes

static constexpr std::size_t Channels = 1
template<>
struct ImageFormatTraits<ImageFormat::Mono_16>
#include <types.hpp>

Public Types

using ChannelType = uint16_t

Public Static Attributes

static constexpr std::size_t Channels = 1
template<>
struct ImageFormatTraits<ImageFormat::Mono_F>
#include <types.hpp>

Public Types

using ChannelType = float

Public Static Attributes

static constexpr std::size_t Channels = 1
template<>
struct ImageFormatTraits<ImageFormat::RGB_8>
#include <types.hpp>

Public Types

using ChannelType = uint8_t

Public Static Attributes

static constexpr std::size_t Channels = 3
template<>
struct ImageFormatTraits<ImageFormat::RGBA_8>
#include <types.hpp>

Public Types

using ChannelType = uint8_t

Public Static Attributes

static constexpr std::size_t Channels = 4
template<>
struct ImageFormatTraits<ImageFormat::RGB_F>
#include <types.hpp>

Public Types

using ChannelType = float

Public Static Attributes

static constexpr std::size_t Channels = 3
template<>
struct ImageFormatTraits<ImageFormat::RGBA_F>
#include <types.hpp>

Public Types

using ChannelType = float

Public Static Attributes

static constexpr std::size_t Channels = 4
template<>
struct ImageFormatTraits<ImageFormat::Mono_32>
#include <types.hpp>

Public Types

using ChannelType = uint32_t

Public Static Attributes

static constexpr std::size_t Channels = 1
template<>
struct ImageFormatTraits<ImageFormat::Mono_64>
#include <types.hpp>

Public Types

using ChannelType = uint64_t

Public Static Attributes

static constexpr std::size_t Channels = 1
namespace slamcore

Main namespace for the SLAMcore public API

Get information about the client library

Helper functions for slamcore::SensorType

template<class Archive>
static inline void load_minimal(const Archive&, SensorType &obj, const std::string &value)
template<class Archive>
static inline std::string save_minimal(const Archive&, const SensorType &obj)
static inline std::ostream &operator<<(std::ostream &os, const SensorType obj)

Helper functions for slamcore::ImageFormat

template<class Archive>
static inline void load_minimal(const Archive&, ImageFormat &obj, const std::string &value)
template<class Archive>
static inline std::string save_minimal(const Archive&, const ImageFormat &obj)
static inline std::ostream &operator<<(std::ostream &os, const ImageFormat obj)

Helper conversion methods

slamcore::ImageFormat \(\leftrightarrow\) BytesPerPixel

template<ImageFormat fmt>
static inline std::size_t ImageFormatToBytesPerPixel()
static inline std::size_t ImageFormatToBytesPerPixel(const ImageFormat fmt)

Helper functions for slamcore::MetaDataID

template<class Archive>
static inline void load_minimal(const Archive&, MetaDataID &obj, const std::string &value)
template<class Archive>
static inline std::string save_minimal(const Archive&, const MetaDataID &obj)
static inline std::ostream &operator<<(std::ostream &os, const MetaDataID obj)

Typedefs

using ScalarT = double

Default scalar type.

using EnumBaseT = uint16_t

Enum underlying integer type.

using IDT = uint64_t

Generic ID type.

using SessionIDT = uint64_t

Session ID type.

using SensorIndexT = uint16_t

Sensor Index type.

using SensorIDT = std::pair<SensorType, SensorIndexT>

Sensor ID type.

SensorType and Sensor Index.

Enums

enum class SensorType : EnumBaseT

Possible Sensor Types.

Values:

enumerator SLAM

Outputs from SLAM.

enumerator Visible

Standard Visible (Grey/RGB) Sensor (Camera).

enumerator Depth

Standard Depth Sensor (Camera).

enumerator Infrared

Standard Infrared Sensor (Camera).

enumerator Confidence

For time-of-flight Sensors (Camera).

enumerator Phase

For time-of-flight Sensors (Camera).

enumerator Accelerometer

Inertial Accelerometer Sensor (IMU).

enumerator Gyroscope

Inertial Gyroscope Sensor (IMU).

enumerator Magnetometer

Inertial Magnetometer Sensor (IMU).

enumerator GPS

GPS Sensor.

enumerator Odometry

Odometry Sensor.

enumerator Encoder

Encoder, for wheel ticks.

enumerator Pose

Pose “Sensor”, e.g. ground truth.

enumerator Bumper

Bumper

enumerator Proximity

Proximity sensor.

enumerator LIDAR

LIDAR (2D).

enumerator Count
enum class ImageFormat : EnumBaseT

Various internal image formats.

Values:

enumerator Custom

Undefined.

enumerator Mono_8

8 bit per pixel

enumerator Mono_16

16 bit per pixel

enumerator Mono_F

32 bit float per pixel

enumerator RGB_8

8 bit per component, RGB

enumerator RGBA_8

8 bit per component, RGBA

enumerator RGB_F

32 bit float per component, RGB

enumerator RGBA_F

32 bit float per component, RGBA

enumerator JPEG

Binary JPEG data.

enumerator Mono_32

32 bit per pixel

enumerator Mono_64

64 bit per pixel

enumerator Count
enum class MetaDataID : EnumBaseT

Various supported MetaData variables.

Values:

enumerator TrackingStatus
enumerator NumFeatures
enumerator TrackedFeatures
enumerator DistanceTravelled
enumerator ProcessedFrameRate
enumerator TotalDroppedFrames
enumerator Count
enum class TrackingStatus

Enumerate for the Tracking status.

Values:

enumerator NOT_INITIALISED

System is not initialised (waiting for initialisation)

enumerator OK

System is initialised and we are tracking.

enumerator LOST

System is lost and we are in relocalisation mode.

enumerator RELOCALISED

System has just relocalised.

enumerator LOOP_CLOSURE

A loop closure event has been triggered.

enumerator Count
enum class PositioningMode : EnumBaseT

Type of positioning mode.

Values:

enumerator ODOMETRY_ONLY

Visual-only or visual inertial odometry.

enumerator SLAM

SLAM mode enables relocalisation and loop-closure.

enumerator MULTISESSION_LOCALISATION

Bootstrap from pure_relocalisation and then VIO and reuse of old landmarks with the Visibility Classifier.

enumerator Count

Functions

static inline bool strcasecmp(const std::string &str1, const std::string &str2)

Static insensitive comparison of two strings.

static inline std::ostream &operator<<(std::ostream &os, const SensorIDT obj)
template<class Archive>
std::string save_minimal(const Archive&, const TrackingStatus &obj)
template<class Archive>
void load_minimal(const Archive&, TrackingStatus &obj, const std::string &value)
static inline std::ostream &operator<<(std::ostream &os, const TrackingStatus &obj)
template<class Archive>
std::string save_minimal(const Archive&, const PositioningMode &obj)
template<class Archive>
void load_minimal(const Archive&, PositioningMode &obj, const std::string &value)
static inline std::ostream &operator<<(std::ostream &os, const PositioningMode &obj)
template<ImageFormat fmt>
struct ImageFormatTraits
#include <types.hpp>

Traits specific to the corresponding slamcore::ImageFormat they are templated for Supports storing information for the following properties:

  • Channels - numbers of associated channels

  • ChannelType - e.g., float / double, …

template<> Mono_16 >
#include <types.hpp>

Public Types

using ChannelType = uint16_t

Public Static Attributes

static constexpr std::size_t Channels = 1
template<> Mono_32 >
#include <types.hpp>

Public Types

using ChannelType = uint32_t

Public Static Attributes

static constexpr std::size_t Channels = 1
template<> Mono_64 >
#include <types.hpp>

Public Types

using ChannelType = uint64_t

Public Static Attributes

static constexpr std::size_t Channels = 1
template<> Mono_8 >
#include <types.hpp>

Public Types

using ChannelType = uint8_t

Public Static Attributes

static constexpr std::size_t Channels = 1
template<> Mono_F >
#include <types.hpp>

Public Types

using ChannelType = float

Public Static Attributes

static constexpr std::size_t Channels = 1
template<> RGB_8 >
#include <types.hpp>

Public Types

using ChannelType = uint8_t

Public Static Attributes

static constexpr std::size_t Channels = 3
template<> RGB_F >
#include <types.hpp>

Public Types

using ChannelType = float

Public Static Attributes

static constexpr std::size_t Channels = 3
template<> RGBA_8 >
#include <types.hpp>

Public Types

using ChannelType = uint8_t

Public Static Attributes

static constexpr std::size_t Channels = 4
template<> RGBA_F >
#include <types.hpp>

Public Types

using ChannelType = float

Public Static Attributes

static constexpr std::size_t Channels = 4
struct MultiSessionID
#include <types.hpp>

ID for objects that can come from different sessions.

Public Types

using ValueT = int64_t

Public Functions

inline MultiSessionID()
inline MultiSessionID(const SessionIDT sid, const ValueT id)
MultiSessionID(const MultiSessionID &rhs) = default
MultiSessionID(MultiSessionID &&rhs) = default
MultiSessionID &operator=(MultiSessionID &&rhs) = default
MultiSessionID &operator=(const MultiSessionID &rhs) = default
inline ValueT value() const

Returns the zero-based index or -1 for the special case MultiFrameID.

inline SessionIDT session() const

Get the session ID.

Public Static Attributes

static constexpr SessionIDT s_invalidSession = std::numeric_limits<SessionIDT>::max()

Private Members

SessionIDT m_session_id
ValueT m_value

Friends

friend struct MultiSessionIDAccess
inline friend std::ostream &operator<<(std::ostream &os, const MultiSessionID &v)
template<typename ContainerT>
class RangeIterator
#include <types.hpp>

Simple indexing iterator. Needs operator()[] in the container.

Public Types

using value_type = typename ContainerT::value_type

Public Functions

inline RangeIterator(const ContainerT &c, std::size_t idx = 0)
inline bool operator!=(const RangeIterator &other) const
inline const RangeIterator &operator++() const
value_type &operator*()
const value_type &operator*() const

Private Members

const ContainerT &m_cont
mutable std::size_t m_idx
struct ReferenceFrameInterface
#include <types.hpp>

Interface representing a coordinate system frame of reference

Subclassed by DummyReferenceFrame

Public Functions

virtual ~ReferenceFrameInterface() = default
virtual const std::string &name() const = 0

Human readable name for the frame of reference

inline bool operator==(const ReferenceFrameInterface &other) const
inline bool operator!=(const ReferenceFrameInterface &other) const