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

Subscribing to multiple data on one topic

asked 2013-04-05 12:58:47 -0500

Nathan Wong gravatar image

updated 2014-01-28 17:16:04 -0500

ngrennan gravatar image

Hi, I would like to know how I could subscribe to a topic which has multiple data variables in python using rosbuild not catkin, such as the velocity.msg on the turtlesim program which has both, angular and linear data sets on one topic.

I am just simply wanting to subscribe to the topic, and print out on terminal both variables.

so far all the tutorials I have seen such as the writing a simple publisher and subscriber tutorial and the publisher and subscriber one on rospy tutorials have just shown examples for subscribing to topics which only have one data variable, because string one has one...

any help is appreciated

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2013-04-05 17:14:30 -0500

Thomas D gravatar image

This tutorial shows how to do that. In particular, you could look at the Python node which prints out multiple variables from a custom message.

edit flag offensive delete link more

Comments

Thank you this was very useful! :)

Nathan Wong gravatar image Nathan Wong  ( 2013-04-07 06:30:37 -0500 )edit

Question Tools

Stats

Asked: 2013-04-05 12:58:47 -0500

Seen: 1,988 times

Last updated: Apr 05 '13