-
Notifications
You must be signed in to change notification settings - Fork 155
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Actionlib reconnect problem (c++ , with test case) #7
Comments
I can reproduce the issue. In my case sometimes it works, sometimes it doesn't. It seems to be timing related. If the deregister of the callback is invoked before registering the new one it works. If it is the other way around the register is basically a no-op and the following deregister will disconnect the server. |
Can you please try the patched version from pull request #13 and verify that it fixes your issue? |
add counting of connections to avoid reconnect problem when callbacks are invoked in different order (fix #7)
I was finally able to verify that this diff fixed my issue. Thanks. |
Changes since 1.9.12: 1.11.2 (2014-05-20) ------------------- * Update python publishers to define queue_size. * Use the correct queue for processing MessageEvents * Contributors: Esteve Fernandez, Michael Ferguson, Nican 1.11.1 (2014-05-08) ------------------- * Fix uninitialised execute_thread_ member pointer * Make rostest in CMakeLists optional * Use catkin_install_python() to install Python scripts * Contributors: Dirk Thomas, Esteve Fernandez, Jordi Pages, Lukas Bulwahn 1.11.0 (2014-02-13) ------------------- * replace usage of __connection_header with MessageEvent (`#20 <https://github.com/ros/actionlib/issues/20>`_) 1.10.3 (2013-08-27) ------------------- * Merged pull request `#15 <https://github.com/ros/actionlib/issues/15>`_ Fixes a compile issue for actionlib headers on OS X 1.10.2 (2013-08-21) ------------------- * separating ActionServer implementation into base class and ros-publisher-based class (`#11 <https://github.com/ros/actionlib/issues/11>`_) * support CATKIN_ENABLE_TESTING * add isValid to ServerGoalHandle (`#14 <https://github.com/ros/actionlib/issues/14>`_) * make operators const (`#10 <https://github.com/ros/actionlib/issues/10>`_) * add counting of connections to avoid reconnect problem when callbacks are invoked in different order (`#7 <https://github.com/ros/actionlib/issues/7>`_) * fix deadlock in simple_action_server.py (`#4 <https://github.com/ros/actionlib/issues/4>`_) * fix missing runtime destination for library (`#3 <https://github.com/ros/actionlib/issues/3>`_) 1.10.1 (2013-06-06) ------------------- * fix location of library before installation (`#1 <https://github.com/ros/actionlib/issues/1>`_) 1.10.0 (2013-04-11) ------------------- * define DEPRECATED only if not defined already * modified dependency type of catkin to buildtool
(See this ROS Answers post [1]).
I'm unable to get my action clients to reconnect to their servers for more than a single request when the connection is temporarily lost (e.g. when the server node is restarted). I've tried both regular action servers/clients and the simple versions.
I've written a small test case [2] to illustrate the problem. The client checks isServerConnected every second, and if it is, it sends a goal to the server. The server rejects every goal it receives. Leave the client up, and bring the server up and down several times. After the first server restart and the first goal is sent, isServerConnected always returns false, despite both nodes being up.
I believe this is a bug in the actionlib code. If anyone can suggest a simpler test case, or any additional methods to help debug the problem, that would be great. I suppose it could also be a bug in roscpp.
I'm using ROS Groovy on Ubuntu Precise 12.04 (64-bit) with actionlib version 1.9.11-0precise-20130325-2034-+0000.
[1] http://answers.ros.org/question/70012/actionlib-reconnect-problem-c-with-test-case/
[2] http://dellin.net/box/actionlib_cpp_disconnect.tar
The text was updated successfully, but these errors were encountered: