Skip to content
This repository has been archived by the owner on Mar 2, 2018. It is now read-only.

Bad flags in cpp_mesh_builder_example #91

Open
Sabotaz opened this issue Dec 19, 2016 · 0 comments
Open

Bad flags in cpp_mesh_builder_example #91

Sabotaz opened this issue Dec 19, 2016 · 0 comments

Comments

@Sabotaz
Copy link

Sabotaz commented Dec 19, 2016

Hello,
Trying to use the cpp_mesh_builder_example app, I see that when the function TangoSupport_getMatrixTransformAtTime is used, the status code used is TANGO_SUCCESS.

It should be status_code == TANGO_POSE_VALID, as described in the doc : https://developers.google.com/tango/apis/c/support/reference/struct/tango-matrix-transform-data.

In file mesh_builder_app.cc:

  TangoMatrixTransformData matrix_transform;
  TangoSupport_getMatrixTransformAtTime(
      0, TANGO_COORDINATE_FRAME_START_OF_SERVICE, TANGO_COORDINATE_FRAME_DEVICE,
      TANGO_SUPPORT_ENGINE_OPENGL, TANGO_SUPPORT_ENGINE_OPENGL, ROTATION_0,
      &matrix_transform);
  if (matrix_transform.status_code == TANGO_SUCCESS) {
    start_service_T_device_ = glm::make_mat4(matrix_transform.matrix);
  } else {
    LOGE(
        "MeshBuilderApp: Could not find a valid matrix transform at "
        "current time for the device.");
  }

The data structure TangoMatrixTransformData is using a TangoPoseStatusType and not a TangoErrorType, as show in files (beside in doc) :
In file tango_support_api.h:

typedef struct TangoMatrixTransformData {
  /// Timestamp of the time that this pose estimate corresponds to.
  double timestamp;

  /// Matrix in column major order.
  float matrix[16];

  /// The status of the pose, according to the pose lifecycle.
  TangoPoseStatusType status_code;
} TangoMatrixTransformData;

In file tango_client_api.h:

typedef enum {
  TANGO_POSE_INITIALIZING = 0,  ///< Motion estimation is being initialized
  TANGO_POSE_VALID,             ///< The pose of this estimate is valid
  TANGO_POSE_INVALID,           ///< The pose of this estimate is not valid
  TANGO_POSE_UNKNOWN            ///< Could not estimate pose at this time
} TangoPoseStatusType;

Thank you !

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant