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

Part of the problem may be from looping for 5.0 seconds and waiting for 1.0 second in the callback Usually, you want your callbacks to execute quickly and six seconds is not quick. I also notice that you're instantiating the action client in your callback too.

Part of the problem may be from looping for 5.0 seconds and waiting for 1.0 second in the callback Usually, you want your callbacks to execute quickly and six seconds is not quick. I also notice that you're instantiating the action client in your callback too.

You should probably make a class and have the callback manipulate the class attributes. That way, you don't have to have the waiting and instantiation in your callback.

http://wiki.ros.org/actionlib_tutorials/Tutorials/Writing%20a%20Callback%20Based%20Simple%20Action%20Client#But_I_want_to_use_Classes.21