I have been testing out the Nav 2 stack in ROS 2 (humble) and was wondering if there is a method control the frequency at which the global plan is being updated. I am aware of the controller_frequency
parameter in the controller server , but upon changing that value both the global plan and the local planner run at the same frequency causing odd behavior. Is there an alternative parameter that could decouple the global plan updates from the local planner ?
1 Answer
Yes, look at the behavior tree XML you're using. You can set the rate there (or even make it a blackboard parameter so it can be adjusted on the fly).
What's nice about this is that you can not only change the rate, but change when or why it recomputes (or doesn't recompute) the path! This is one of the common entry-level modifications of the BT to enable different navigation behavior. Hopefully you find even more to make your application even better!
The controller frequency is totally unrelated to the planner replanning frequency, they are not coupled at all.
default_nav_to_pose_bt_xml
under the bt_navigator , few sample xml files of behavior trees can be seen here $\endgroup$