Skip to content

gitunit/ros_tango_native_stream

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

39 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

#ROS Tango Native Stream

This is our implementation of using the C API to expose the simultaneous streaming of Tango Depth and Visual Odometry information to ROS. Since the Java services are being deprecated, we sought to create a good ROS alternative. We found the depth information to publish at 25hz and the oodometry at 5hz, which is the speed at which the information becomes available. The depth image is published by default to /tango/depth/image_raw with a frame id of /tango. The odometry is published as a tf transform from /map to /tango, along with Odometry to /odom. The frame_id's and depth topic name are all changable by textboxes while running the app, or you can change these in peanutstreams string resources.

##requires:

  • Ubuntu 12.04
  • ROS Hydro
  • Android Studio (and the Android SDK)
  • Android NDK
  • Java JDK
  • rosjava (rosjava_core and android_core)

##Build Environment:

  1. Make sure you have Java JDK installed. Android Studio can be picky about using OpenJDk, so for best results stick with oracle Java 7+. Make sure your JAVA_HOME env is set, and the bins are on your PATH.
  2. Install android SDK (preferably, via the android studio bundle). Set ANDROID_HOME to the sdk directory, and add sdk/tools and sdk/platform-tools to your PATH.
  3. run the sdk manager ("android"). Install android build tools 19.1, android support repository, android support library, and API 17 (this list may not be up to date, but is mostly correct as of 10/10/14)
  4. Install Android NDK, and make sure to add to your path. We used ndk-r10.

###ROS Hydro:

###Rosjava:

###Initial setup:

  1. initialize a catkin workspace, source the devel/setup.bash
  2. inside its 'src' directory, git clone this repository.
  3. Download Tango C API from the Tango SDK page (we've been using "Tango_C_API_20140605_Phone")
  4. Extract its contents to the EXTRACT_C_API_HERE directory such that the repository-relative paths EXTRACT_C_API_HERE/tango_api.so and EXTRACT_C_API_HERE/include/ exist.
  5. in the toplevel workspace, run 'catkin_make'
  6. run android studio within your ROS environment, and open project on tango_root/build.gradle, press ok.
  7. It should ask you to sync your gradle files. If not, right click on build.gradle and select "synchronize build.gradle"
  8. Run the program (Shift+f10) with peanutstream as the default application. It will prompt you to select your device.

##Usage:

  1. Start PC-side components
  2. roscore
  3. roslaunch tango_helper tango.launch
  4. (optional) rosrun rviz rviz
  5. Tango-side
  6. Launch PeanutStream on your tango.
  7. Enter your pc's master URI
  8. Hit connect

###On-device configuration

  • Publication of depth and odometry are independently toggleable
  • Textboxes allow changing the topic names
  • Textboxes allow specification of the frame_id and parent_frame_id of the transformation published based on the device odometry

###WIP The button "Come to me" publishes the current displacement of the device to /move_base_simple/goal, which would cause a robot to drive to that location if the device was initialized over the robot.

###TroubleShooting:

####ndk-build not found:

  • Did you install the android ndk? Is it on your PATH?

####other funk (whether runtime or compile time):

  • Try restarting android studio (if you're using it)
  • Try a clean build (either or both of "pushd $(rospack find tango_root) && pushd $(dirname $(find -name Android.mk)) && ndk-build clean; popd; popd" and "pushd $(rospack find tango_root) && ./gradlew clean; popd"), followed by your usual compilation workflow

About

Streaming depth and odometry to ROS from the Google Tango C API

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 76.9%
  • C++ 20.5%
  • CMake 1.8%
  • Makefile 0.8%