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

Revision history [back]

I'm not entirely sure what your question is. You should have declared two functions 'getodomdatacallback' and 'OccupancyGridCallback' with the right message type parameter.

The subscriber code you've shown above will correctly set these up to receive the messages when they arrive. The final piece of code you'll need is a ros::spin(); line to get the ros node to continually check for messages and call your message handler functions when they arrive.

You can then put whatever code you need in each of the message handler functions.

Hope this helps? If not if you can paste your whole code we can have bit more of a look at it.