Functions
Tango Service: Pose Interface

Functions for getting the pose of the device. More...

Functions

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)

Detailed Description

Functions for getting the pose of the device.


Function Documentation

TangoErrorType TangoService_connectOnPoseAvailable ( uint32_t  count,
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.

For example, 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.

Parameters:
countThe number of base/target pairs to listen to.
framesThe base/target pairs to listen to.
TangoService_onPoseAvailableFunction 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 TANGO_POSE_INVALID.

Parameters:
timestampTime 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.
frameA pair of coordinate frames specifying the transformation to be queried for. For example, typical device motion is given by a target frame of TANGO_COORDINATE_FRAME_DEVICE and a base frame of TANGO_COORDINATE_FRAME_START_OF_SERVICE.
poseThe pose of target with respect to base frame of reference. Must be allocated by the caller, and is overwritten upon return.
Returns:
TANGO_SUCCESS if a pose was returned successfully. Check the status_code attribute on the returned pose to see if it is valid. Returns TANGO_INVALID if 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).


tango_client_api
Author(s):
autogenerated on Thu Jun 6 2019 19:49:49