-
Notifications
You must be signed in to change notification settings - Fork 938
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
Allow ROS namespaces for planning request adapters: pass a NodeHandle for their initialization #1530
Allow ROS namespaces for planning request adapters: pass a NodeHandle for their initialization #1530
Conversation
272c3cb
to
e868ded
Compare
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.
From the title, I was expecting a much larger contribution, namely supporting multiple planning pipelines (and planners) in the move_group
node. To clarify the contribution of this PR, I changed the title.
There are more adapters in folder moveit_ros/planning/planning_request_adapter_plugins/src
that need to be adapted to the new API.
moveit_ros/planning/planning_pipeline/src/planning_pipeline.cpp
Outdated
Show resolved
Hide resolved
.../planning_request_adapter/include/moveit/planning_request_adapter/planning_request_adapter.h
Show resolved
Hide resolved
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.
Looks better already. Adaptation of remaining default adapters is still missing 😉
.../planning_request_adapter/include/moveit/planning_request_adapter/planning_request_adapter.h
Outdated
Show resolved
Hide resolved
.../planning_request_adapter/include/moveit/planning_request_adapter/planning_request_adapter.h
Outdated
Show resolved
Hide resolved
virtual void initialize(const ros::NodeHandle& node_handle) | ||
{ | ||
ROS_WARN_NAMED("planning_request_adapter", | ||
"Function initialize() is not implemented. All parameters should be" |
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.
"Function initialize() is not implemented. All parameters should be" | |
"Implementation of function initialize() is missing, thus preventing to load parameters from the passed NodeHandle / namespace." |
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.
Isn't this a bit confusing since not all adapters load parameters?
I'm actually looking into this, but I think it's a first good step to be able to actually run different planning pipelines without using the MoveGroup node.
You mean by adding an empty initialize() implementation? |
Co-Authored-By: Robert Haschke <rhaschke@users.noreply.github.com>
If these adapters don't use parameters: yes. The best way to validate completeness of your API change within the code base is to make |
@henningkayser: can you say anything about the approach you're taking / looking into? |
@gavanderhoorn I didn't implement anything yet since I'm mostly accessing the core components directly. Probably the most straightforward approach would be to scope optional (or even all) planning pipeline configurations in sub-namespaces and pass the names as parameters to the MoveGroup node. Inside the MoveGroupContext we load all specified pipelines and instead of the member |
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.
There was still an adapter missing. Having added this one myself, I approve.
This PR adds support for running multiple planning pipelines with different configurations at the same time. The planning including planning request adapters from separate namespaces. While the configuration of the planner plugin can already be scoped by passing a child namespace to the planning pipeline, the parameters of the planning request adapters are always queried from the private node handle from within the constructor. The parameter lookup is now moved to a new virtual
initialize()
function (empty by default) which expects the node handle to use. The planning pipeline calls this function on all constructed planning request adapters.