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

learning_joy

asked 2011-12-17 04:24:36 -0500

Morpheus gravatar image

I am trying the tutorial with turtlesim and joystick on ROS electric, and Ubuntu 11.4. I keep getting [ERROR] [1324135517.676376697]: Client [/teleop] wants topic /joy to have datatype/md5sum [joy/Joy/e3ef016fcdf22397038b36036c66f7c8], but our version has [sensor_msgs/Joy/5a9ea5f83505693b71e785041e67a8bb]. Dropping connection. I know that the call back has to be changed to sensor_msgs, but I am not sure how to do this.

Thank you, Morpheus

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
3

answered 2011-12-17 04:40:17 -0500

karthik gravatar image

updated 2011-12-17 04:40:32 -0500

Hi, Go to the teleop_base.cpp file and search for Joy::joy, it will in the joy_cb callback function, change it to sensor_msgs::joy. Check if the

#include "sensor_msgs/Joy.h

is included in the file if not include it. rosmake the teleop_base and it should work.

Hope this helps, Karthik

edit flag offensive delete link more

Comments

I've ticketed updating all the tutorials to use the new sensor_msgs::Joy message here: https://code.ros.org/trac/ros-pkg/ticket/5306
Eric Perko gravatar image Eric Perko  ( 2011-12-17 06:54:20 -0500 )edit
Thanks Eric :)
karthik gravatar image karthik  ( 2011-12-17 08:27:30 -0500 )edit
I am new at this, and I am not sure what and where I need to make these changes.
Morpheus gravatar image Morpheus  ( 2011-12-19 01:05:33 -0500 )edit
Its just about the type of the object. In your teleop_base.cpp there will be a call back function in expecting a msg of the form Joy::joy you have to change that type to sensor_msgs::joy. Include the above mentioned header file also.
karthik gravatar image karthik  ( 2011-12-19 13:35:26 -0500 )edit
if you don't know what is call back function then you have to go through the tutorials http://www.ros.org/wiki/ROS/Tutorials/WritingPublisherSubscriber(c%2B%2B)
karthik gravatar image karthik  ( 2011-12-19 13:36:15 -0500 )edit
Thanks karthik, I am new at ROS
Morpheus gravatar image Morpheus  ( 2011-12-20 14:02:09 -0500 )edit

Question Tools

Stats

Asked: 2011-12-17 04:24:36 -0500

Seen: 1,054 times

Last updated: Dec 17 '11