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
Originally posted by karthik with karma: 2831 on 2011-12-17
This answer was ACCEPTED on the original site
Post score: 3
Original comments
Comment by Morpheus on 2011-12-20:
Thanks karthik, I am new at ROS
Comment by karthik on 2011-12-19:
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)
Comment by karthik on 2011-12-19:
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.
Comment by Morpheus on 2011-12-19:
I am new at this, and I am not sure what and where I need to make these changes.
Comment by karthik on 2011-12-17:
Thanks Eric :)
Comment by Eric Perko on 2011-12-17:
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