Phone Camera to Screen Demo - RethinkRobotics/sdk-docs GitHub Wiki
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.
-
Install the camera driver on your android.
- Install OpenCV, following the directions here (optional?): OpenCV Manager
- Install the app from Google Play: android-camera-viewer from JSK Robotics Laboratory
-
Install the image_transport_plugins on your development machine: $ sudo apt-get install ros-electric-image-transport-plugins
-
Figure out the ip address of your Baxter $ avahi-resolve-host-name baxter.local 192.169.33.77
-
Launch your app and enter the ip address in place of the 'localhost' part.
-
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 &
- NEXT: use
republish
to echo your images
$ rosrun image_transport republish compressed in:=/camera/image raw out:=/robot/xdisplay