You’re reading an older version of the Slamcore SDK documenation. The latest one is 23.01.
Class slamcore::TrajectorySubsystemInterface
-
class TrajectorySubsystemInterface : public SubsystemInterface
Subsystem for accessing trajectories.
A common way of using this subsystem would be as follows:
// Get subsystem from the SLAM system const auto subsystem = slam->getSubsystem<slamcore::TrajectorySubsystemInterface>(); // Fetch most recent trajectories subsystem->fetch(); // You can retrieve some data const auto unoptimisedTrajectory = subsystem->getUnoptimisedTrajectory(); const auto optimisedTrajectory = subsystem->getOptimisedTrajectory(); const auto trackingStatus = subsystem->getTrackingStatus(); // Or you can write the trajectories as csv files to an output directory subsystem->write("trajectories");
Note
There are some positioning modes where the optimised trajectory is not produced. In these cases,
getOptimisedTrajectory
will returnnullptr
.Note
Not thread safe.
Public Types
-
using Ptr = std::shared_ptr<TrajectorySubsystemInterface>
-
using CPtr = std::shared_ptr<const TrajectorySubsystemInterface>
Public Functions
-
inline virtual SubsystemType type() const
Type of the object.
-
virtual ~TrajectorySubsystemInterface() = default
-
template<typename _Rep = int64_t, typename _Period = std::ratio<1>>
inline bool fetch(const std::chrono::duration<_Rep, _Period> &timeout = std::chrono::seconds(0)) Update the internal state with the most recent data.
-
virtual std::shared_ptr<const PoseListInterface<camera_clock>> getUnoptimisedTrajectory() const = 0
Get Unoptimised Trajectory.
-
virtual std::shared_ptr<const TrackingStatusListInterface> getTrackingStatus() const = 0
Get Tracking Status.
-
virtual std::shared_ptr<const PoseListInterface<camera_clock>> getOptimisedTrajectory() const = 0
Get Optimised Trajectory.
Note
For some positioning modes this can return
nullptr
-
virtual TrajectoryPaths write(const std::string &outputDirectory) const = 0
Write trajectories as csv files in given output directory.
Public Static Attributes
-
static constexpr SubsystemType Type = SubsystemType::Trajectory
-
struct TrajectoryPaths
-
using Ptr = std::shared_ptr<TrajectorySubsystemInterface>