I changed the buffer size and it didn't change ... for a while
I have some ROS nodes that take joystick data and translate it into CAN bus commands to command motor controllers on my robot. The motor commands buffered up too much because after I stopped moving the joystick, it would take several seconds for the final motor commands to stop the motors to occur. So, logically I reduced the buffer sizes on both the publisher and subscriber sides (mostly because I don't understand the difference or why both sides are configurable) but nothing seemed to change in responsiveness.
I stopped all nodes, performed a catkin make and started them all again and the heavy buffering continued. So I took all the buffers all the way down to 1 in all my ROS code. Stopped all nodes , catkin make , started all nodes. No joy. So I'm confused and frustrated at this point and starting to wonder what could be buffering up these motor commands if not ROS.
So I go into my CAN node code and add a debug message so I can see how quickly or how slowly the CAN messages are being sent. And all the sudden it's no longer buffering. Then I remove the debug message and it's still acting exactly as I wanted. As soon as I stop the joystick, the motors stop. No buffering.
So why didn't the buffer size of 1 take initially? Is there some sort of caching that I encountered? It ended up fine but it really threw me for a loop for a while.
P.S. I'm using ROS Hydro on Mint 13 Maya.