0
$\begingroup$

Rosanswers logo

Hi! I am relatively new to the android and rosjava development environment. I am carrying out an experiment in which I am using the android_sensors_driver to publish the phone sensor readings to the master running on my Ubuntu PC. Now, I want to subscribe to the topic /android/imu (as published by the android_sensors_driver) carry out a couple of operations (inside the phone) and finally re-publish the readings as /android/modified_imu. Can someone please give me some advice on how to write the publisher and subscriber nodes? Can I somehow modify the pubsub tutorial for my purpose?

Any help would be greatly appreciated. Thanks!


Originally posted by Arjav on ROS Answers with karma: 1 on 2014-06-24

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

Just a quick response:

You would need rosjava to run everything on the phone. They have a pub/sub-Tutorial also. Basicly, you need to write one node, which subscribes to the /android/imu topic, just as described in the sub-tutorial. Instead of just printing it, you would then modify and publish it as described in the pub-tutorial to your desired topic.

You'll need to watch out for the message-types, since you aren't talking about strings anymore, but there is a section in the rosjava docs about how to use different message types.

Basicly: Go to the Rosjava documentation, follow their tutorials and in the end merge them to one node :)

Hope that helps,

Rabe


Originally posted by Rabe with karma: 683 on 2014-06-24

This answer was ACCEPTED on the original site

Post score: 1


Original comments

Comment by Arjav on 2014-06-24:
Thanks a lot Rabe! I'll try that out.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.