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

I changed the buffer size and it didn't change ... for a while

asked 2014-06-24 19:56:09 -0600

updated 2014-06-25 09:01:43 -0600

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.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2014-06-25 01:37:09 -0600

tfoote gravatar image

It sounds like you might not have successfully recompiled the node in question in previous cycles. If you do not have your dependencies correctly declared in CMakeLists.txt it may not rebuild if it doesn't think the files have changed.

edit flag offensive delete link more

Comments

Well, every time I do a catkin_make, I always look for the red message showing the appropriate library (the file I just modified) being linked. But I don't recall if I saw the green message showing the .o file being made. The library wouldn't get linked if the .o file wasn't changed, though, right?

Kurt Leucht gravatar image Kurt Leucht  ( 2014-06-25 10:00:14 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2014-06-24 19:56:09 -0600

Seen: 276 times

Last updated: Jun 25 '14