Phone Camera to Screen Demo

From sdk-wiki
Jump to: navigation, search

This is a pywb Test.

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.
  2. Install the image_transport_plugins on your development machine:
        $ sudo apt-get install ros-groovy-image-transport-plugins
    
  3. Figure out the ip address of your Baxter (replace <baxter_name> with your Robot Hostname).
        $ avahi-resolve-host-name <baxter_name>.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
        $ ./baxter.sh 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 &
    
  6. NEXT: use republish to echo your images
        $ rosrun image_transport republish compressed in:=/camera/image raw out:=/robot/xdisplay
    

Links: