Class slamcore::TrajectoryHelper

class TrajectoryHelper

Client-side helper meant to help aggregate tracking statuses and poses into trajectories

It also helps write out trajectories to disk in a consistent and unified format


The helper is not thread-safe

Public Types

using TrackingStatusList = std::vector<std::pair<TrackingStatus, camera_clock::time_point>>

Public Functions

void feed(ConstTaggedObject obj)

Either pass every single object through the helper or at the very least poses, metadata and frame syncs.


obj[in] object as returned from polling or callback SLAM

const PoseListInterface<camera_clock> &getUnoptimisedTrajectory() const

list of poses accumulated so far

const TrackingStatusList &getTrackingStatus() const

These are augmented with timestamps from the pose stream.


list of tracking statuses accumulated so far.

std::error_code writeTrajectories(const std::string &directory, const PoseListInterface<camera_clock> *optimisedTrajectory = nullptr, std::ostream *stream = nullptr) const
  • directory[in] path to directory where the trajectories should be written. The directory needs to exist.

  • optimisedTrajectory[in] Optional pointer to optimised can be passed in from the OptimisedTrajectorySubsystem

  • stream[in] Optional pointer to std::ostream for verbose output


error_code indicating success