android_pointcloud_viewer

This android application extends rosjava features, to enable viewing sensor_msgs/PointCloud2 messages via ros.

Using out-of-the-box

For using this application as-is, without code modifications:

  1. Install the app on your phone, using android-studio.
  2. Run the application.
  3. Enter details for ros-master, and press connect.
  4. Publish a PointCloud2 message that you wish to view. NOTE: it may take a few seconds (up to ~30 seconds) until the message is being fully processed. Details about the default structure of the message can be found here.

  5. Use the different controls available to view the Pointcloud2 message. Details about the controls can be found here.

Controls

There are 3 main controls for viewing the PointCloud:

  1. A vertical slider, which can be found on the right side of the screen. Sliding this contol up will move the camera in ("step in"), and sliding it down will have the same effect to the opposite direction.
  2. A 2-dimensional joystick, which can be found beneath the slider. Use it to move the camera vertically or horizontally.
  3. Gestures:
    1. Rotation - will rotate the camera on its z-axis (clockwise/counter-clockwise).

    2. 1-Finger swiping - will move the camera's view horizontally or vertically.

    3. 2-Finger swiping - will rotate the point cloud on its center.

    4. Double click - will reset the view, and move the camera to the center of the point cloud.

Default structure for PointCloud2 message

By default, each point in the message should have the following fields (in order):

  1. Float representing x.
  2. Float representing y.
  3. Float representing z.
  4. Empty float (is being discarded).
  5. Intensity, which is used to set each point's grayscale color.

Parsing of the message can be easily changed in the code.

ROS API

android/pcd_view

android_pcd is a node which run on the android, that is used for displaying pointclouds.

Subscribed Topics

cloud/source (sensor_msgs/PointCloud2)
  • The pointcloud to view

Wiki: android_pointcloud_viewer (last edited 2015-04-28 14:19:10 by OmriLavi)