-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
BtActionServer should not create ActionServer until activated #3032
Comments
I'm not sure I understand what you mean. Is there a concrete suggestion perhaps that can help me understand your issue? |
Yes. This is a problem because of #3027. When calling |
My suggestion is something like this: don't create the action server in
|
That wouldn't be in line with the memory allocation scheme setup by the lifecycle nodes. Dynamic memory allocation is supposed to be in If you simply have your If that doesn't work for you, we can think about another solution - but that seems like by far the best one |
Hm, maybe there was something else going on, because even though looking at the source I agree it should just reject the goal if it is not activated, in practice, it was accepting the goal, but then not calling the callbacks. |
Also, I am curious as to where the rationale for this is. I have not read anything about that. |
OK, we can leave this ticket open for now then while you look into that. Feel free to re-name the ticket if you find another issue is actually the 'real' issue.
https://design.ros2.org/articles/node_lifecycle.html:
|
I doubt it, but I'd just quickly try Cyclone to see if this is another oddity from Fast-DDS. All the sudden I'm seeing a bunch of odd tickets and this might be related? I think its unlikely this is a Fast-DDS issue, but just good to sanity check. |
This is a cascading failure from #3033, which is a difference between FastDDS and CycloneDDS. This ticket is a proposition to change the error condition behavior to be easier to debug, and more clearly point to where the problem is. |
Sorry if this is verging to be off topic -- but can you just hook arbritary lifecycle nodes into the nav2 lifecycle manager, or do they have to implement the bond interface? |
There's a param to turn off the bond connections, so no, its not strictly required. Though for a given lifecycle manager, its all or nothing, but bond isn't strictly speaking required, its a nice to have feature mostly for people developing algorithms new to ROS 2 that might create lock-up conditions. Though, there's no requirement that all nodes are in the same lifecycle manager. In fact, we use multiple lifecycle managers in Nav2 already. So you could have a lifecycle manager instance for BT navigator and your stuff above it with @Aposhian got it, understood. But the non-rejection of actions is a bit concerning and I can understand the weird position this is in. If the rejections can be done properly, then that would be enough so solve this issue, regardless of the lifecycle manager stuff, no? Moving the action server around I view as a last resort since that's breaking the rules of lifecycle that we're trying to follow as closely as possible to be a best practices example |
@Aposhian I spent some time on this to get it off the Nav2 ticket queue and could not replicate. Things appear to be correctly rejected by the action server as far as I can tell and I'm able to detect that failed goal send request on the client side. If I make the simple action server always reject goals, I see that properly on the client side. Then we know that active is false and only turns true when Even if we moved the action server creation until after the BT XML is loaded, it doesn't resolve the actual problem that Fast-DDS is not discovering / connecting the services / actions that are blocking in the BT Action Server. We could add a timeout to these - but then what's the expected outcome if it fails? Throw exception? Certainly not continue. If we throw exception and catch in I suppose we could do that if you think that's the right option. Its not alot of work, just having the BT Action Node and BT Cancel Node use a timeout and if found, throw exception. In Would that be enough? That feels like just putting a bandaid on, given that it doesn't actually resolve the underlying issue, but at least it would fail more "nicely". You'd have to take charge of the lifecycle management of Nav2 / your nodes rather than relying on autostart in that situation, since you'd need to know if it failed to come up. My personal recommendation would be to file tickets and follow up consistently about them with Fast-DDS so that this issue is resolved, this is a big problem. |
Yeah, if you are having trouble reproducing the issue where goals are not accepted when the simple action server is not "active" then this can probably be at the least de-prioritized. And now that #3029 is merged, I don't think this is a big issue, since it won't remain in that intermediate state indefinitely like before. I think let's close. |
Bug report
Required Info:
Steps to reproduce issue
BtActionServer is prevented from going into active by #3027. It creates a simple action server, but does not "activate" it. This means that any other clients that call
wait_for_action_server
including the ros2 CLI report that the action server is ready, when it is actually "inactive" which is not a true lifecycle state that can be queried.Expected behavior
wait_for_action_server
returning true on an action client should mean that the action server is ready to serve requests.Actual behavior
wait_for_action_server
returns true, but when goals are sent, nothing happens.The text was updated successfully, but these errors were encountered: