Class LastSeen

Inheritance Relationships

Base Type

Class Documentation

class LastSeen : public slam_mer::utils::DescriptorModel

The LastSeen descriptor model is a simple model that always returns the last descriptor that was added to it.

Public Types

typedef std::shared_ptr<LastSeen> shared_ptr

Typedef for shared pointer of type LastSeen.

Public Functions

LastSeen() = default

Last Seen descriptor model constructor.

~LastSeen() override = default

Last Seen descriptor model destructor.

inline virtual output_t<descriptor_t> predict(const pose_t &pose_ = pose_t(), const point3d_t &point_ = point3d_t()) override

Predicts the descriptor for a given pose and point.

Parameters:
  • pose_ – The pose for which to predict the descriptor (not used in this model).

  • point_ – The point for which to predict the descriptor (not used in this model).

Returns:

The last descriptor that was added to the model.

inline virtual void fit(const descriptor_t &descriptor_, const pose_t &pose_ = pose_t(), const point3d_t &point_ = point3d_t()) override

Adds a new descriptor to the model. The current descriptor is updated to be the last one added.

Parameters:
  • descriptor_ – The new descriptor to add to the model.

  • pose_ – The pose of the keyframe that observed the descriptor (not used in this model).

  • point_ – The 3d point observation associated with the new descriptor (not used in this model).

Public Static Functions

static inline shared_ptr make_shared()

Creates a shared LastSeen instance.

Returns:

Shared pointer to a new LastSeen object.