-
Notifications
You must be signed in to change notification settings - Fork 171
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
Planner selector concept: Design and implementation questions #147
Comments
https://github.com/ros-planning/navigation2/blob/main/nav2_behavior_tree/plugins/decorator/goal_updater_node.cpp the goal checker is very similar to what we're talking about here (topic in -> change some output port -> input port to another), this was tested and utilized in the follow_path.xml dynamic object following demos @fmrico conducted! https://github.com/ros-planning/navigation2/blob/main/nav2_behavior_tree/plugins/action/compute_path_to_pose_action.cpp#L34 the algorithm Bt nodes use ports already for selecting IDs so using the blackboard variable ports seems like a very simple solution to the issue of conveying information between the BT nodes (that was conveyed from a topic/service via ROS2) I think we've covered some of the other important topics here on the slack thread - any additional things we should cover as part of this? |
That is the correct reference example. Thanks.
Additional issues
It may be good to respond some feedback to the requester. For example in the case the planner, controller or goalchecker is unknown or it is not registered.
Maybe that is overengineering, but may be interesting to know what you think. Regards. |
Topic seems reasonable
I think so, since if we have other BT nodes like coverage planning servers, or route planning servers, that 1 node would really start to blow up. Separating them makes them more easily testable and scale as the project gets more complex. |
BTNode design
Anything else to say about this? Naming decisions I keep this previous plan, but: Also the name of the output ports. Right now:
Finally about names of the topic names
what about them? Default values feature
|
I'm happy with all of those, "Selector" name, topic names, port names. Yes, I think a |
I created an initial PR for the planner_selector before applying PRs for others (controller_selector and goal_checker_selector) |
Closing, see Nav2 ticket / PR set |
Any one can share a xml configure that works for galactic version? I setted as below, it's not working!!!
|
I show here some questions I have about implementing a convenient PlannerSelector that could be potentially integrated into the navigation stack.
Goal: the planer selector/goal selector is a "component" that listen to the ROS network (via an action server or a topic) and is used in the Behavior Tree to store the desired planner or controller. External task-level ros nodes may decide what is the best planner to use and use this mechanism.
Note: This same design principles can be applied to the concept of GoalSelector if the FollowPath action request message is extended with some new goal_id additional field.
In the following code it is shown an example about how the planner selector could be integrated in a navigation-bt.
Description
Previous experiments
I tried to implement the concept explained above. The ROS network communication mechanism used was "node parameters". The PlannerSelector had a PlannerSelector::onParametersUpdated callback and checked if the "PlannerSelector.planner_id" and/or "PlannerSelector.controler_id" where updated.
However I got some weird behavior. It looked like many of the parameter updates "were lost".
Why it did not work? This was my interpretation about what happened (Please correct me if you think I am wrong): The lifetime of the PlannerSelector is short. Because of that the PlannerSelector::onParametersUpdated was not called. (Can someone tell me if this hypothesis of the short-lifetime is correct?)
Successful workaround
Since that first approach failed I used a Decorator instead of a regular BTNode.
Already exist a PlannerSelector experiment in the following fork (PlannerSelector.hpp and PlannerSelector.cpp)
The resulting BT is like the following shown below:
Results and usage
This solution (fork https://github.com/pabloinigoblasco/navigation2): works properly using parameters updates from the terminal like it is shown below:
or
Open issues
There is some criticism related with the usage of parameters. for me it is okay also to use any another mechanism (topics, actions or services). This approach was originally selected mimicking the concept of dynamic_reconfigure server of the move_base node (ROS 1)
** Other related issues and PRs **
PR
The text was updated successfully, but these errors were encountered: