Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

You may want to check this and this. The first link explain you how to implement a custom msg and the second how to use it in a subscriber. You forgot the namespace: your_package_msg::leg_control_data_lcmt and the proper definition of the argument in the callback:

void legCallback (const your_package_msg::leg_control_data_lcmt::ConstPtr &msg) { ROS_INFO("test"); }

Also you need to take into accout the proper cmake instructions to generate your messages bindings and package dependencies. Finally please remember to include your message bindings header in your code, like:

#include <your_package_msg/leg_control_data_lcmt.h>

Hope that solve your problem.

Regards.