# Revision history [back]

you can build a specific msg system regarding to your needs in ROS. one node may receive a message from microcontroller via serial port(etc..) then publish a topic and an other node can subscribe to that do some other things. You can design your own messaging system. You can add a msg directory in your ros package then create your msg system i.e. EncoderValues.msg in msg directory. EncoderValues.msg file may contain two variables such as int64 encoderLeft and int64 encoderRight. then you can include this msg system to your ros source as a header file similar to this

# include "your_package_name/EncoderValues.h"

after that you can create a object your_package_name::EncoderValues enc;

whenever you receive the encoder values you can publish the enc msg as a topic.

I quickly and simply summarized what I know, you refer to ros wiki tutorials for more detailed tasks and msg systems. I recommend you to begin with this simplest one

http://www.ros.org/wiki/ROS/Tutorials/WritingPublisherSubscriber%28c%2B%2B%29

 2 No.2 Revision Lorenz 22311 ●123 ●199 ●313 http://ias.in.tum.de/p...

you can build a specific msg system regarding to your needs in ROS. one node may receive a message from microcontroller via serial port(etc..) then publish a topic and an other node can subscribe to that do some other things. You can design your own messaging system. You can add a msg directory in your ros package then create your msg system i.e. EncoderValues.msg in msg directory. EncoderValues.msg file may contain two variables such as int64 encoderLeft and int64 encoderRight. then you can include this msg system to your ros source as a header file similar to this

# include "your_package_name/EncoderValues.h"

#include "your_package_name/EncoderValues.h"


after that you can create a object your_package_name::EncoderValues enc;

whenever you receive the encoder values you can publish the enc msg as a topic.

I quickly and simply summarized what I know, you refer to ros wiki tutorials for more detailed tasks and msg systems. I recommend you to begin with this simplest one

http://www.ros.org/wiki/ROS/Tutorials/WritingPublisherSubscriber%28c%2B%2B%29