Functions for getting the pose of the device. More...
|TangoErrorType||TangoService_connectOnPoseAvailable (uint32_t count, const TangoCoordinateFramePair *frames, void(*TangoService_onPoseAvailable)(void *context, const TangoPoseData *pose),...)|
|TangoErrorType||TangoService_getPoseAtTime (double timestamp, TangoCoordinateFramePair frame, TangoPoseData *pose)|
Functions for getting the pose of the device.
|const TangoCoordinateFramePair *||frames,|
|void(*)(void *context, const TangoPoseData *pose)||TangoService_onPoseAvailable,|
Attaches an onPoseAvailable callback. The callback is called as new pose updates become available for the registered coordinate frame pair. When registering the callback, specify the the target and base frame of interest, and the callback will be called on each change of the pose of that target with reference to that base frame. Only some base/target pairs are currently supported; for a list, see our page on frames of reference.
TANGO_COORDINATE_FRAME_DEVICE to base
TANGO_COORDINATE_FRAME_START_OF_SERVICE is a typical motion tracking pair to track the motion of the device with reference to its starting position in the base frame of reference.
An optional argument following the callback pointer can be supplied and will be returned in the callback context parameter if TangoService_connect() was called with a null context.
|count||The number of base/target pairs to listen to.|
|frames||The base/target pairs to listen to.|
|TangoService_onPoseAvailable||Function pointer to callback function.|
Get a pose at a given timestamp from the base to the target frame.
All poses returned are marked as
TANGO_POSE_VALID (in the status_code field on TangoPoseData) even if they were marked as
TANGO_POSE_INITIALIZING in the callback poses. To determine when initialization is complete, register a callback using TangoService_connectOnPoseAvailable() and wait until you receive valid data.
If no pose can be returned, the status_code of the returned pose will be
|timestamp||Time specified in seconds. If not set to 0.0, getPoseAtTime retrieves the interpolated pose closest to this timestamp. If set to 0.0, the most recent pose estimate for the target-base pair is returned. The time of the returned pose is contained in the pose output structure and may differ from the queried timestamp.|
|frame||A pair of coordinate frames specifying the transformation to be queried for. For example, typical device motion is given by a target frame of |
|pose||The pose of target with respect to base frame of reference. Must be allocated by the caller, and is overwritten upon return.|
TANGO_SUCCESSif a pose was returned successfully. Check the
status_codeattribute on the returned
poseto see if it is valid. Returns
TANGO_INVALIDif the base and target frame are the same, or if the base or the target frame is not valid, or if timestamp is less than 0, or if the service has not yet begun running (TangoService_connect() has not completed).