ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
Just create your own message file (as detailed in the Wiki).
In your case, something like
time timestamp
int32 left_ticks
int32 right_ticks
float32 left_rotation_radian
float32 right_rotation_radian
should do the trick (I assumed rotations, change for linear motion). The linked wiki page tells you everything you need to know to create, build and use such custom messages.
I agree with @gvdhoorn that a result in SI units is a better idea. If you change something to the hardware, you should only change the driver (or a configuration parameter used by the driver), not all nodes relying on the driver. If you really want to use ticks, add a radian_per_tick (or m_per_tick) field and use that for calculations in other nodes.