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
Implement allow_unknown feature #60
Conversation
Thanks for your PR! I'm trying to verify that this is working, but for me it isn't. Steps to reproduce:
With your PR, SBPL shouldn't plan a path there, but it does. |
I am probably missing something, but in the steps to reproduce the behavior that you are getting, where is the code of this PR being compiled? |
I forgot to mention that, but of course I first compiled the code of this PR. I also put a debug printout into the code, like this: diff --git a/sbpl_lattice_planner/launch/move_base/sbpl_global_params.yaml b/sbpl_lattice_planner/launch/move_base/sbpl_global_params.yaml
index 9f9b3dc..2cc4aae 100644
--- a/sbpl_lattice_planner/launch/move_base/sbpl_global_params.yaml
+++ b/sbpl_lattice_planner/launch/move_base/sbpl_global_params.yaml
@@ -4,3 +4,4 @@ SBPLLatticePlanner:
allocated_time: 5.0
initial_epsilon: 3.0
forward_search: false
+ allow_unknown: false
diff --git a/sbpl_lattice_planner/src/sbpl_lattice_planner.cpp b/sbpl_lattice_planner/src/sbpl_lattice_planner.cpp
index 0e72aa3..632afe1 100644
--- a/sbpl_lattice_planner/src/sbpl_lattice_planner.cpp
+++ b/sbpl_lattice_planner/src/sbpl_lattice_planner.cpp
@@ -124,6 +124,7 @@ void SBPLLatticePlanner::initialize(std::string name, costmap_2d::Costmap2DROS*
private_nh.param<int>("visualizer_skip_poses", visualizer_skip_poses_, 5);
private_nh.param("allow_unknown", allow_unknown_, bool(true));
+ ROS_DEBUG("SBPL: allow_unknown: %u", allow_unknown_);
name_ = name;
costmap_ros_ = costmap_ros; When I run the code, it prints "SBPL: allow_unknown: 0", thereby proving that it actually runs your code and correctly reads the parameter. Did you attempt my instructions above? Are your results different? I.e., does the allow_unknown parameter affect whether SBPL plans into unknown space or not? |
Thank you for taking the time to debug this. I am attempting your instructions above on a clean install of melodic right now (my development environment was actually kinetic and it works there). Will report back ASAP |
FYI, I've tried this on Noetic, but there shouldn't be a big difference between melodic and noetic. Thanks for following up on this! |
I know what happened. I happily made this modifications but the planner I was testing the I am closing this PR in sheer shame and will open a new one when I have something that actually works. I profusely apologize for wasting your time. m(._.)m |
LOL, no problem! Looking forward to the next PR! |
I am back to restore my honor! The PR code works, but the navigation stack configuration of In particular, the global costmap static layer uses Here is what you can do to make it work: diff --git a/sbpl_lattice_planner/launch/move_base/global_costmap_params.yaml b/sbpl_lattice_planner/launch/move_base/global_costmap_params.yaml
index 10a4b90..df3e941 100644
--- a/sbpl_lattice_planner/launch/move_base/global_costmap_params.yaml
+++ b/sbpl_lattice_planner/launch/move_base/global_costmap_params.yaml
@@ -6,3 +6,7 @@ global_costmap:
publish_frequency: 0.0
static_map: true
rolling_window: false
+ static_layer:
+ track_unknown_space: true
+ obstacle_layer:
+ enabled: false
diff --git a/sbpl_lattice_planner/launch/move_base/sbpl_global_params.yaml b/sbpl_lattice_planner/launch/move_base/sbpl_global_params.yaml
index 9f9b3dc..2cc4aae 100644
--- a/sbpl_lattice_planner/launch/move_base/sbpl_global_params.yaml
+++ b/sbpl_lattice_planner/launch/move_base/sbpl_global_params.yaml
@@ -4,3 +4,4 @@ SBPLLatticePlanner:
allocated_time: 5.0
initial_epsilon: 3.0
forward_search: false
+ allow_unknown: false If you send a goal into an unknown area you will get an output similar to this:
The robot will rotate in place a couple of times, but that is because those are the recovery behaviors activated when a plan can not be found. In the end it will abort because a valid plan could not be found. Users interested in the |
I totally forgot about this one. Sorry for the delay and thanks for your contribution! |
This allows testing the new allow_unknown feature (#60)
This allows testing the new allow_unknown feature (#60)
Awesome! Thanks for taking the time to review this. |
Other planners offer the feature of being able to not allow searching for a path in unknown space.
Recently, I was playing around with this planner and found myself in need of this feature, so I added it. I am sharing it with the world in the hope of
becoming rich and famousit being useful to others.The default behavior stays unchanged, the robot will not fear the unknown. But if the parameter
allow_unknown
is set tofalse
then unknown space will be ignored from the path search.Cheers!