-
Notifications
You must be signed in to change notification settings - Fork 140
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
sbpl_lattice_planner ignores footprint / creates unfeasible paths #33
Comments
I've never had to change I can explain however what's going on in your corridor pictures: The costmap_2d value at the robot center is 0, so SBPL skips the footprint check. In detail, this is how SBPL checks if the robot is in collision (pseudocode):
So your problem is that you're landing in case (1): When the costmap value is 0, the robot is guaranteed not to be in collision, so there's no need for the footprint check. In order to land in case (3) and trigger the footprint check, you have to make sure that the costmap value at the footprint center is at least 1. In order to do that, you'll have to fine-tune the following costmap_2d parameters:
Update: The only problematic parameter is inflation_radius (see comment below). The best way to fine-tune these parameters is by using I don't quite understand why the thing in your second picture happens: It looks like the goal pose is within the non-zero, non-lethal region of the costmap, in which case the footprint check should have been triggered. Let me know if that problem persists. |
I've just checked the code again, and I can't find anything that explains this behavior. However, the costmap parameters are only taken into account by sbpl_lattice_planner during initialization. Therefore, if you change cost_scaling_factor using rqt_reconfigure (as I recommended), and use the already-initialized SBPL afterwards, you will get undefined behavior (because SBPL gets the new costmap values, but interprets them according to the old cost_scaling_factor). You should use rqt_reconfigure only to find good values, then write those values into your yaml or launch files, and restart move_base before doing any experiments.
|
I've found out some more things about how cost_scaling_factor and inflation_radius influence SBPL:
So the updated pseudocode is this:
Takeaways:
If you follow these guidelines, you should be good. Thanks for bringing up the issue! |
I've pushed commit f18f010, which reinitializes SBPL when the footprint or cost_scaling_factor changes. Now it's not necessary any more to restart move_base after changing the parameters in dynamic_reconfigure. |
One more thing regarding your pictures: SBPL only cares about the global costmap, not the local costmap. So you should make sure that you're only visualizing the global costmap (I think in some of your pictures, it might have been the local costmap instead). |
Thank you for all the information and the convenience changes for use with dynamic reconfigure. All the pictures in my posts are with the global costmap visualized, but some of them have been where I only changed the parameters with dyanmic_reconfigure and didn't reinitialize SBPL with the new params. I will close the issue in a few days when I have had the time to test things out if that is okay. |
Yes, I definitely plan to put the important info into a README or on the wiki page. This is one of the reasons why I wrote this down as exactly as possible, even though I know you already knew most of this. It would be great to get your feedback if everything's working as expected now. If you want to test the latest changes, you'll have to build from source. |
Very well explained @mintar, thank you a lot. As you propose, we avoid this issue by having an inflation_radius bigger than the farthest point in the footprint. |
READMEs added. |
Hello
I have been trying to use the sbpl_lattice_planner as the planner for a long (~3m) rectangular robot with mecanum wheel drive.
I am facing a lot of issues when it comes to the configuration and interlink of the sbpl planner params, costmap inflation_layer params and footprint params. Some of the same issues are described in #11 (@corot @mintar), and according to that issue it seems like there was a fix - but I am still experiencing the issues now.
For example, the picture below shows the closest waypoint I can create with the robot parallel to the wall (green footprint is where the robot footprint would be for that waypoint/goal). This makes sense because any closer and the robot footprint would be in collision with the wall (or the robot center would be in collision with a lethal cost cell).
However, this picture shows the closest goal that SBPL accepts where the robot is perpendicular to the wall. The footprint of the robot is clearly in collision with the wall, but sbpl still says it can find a solution. I think this is because the robot center is not in a lethal cost cell.
This leads to behavior such as this where the robot thinks it can turn around in a narrow corridor or even park itself perpendicular to the corridor.


So I don't understand why sbpl doesn't reject solutions where the footprint is clearly in collision, and I don't understand how to correctly tune the the costmap inflation so that this doesn't happen. It seems like there is something wrong with the costmap inflation_layer's inscribed or circumscribed cost (or both?).
Any suggestions? I have tried with the newest binary release as well as building from source.
My sbpl parameters are as follows:
I have tried to play with
lethal_obstacle
but I don't see any change in this specific behavior between ~10 and ~253.I appreciate the effort in getting the sbpl planner maintained again and I hope you can help so I can continue using it.
Thank you!.
The text was updated successfully, but these errors were encountered: