Skip to content

Phone Camera to Screen Demo

Rob Linsalata edited this page May 1, 2013 · 1 revision

Publishing your Android webcam to Baxter's screen

The general idea is to download an app on your phone that grabs your phone's webcam, transforms it into a ROS image message, connects to your ROS master on Baxter, then publishes the compressed image as a ROS topic. Then you need to grab that compressed image, convert it into a raw_image, and republish it to the screen display topic.

Raw Steps

  1. Install the camera driver on your android.

    1. Install OpenCV, following the directions here (optional?): OpenCV Manager
    2. Install the app from Google Play: android-camera-viewer from JSK Robotics Laboratory
  2. Install the image_transport_plugins on your development machine: $ sudo apt-get install ros-electric-image-transport-plugins

  3. Figure out the ip address of your Baxter $ avahi-resolve-host-name baxter.local 192.169.33.77

  4. Launch your app and enter the ip address in place of the 'localhost' part.

  5. On your dev machine:

    # start up your init'd environment
    $ ./init 192.168.33.77
    $ rostopic list /camera
    /camera/camera_info
    /camera/image/compressed
    # start image_viewer with appropriate compression, 
    #  Note /compressed is a transport of the /camera/image image topic
    $ rosrun image_view image_view image:=/camera/image compressed &
  1. NEXT: use republish to echo your images
    $ rosrun image_transport republish compressed in:=/camera/image raw out:=/sdk/xdisplay

Links:

Clone this wiki locally