ROS: Package description - OwlSoul/tango_sensors GitHub Wiki

This package wraps tango_sensors application.

Application interface

RVIZ data

1. App Summary

Tango Sensors is an Android application designed to publish Tango related data to ROS. It is tested and is guaranteed to work only on Yellowstone tablet with Kit-Kat Android. App is using only standard ROS messages, thus no additional software is required. Supported sensors are Pose, Point Cloud and both cameras (color and fisheye).

App is designed to provide data as fast as possible, which creates a bottleneck when using WiFi connection. Limiting publish rate for images and point cloud in case you use Wireless connection (can be done in app dashboard), or using wired connection to ROS master (USB Tethering) is recommended. Note that Point Cloud message is the most resource-consuming, taking up to 5-6 MB/s when there's a lot of points. Images at high resolution will also take significant part of your bandwidth. Play up with settings to reduce publish rate and/or image size and compression to reduce bottleneck effect.

Current achieved rates for message publishing are:

  • Up to 100 HZ for Pose (technical limit of Tango pose estimation).
  • Up to 5 HZ for Point Cloud (technical limit of Tango point cloud calculation)
  • Up to 30 HZ for both images, but generally lower, heavily dependent on resolution you've chosen. For 320x240 image publish rate is about 15-18HZ. All images are being compressed to JPEG before publishing. Using all sensors together will reduce publish rate for about 50% on WiFi.

2. Installation

3. Tutorials

4. Known usages

5. ROS API

5.1 tango_sensors_node

This node is the core of the application, responsible for streaming tango sensors data to ROS.

5.1.1 Published Topics

Tango Pose

Tango Point Cloud

  • tango_sensors/point_cloud (sensor_msgs/PointCloud2)

    Point cloud data from Tango point cloud calculation. Up to 5HZ.

  • /tango_sensors/tango_pose_pcl (geometry_msgs/PoseStamped)

    Pose when point cloud was taken, implemented since pose estimation is generally much higher than point cloud computation. Published simultaneously with tango_sensors/point_cloud

Tango Cameras

  • /tango_sensors/tango_camera_color/compressed (sensor_msgs/CompressedImage)

    Color camera image, compressed to JPEG. Technically up to 30HZ, in practice about 10-18HZ, dependent on resolution.

  • /tango_sensors/tango_camera_color/camera_info (sensor_msgs/CameraInfo)

    Color camera info message. Contains factory calibration with "rational_polynomial" distortion model. By default, frame_id is "/tango_sensors/color_camera".

  • /tango_sensors/tango_camera_fisheye/compressed (sensor_msgs/CompressedImage)

    Fisheye camera image, compressed to JPEG. Technically up to 30HZ, in practice about 10-18HZ, dependent on resolution.

  • /tango_sensors/tango_camera_fisheye/camera_info (sensor_msgs/CameraInfo)

    Fisheye camera info message. Contains factory calibration with "equidistant" distortion model (unsupported by ROS). By default, frame_id is "/tango_sensors/fisheye_camera".

5.1.2 Subscribed Topics

  • /tango_sensors/reset_pose (std_msgs/Empty)

    Publishing an empty message to this topic will reset Tango Pose.

5.1.3 Services

No services being provided.

5.1.4 Parameters

There is a strong hierarchy of parameters: First, if there is a parameter on ROS Server, this parameter will be applied. If there is no parameter on ROS Server, last saved preference in the app will be used. Finally, if there's no parameter on ROS Server and no saved preferences, default values apply.

Tango Pose Estimation

/tango_sensors/tango_pose/enabled (boolean, default: false)

True to enable Tango Pose Estimation.

/tango_sensors/tango_pose/sleep (int, default: 0)

Period to wait after publishing Pose message, use this to control the publish rate.

Tango Point Cloud

/tango_sensors/point_cloud/enabled (boolean, default: false)

True to enable Tango Point Cloud calculation.

/tango_sensors/point_cloud/sleep (int, default: 0)

Period to wait after publishing Point Cloud message, use this to control the publish rate.

Tango Cameras

/tango_sensors/tango_camera_color/enabled (boolean, default: false)

True to enable Tango color camera.

/tango_sensors/tango_camera_color/sleep (int, default: 0)

Period to wait after publishing Color Camera message, use this to control the publish rate.

/tango_sensors/tango_camera_color/width (int, default: 320)

Color camera image width.

/tango_sensors/tango_camera_color/height (int, default: 240)

Color camera image height.

/tango_sensors/tango_camera_color/quality (int, default: 80)

Color camera JPEG compression quality.

/tango_sensors/tango_camera_fisheye/enabled (boolean, default: false)

True to enable Tango color camera.

/tango_sensors/tango_camera_fisheye/sleep (int, default: 0)

Period to wait after publishing Color Camera message, use this to control the publish rate.

/tango_sensors/tango_camera_fisheye/width (int, default: 320)

Color camera image width.

/tango_sensors/tango_camera_fisheye/height (int, default: 240)

Color camera image height.

/tango_sensors/tango_camera_fisheye/quality (int, default: 80)

Color camera JPEG compression quality.

Please, note that there are also ROI parameters left, but they are generally ignored:

/tango_sensors/tango_camera_color/roi/bottom

/tango_sensors/tango_camera_color/roi/left

/tango_sensors/tango_camera_color/roi/right

/tango_sensors/tango_camera_color/roi/top

/tango_sensors/tango_camera_fisheye/roi/bottom

/tango_sensors/tango_camera_fisheye/roi/left

/tango_sensors/tango_camera_fisheye/roi/right

/tango_sensors/tango_camera_fisheye/roi/top

5.1.5 Provided tf Transforms

map → tango_sensors/odom

Transform between world frame and odom frame, base frame for tango_sensors. Published as static transform. You can set this transform using corresponding section (Pose Transform) in "tango_sensors" app. By default there is no transformation between these two nodes. Published as static transform.

tango_sensors/odom → tango_sensors/base_link

This transform will be equal to current Pose estimation. Published as static transform.

tango_sensors/odom → tango_sensors/base_link/pcl

This transform will be equal to Pose estimation at the moment when Point Cloud is available. Published as static transform.

tango_sensors/base_link/pcl → tango_sensors/base_link/point_cloud

This is an additional transform to apply to Point Cloud. By default it has no translation and the following orientation: [0.5, 0.5, 0.5, 0.5]. You can set this transform in corresponding section (PCL Transform) of the app.

6. Troubleshooting and bugs.

All known, fixed and existing problems with this problems are described and discussed in a separate document: Troubleshooting and Bugs.

Please, feel free to use Github to report any bug, it will be much appreciated. However, since I do not own Tango Device, there might be a large delay in fixing any issue found.

Feel free to use parts of the source code for your own apps as well.