Robotics StackExchange | Archived questions

Using Android's Camera to send picture to Service

The core of this question is: how do I send messages from my android device to a service running on my desktop? There's a couple of basic tutorials in androidcore and rosjavatutorials but no documentation online to guide me through it.

I'm using rosjava and android to send a picture taken from an android phone to a service running on my ubuntu machine. I've already gone through the tutorial android_tutorial_camera where you stream sensor_msgs/CompressedImage's from the phone to the desktop and it works, but here's what I want to do and can't figure out:

Another thing I've looked at is the rosjava_tutorial_services tutorial where it sends two longs to a service and gets their sums. I don't know how to change the Client they use because it only sets two longs, which they do simply by: request.setA(2); request.setB(2); (the 2s are just placeholder numbers they send) whereas in my case I have request.setImage() except I don't know what parameters to put inside setImage().

Please let me know if I need to provide any more information. I've already tested the service on my machine and it works, and I've also tested sending an empty message from the phone to the service and that also works, but now I need to send a picture!

Asked by mario.morales-rebaza on 2013-06-18 10:53:17 UTC

Comments

Answers