ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

Doubt regarding android rosjava publishers and subscribers for sensor_msgs.imu

asked 2014-06-24 10:47:21 -0500

Arjav gravatar image

updated 2014-06-24 10:50:32 -0500

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!

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2014-06-24 11:05:53 -0500

Rabe gravatar image

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

edit flag offensive delete link more

Comments

Thanks a lot Rabe! I'll try that out.

Arjav gravatar image Arjav  ( 2014-06-24 11:12:38 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2014-06-24 10:47:21 -0500

Seen: 936 times

Last updated: Jun 24 '14