ROS Resources: Documentation | Support | Discussion Forum | Service Status | Q&A

How to ENQUEUE RS232 commands in ROS?

Using ROS Kinetic and primarily python. I have a driver that subscribes to several topics including /cmd_vel and a bunch of other commands which interact with a control board via RS232.

One problem I have is if multiple commands are sent at the same time, it can break the communication stream (two messages sent/received at the same time in the buffer).

I fixed it by adding a “busy” boolean state, but this only works for 2 function (i.e. when one function runs, boolean state busy = TRUE, so the other function does not run and waits for busy = FALSE. however, when there a 3 functions, 2 of them are waiting and can sometimes trigger at the same instead of busy =FALSE)

In ROS is there a way to QUEUE function calls that are initiated by subcribers? for example if I have 5 subscribers each being triggered at a defined rate, how do I queue these commands so the RS232 communication with the control board is done one-at-a-time

Hi @mdturner32,

We kindly ask that you ask questions like these on our Q&A website, and reserve this forum for discussion of broader topics. This is according to our support guidelines

If you’d like you can reply with a link to your question, but in the future start there.