ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Hi

What we have done is to create a serial node and publish to a string topic. We have done the same for a tcp and udp node as well.

For serial node you have to decide is you want to publish from a read or publish on a terminator. For ASCII protocols its usually done by ending with a terminator. So your serial node should be of type ASCII or BINARY. For ascii it would send on a parameterized terminator. For BINARY it would send whatever the read returns. It would be the responsibility of the high node receiving the BINARY data to assemble the data into a packet.

BTW you will have to you assign to move the data from the serial port to the string topic.

Hope all that helps.

Separating in serial into a string topic also makes testing, and debugging easier. An extra feature is that if you have the same type of device, like a BMS, that returns apacket of ump instead of serial your BMS node does not have to change. We actually ran into this situation and all that was required was to change a launch file.