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

Revision history [back]

click to hide/show revision 1
initial version

You have to create two Subscriber objects, one for '/camera' and one for '/odom'. For both you write an own callback function.

You can't return data from a callback function. In your callback function you can store data to a global variable or to a member variable, which is the preferred way. Then in your main loop process this data.