-
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
Simple Smoother Aborts Navigation with "No Segments Smoothed" Error When Approaching End of Path #4710
Comments
I'm trying to figure out why it is that you had zero segments, it should work with a single point and I don't see any logging for why the navigation2/nav2_smoother/src/simple_smoother.cpp Lines 184 to 191 in 4e62a89
I would say we could change that to a This leads me to a few motivational questions
Is that expected through for a "successful" return case? I would think not. I would think it would be better in the BT XML to decide what to do with a failed path smoothing iteration rather than having failures masked at the server level. Perhaps we could update the BT Node for the Smoother to have a parameter for returning the unaltered path if the path smoothing process fails and still have the BT node return success -- which would allow the server to return Alternatively, it brings up the question: if we back out to the last valid path, isn't that OK to use if not converged? And I don't have a clear answer to that off the top of my head. If we exceed the number of iterations, that's not converged fully, so that feels wrong to say "done successfully". Similarly, if we stop convergence due to collision, it also seems to me that this shouldn't be considered "succesful", even if partially smoothed. But I could also see where some users (like yourself) may want that. I think this also could be a parameterization for user selection of behavior they'd want. If fail to converge due to constraints, but did some smoothing, whether to consider that valid or invalid. So for a solution, we could make this a parameter either and/or in both of the BT Node for the smoother for handling at the BT XML level or within the plugin as an algorithm level paramaterization. What do you think? |
I completely agree that smoother plugins should throw errors when they can't fully converge. It's no problem for me to add custom error handling in the BT. Like you suggested, we could also introduce a parameter in the smoother plugin (e.g. I assume that the reason I did not see the "infeasible collision" message is that my logging level was set to the default, so DEBUG logs weren't shown. As to why
This would prevent smoothing if the last (and only) path segment has fewer than 9 vertices which might be the case during the final approach. I'd be happy to help with the development of those features. |
OK, great! What do you think is best? I'm thinking handling within the Smoother BT Node would be best. Have a param for |
Okay, so I can see that And yeah, I think such a parameter in As for whether to use the unsmoothed or partially smoothed path, I think it would be useful to have an option for both to give a bit more freedom to the User. Actually, we could create a single parameter that allows users to choose between using the unsmoothed path, the partially smoothed path, or treating the smoothing as failed. This could be something like |
Sorry for the delay. Its a difficult time of year with conferences and travel.
Yeah, if the only times in the algorithms those fail are places we want to skip, then we could check the error codes and make a decision then about if we either (a) use the unsmoothed, input path or (b) use the semi-smoothed, output path. Total failures we should use (a), failures that are partially valuable we can use (b). If we're using the error codes, then we could do this in the BT node itself. I think its best to keep the Task Servers as application-independent as possible and the BT node should contain all the info we require.
Indeed! So, it seems that we landed one:
I'd argue that the context of the error code IDs should be enough for us to tell if we should use the unsmoothed or semismoothed if the user indicates a "yes". But, that's worth looking at the IDs and verifying. If we can't, then your suggestion is best :-) |
Thanks for the follow up! Based on the agreed development approach, I'll be working on implementing this feature in the coming days. Since I'm not very experienced with behavior trees, it might take me a bit longer than usual. I'll keep you posted and mention you here once I make some progress. |
Great! I look forward to the contribution! |
Bug report
Required Info:
Steps to reproduce issue
Use the following
nav2
parameters:Set up the behavior tree as follows:
Execute navigation. The robot will traverse the path and then start approaching the end of it.
Expected behavior
The robot smoothly navigates the entire path without aborting, and
SmoothPath
completes as expected.Actual behavior
When the robot approaches the end of the path, the
simple_smoother
aborts the navigation with the following error:Additional information
Logs:
...repeating endlessly
The exception is thrown even though the smoother could simply return a jagged path. The above exception leads to the whole navigation process being aborted. On the internet, there doesn't seem to be available much information on how to properly setup the SmoothPath node or handle BehaviorTree errors.
The text was updated successfully, but these errors were encountered: