ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
Since planning and controlling are implemented with the use of actions in navigation2, you can specify the planner_id or controller_id to specify a particular run time. for instance you will see a planner_id field, fill that programmatically on run time.
#goal definition
geometry_msgs/PoseStamped goal
geometry_msgs/PoseStamped start
string planner_id
bool use_start # If true, use current robot pose as path start, if false, use start above instead
---
#result definition
nav_msgs/Path path
builtin_interfaces/Duration planning_time
---
#feedback
Take a look on how to configure planners, you will need to append the array of string which refers to names of planner plugins
planner_server:
ros__parameters:
expected_planner_frequency: 20.0
planner_plugins: ['GridBased1', 'GridBased2']
GridBased1:
plugin: 'nav2_navfn_planner/NavfnPlanner'
GridBased2:
plugin: 'some_planner/SomePlanner'
Then in the action call you would specify planner_id as one of ['GridBased1', 'GridBased2']
same should apply to the controllers.
2 | No.2 Revision |
Since planning planner and controlling control servers are implemented with the use of actions in navigation2, you can specify the planner_id or controller_id to specify a particular one in run time. time by specifying related fields in action definition. for instance you will see a planner_id field, fill that programmatically on run time.
#goal definition
geometry_msgs/PoseStamped goal
geometry_msgs/PoseStamped start
string planner_id
bool use_start # If true, use current robot pose as path start, if false, use start above instead
---
#result definition
nav_msgs/Path path
builtin_interfaces/Duration planning_time
---
#feedback
Take a look on at how to configure planners, planners here, you will need to append the array of string which strings that refers to names of planner plugins
planner_server:
ros__parameters:
expected_planner_frequency: 20.0
planner_plugins: ['GridBased1', 'GridBased2']
GridBased1:
plugin: 'nav2_navfn_planner/NavfnPlanner'
GridBased2:
plugin: 'some_planner/SomePlanner'
Then in the action call you would specify planner_id as one of ['GridBased1', 'GridBased2']
same should apply to the controllers. controllers.