Error reading /odom topic
When I write code to read the odometry data, I get errors while compiling.
void test::odom_callback(const nav_msgs::Odometry::ConstPtr& odom_reading)
is the function i use. And I have also done in the constructor of the class:
odom_listener = n.subscribe("odom", 10, test::odom_callback, this);
The dependency has been mentioned in manifest.xml. I have also included the nav_msgs/Odometry.h file
I get this error:
In member function ‘void test::odom_callback(const ConstPtr&)’:
error: ‘const ConstPtr’ has no member named ‘twist’
Please help.