# ROS subscriber callback in cpp

I have some data coming from my arduino publisher (for example x and y ). And i want to write a subscriber which takes these data and transforms them and publishes them again in odom .

Soo my problem is that i dont know how to write a callback without using ROS_INFO( as all of the tutorials show) . I just need to store these data in new variables and nothing more . Is there anyone who could help me with that ?

edit retag close merge delete

... how to write a callback without using ROS_INFO ...
Here you go. Please note that ROS_INFO is not doing any magic. Just, assume ROS_INFO( ... ) equivalent of printf( ... ). If you do not need any printing/logging, do not use ROS_INFO.