MotionPriorLink Class Reference

Motion between two keyframes, as constrained by the motion prior given to Camera.ingest_motion_prior(). More...

Functions

int from_keyframe_id (self)
 Id of the keyframe the motion starts from. More...
 
int to_keyframe_id (self)
 Id of the keyframe the motion ends at. More...
 
Timestamp start_timestamp (self)
 Image timestamp of the keyframe the motion starts from.
 
Timestamp end_timestamp (self)
 Image timestamp of the keyframe the motion ends at.
 
RELATIVE_POSE_FUSION_STATUS status (self)
 How the motion prior was used for this link.
 
Transform motion (self)
 Motion of the camera between start_timestamp and end_timestamp. More...
 

Detailed Description

Motion between two keyframes, as constrained by the motion prior given to Camera.ingest_motion_prior().

The positional tracking keeps each link to hold its two keyframes apart by that motion, along the directions your motion source measures, while it refines the map. Retrieve them with Camera.get_positional_tracking_motion_prior_links().

Note
A link always joins two keyframes the motion prior covered without a gap. When a keyframe between two links is removed from the map, the two links are merged into one spanning the whole interval.

Functions

◆ from_keyframe_id()

int from_keyframe_id (   self)

Id of the keyframe the motion starts from.

Same ids as Camera.get_positional_tracking_keyframes(). When this keyframe is removed from the map, the link is merged with the one ending at it and then starts from the keyframe before, or the link is removed if the two cannot be merged.

Note
In rare cases the keyframe was removed just as the link was recorded, so it is missing from Camera.get_positional_tracking_keyframes(). Check that it is present before looking it up: start_timestamp stays valid either way.

◆ to_keyframe_id()

int to_keyframe_id (   self)

Id of the keyframe the motion ends at.

Always present in Camera.get_positional_tracking_keyframes() when the link is retrieved.

◆ motion()

Transform motion (   self)

Motion of the camera between start_timestamp and end_timestamp.

In the coordinate system and unit selected in InitParameters, the same direction as RelativePoseData.motion: the pose of the camera at end_timestamp expressed in the frame it was in at start_timestamp.

Note
This is the motion of the camera, not of your motion source: RelativePoseData.sensor_transform has already been applied.
Only the directions your motion source measures come from it. Along the others, this motion holds the positional tracking's own prediction, so it can differ from your source there.