ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
I have similar situation and solved it this way:
In my case, the controller (LPC1769) will send an answer back when it has it and can take other commands in the meantime so no need to hold the port while waiting for response. In this way, I can keep the port running near max capacity. I treat the serial port output 100% separate from the input and have no mutexes or other controls. This is similar to the way gvdhoorn proposed except I use two nodes to access the HW. Maybe this helps you. One weakness of this method is that ROS could spam the controller to the point that messages get dropped. That hasn't been an issue yet though. Input buffer on controller is large.