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
ompl_interface: uniform & simplified handling of the default planner #371
ompl_interface: uniform & simplified handling of the default planner #371
Conversation
PR ros-planning#340 introduced additional logic to select the configuration "group_name[default]" as the default configuration and sets it to RRTConnect. But there was already logic in place for this! The previous default configuration is plainly called "group_name". This basically reverts ros-planning#340 and sets the (old and new) default config to RRTConnect. Additionally, this unifies the default planner setup within the ompl_interface with the variable "default_planner_config" that can be specified for each group. This was previously only implemented in the RViz plugin and could be retrieved via `MoveGroupInterface::getDefaultPlannerId`, but is not set there by default. As a result the planner specified in the variable was *always* selected in RViz, but *never* when an innocent user requested a motionplan in their code, without explicitly setting the default planner.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
By eye this looks good, but I think this needs someone to test during runtime
{ | ||
for (int32_t j = 0; j < config_names.size(); ++j) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Essentially you moved this logic to loadPlannerConfiguration()
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Part of it, yes.
I did this to make use of it to load the specified default planner above.
Looks good. Just to clarify; the reason I went for
I wasn't sure whether any piece of code actually relied on there being only one when a configuration called |
The ompl_interface code always implemented it differently and it makes sense to assume there is always a default "group_name" configuration around.
4cd8242
to
56c392a
Compare
Ah, that makes sense. I didn't know you reasoned like this. I propose to change the comment there too. Imho, there is no reason why a "group_name" (default) config should not be allowed when multiple configs are available. |
I tested this, it would be great if someone else could give it a try. |
I tested this locally with the UR5 and moveit's demo.launch |
Eventually #197 (comment) made me look into this part of the code, and I cleaned it up a bit while I changed ompl_interface to respect the default_planner_config setting ...
PR #340 introduced additional logic to select the configuration "group_name[default]" as
the default configuration and sets it to RRTConnect.
But there was already logic in place for this!
The previous default configuration is plainly called "group_name".
This basically reverts #340 and sets the (old and new) default config to RRTConnect.
Additionally, this unifies the default planner setup within the ompl_interface
with the variable "default_planner_config" that can be specified for
each group. This was previously only implemented in the RViz plugin
and could be retrieved via
MoveGroupInterface::getDefaultPlannerId
,but is not set there by default.
As a result the planner specified in the variable was always selected in RViz,
but never when an innocent user requested a motionplan in their code,
without explicitly setting the default planner.