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

Writing subscriber for turtlebot (C++)

asked 2013-05-14 09:05:16 -0600

this post is marked as community wiki

This post is a wiki. Anyone with karma >75 is welcome to improve it.

Can anyone help me (maybe already have) writing a simple program to subscribe to TutleBotSensorState and use a callback function to display some of the data, for example temperature.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2013-05-14 10:29:52 -0600

tfoote gravatar image
edit flag offensive delete link more

Comments

Of course I have read this part of the tutorial and I know how to write subscribers for turtlesim. I am interested in knowing how to write the callback method for turtlebot.

Solmaz gravatar image Solmaz  ( 2013-05-15 09:46:53 -0600 )edit

You need to change the include line to point to the message header, and then change the datatype of the callback function. And you should make sure to have the dependency on the package as well.

tfoote gravatar image tfoote  ( 2013-05-27 16:27:57 -0600 )edit

header and dependencies are set appropriately, but when I try my callback I get errors. Could you give a specific sample callback function for turtlebot.

Solmaz gravatar image Solmaz  ( 2013-05-28 08:02:50 -0600 )edit

Question Tools

Stats

Asked: 2013-05-14 09:05:16 -0600

Seen: 847 times

Last updated: May 14 '13