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

I do this by using a ros-topic that several nodes will publish to asynchronously, and there is a single node that subscribes to the topic and handles all outbound comport messages. Never had any issue with the approach of using this topic as the queue.

I do this by using a ros-topic that several nodes will publish to asynchronously, and there is a single node that subscribes to the topic and handles all outbound comport messages. Never had any issue with the approach of using this topic as the queue.

EDIT: 1/26/18 I have another node that handles all incoming comport messages and sends data to appropriate topics. I have laser scan data coming in on the comport and I interleave data packets for all other sensors and state feedback into that data stream. Each data packet has a 1 byte header that indicates what type of info is in the packet. The node for incoming data decodes the data the publishes to the topic needed. If your nodes needs to get a response from the comport prior to continuing, it can wait on a topic instead of the comport. In my case I have laser data, IMU, ODOM, bumpers, and robot state all coming in on one comport with state control and motor commands going out, but a 75mS delay waiting for the next scheduled robot state packet doesn't cause me any grief. Of course this only works if you can tolerate the delay.