subscriber's callback in C++
I want to extract data from a topic in which ticks from encoders are published but i dont know the syntax for this process
So for example i have written this callback :
void left_ecn_cb(const std_msgs::UInt16::ConstPtr& lTick_msg)
{
// here i need to store the values coming from topic
// into the variable lTick
}
which is the proper syntax to do that ?
Also is there any book or pdf or web page which using a lot of examples to learn c++ and ros