Skip to main content

AttitudeTracker API

Source headers: raptor/sync/errors.hpp, raptor/sync/AttitudeTracker.hpp

raptor::sync​

Types​

NameDescription
AttitudeTrackerStateful camera-attitude tracking against the maps loaded in a Context.
AttitudeTrackerErrorError codes returned by AttitudeTracker::update().
AttitudeTrackerUpdateSuccessful attitude and lens estimate for a frame.

Type Aliases​

NameDescription
FomFigure of merit (FOM) for an attitude-tracking estimate.

Type Alias Details​

Fom​

using Fom = double

Figure of merit (FOM) for an attitude-tracking estimate.

Describes the similarity between the input image and the reference dataset it was matched against during registration. Successful estimates have values in the range [0.0, 1.0]; a higher value indicates a better result.

raptor::sync::AttitudeTracker​

class AttitudeTracker

Stateful camera-attitude tracking against the maps loaded in a Context.

The constructor prepares all tracking state from the Context. Pass images to update() in capture order; each update depends on the state produced by its predecessors.

warning

Do not call update() concurrently on the same instance: each update depends on the previous one, so calls must be made one at a time in capture order. Different trackers, and other SDK objects and functions sharing the raptor::Context, may be used concurrently.

Type Aliases​

NameDescription
UpdateResultOutcome of update().

Functions​

NameDescription
AttitudeTrackerCreate an attitude tracker from an existing SDK context.
updateTrack attitude for the next image.

Type Alias Details​

UpdateResult​

using UpdateResult = std::variant<AttitudeTrackerUpdate, AttitudeTrackerError>

Outcome of update().

Function Details​

AttitudeTracker​

Function
explicit AttitudeTracker(raptor::Context& context)

Create an attitude tracker from an existing SDK context.

Parameters:

  • context - Context that owns the maps and license. It must outlive this tracker. Throws: std::runtime_error - If tracker initialization fails.
update​
Function
[[nodiscard]] UpdateResult update(ImageView image, const LensModel& lens, const Pose& pose, std::chrono::nanoseconds timestamp) noexcept

Track attitude for the next image.

Parameters:

  • image - Image view.
  • lens - Initial lens model for image. The tracker may refine it; the resulting model, of the same lens type, is returned in AttitudeTrackerUpdate::lens.
  • pose - Prior camera pose for image. Its position is retained while the tracker estimates attitude.
  • timestamp - Application-defined timestamp identifying image. It must be positive and later than the preceding sequence timestamp.

Returns: An AttitudeTrackerUpdate on success, or an AttitudeTrackerError otherwise.

Pass frames in capture order. A valid frame that yields no usable estimate returns AttitudeTrackerError::EstimationFailed.

raptor::sync::AttitudeTrackerError​

enum class AttitudeTrackerError : std::uint8_t

Error codes returned by AttitudeTracker::update().

InvalidInput : An input value, image, or timestamp is invalid

ExpiredLicense : The license has expired

InvalidLicense : The license lacks the Attitude or Tracking feature

EstimationFailed : No usable attitude estimate could be produced for a valid frame

Failed : The update failed due to an unexpected runtime error

raptor::sync::AttitudeTrackerUpdate​

struct AttitudeTrackerUpdate

Successful attitude and lens estimate for a frame.

Variables​

NameDescription
timestampTimestamp of the input image.
poseEstimated pose; its position is unchanged by attitude tracking.
lensEstimated lens model; it may differ from the input lens.
fomResult-quality measure (see Fom for details).

Variable Details​

fom​
Fom fom

Result-quality measure (see Fom for details)

lens​
raptor::LensModel lens

Estimated lens model; it may differ from the input lens

pose​
raptor::Pose pose

Estimated pose; its position is unchanged by attitude tracking

timestamp​
std::chrono::nanoseconds timestamp

Timestamp of the input image