AttitudeTracker API
Source headers: raptor/sync/errors.hpp, raptor/sync/AttitudeTracker.hpp
raptor::sync
Types
| Name | Description |
|---|---|
| AttitudeTracker | Stateful camera-attitude tracking against the maps loaded in a Context. |
| AttitudeTrackerError | Error codes returned by AttitudeTracker::update(). |
| AttitudeTrackerUpdate | Successful attitude and lens estimate for a frame. |
Type Aliases
| Name | Description |
|---|---|
| Fom | Figure 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.
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
| Name | Description |
|---|---|
| UpdateResult | Outcome of update(). |
Functions
| Name | Description |
|---|---|
| AttitudeTracker | Create an attitude tracker from an existing SDK context. |
| update | Track attitude for the next image. |
Type Alias Details
UpdateResult
using UpdateResult = std::variant<AttitudeTrackerUpdate, AttitudeTrackerError>
Outcome of update().
Function Details
AttitudeTracker
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
[[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 forimage. The tracker may refine it; the resulting model, of the same lens type, is returned in AttitudeTrackerUpdate::lens.pose- Prior camera pose forimage. Its position is retained while the tracker estimates attitude.timestamp- Application-defined timestamp identifyingimage. 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
| Name | Description |
|---|---|
| timestamp | Timestamp of the input image. |
| pose | Estimated pose; its position is unchanged by attitude tracking. |
| lens | Estimated lens model; it may differ from the input lens. |
| fom | Result-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