<node pkg="dynamic_reconfig" name="dynamic_server" type="dynamic_server.py" output="screen"/>
- Change spesific defined config
- Cnange many configs at a time
- Change parameters from *.yaml
- test service only
rosservice call /DynamicUpdate "{node_name: ['/move_base/global_costmap/inflation_layer/'], config_name: ['inflation_radius'], config_type: ['float'], new_config: ['40.0']}"
- using self-test node
- the node is used for show how to use the client api
- It can only change the inflation radius temporarily
- The below command would change the radius to 30.0
rosrun dynamic_reconfig dynamic_reconfig_client_test_node 0 30.0
- See dynamic_reconfig_client_test.cpp
dynamic_update_define:
scenario_list:
- local_planner_scenario_1
- local_planner_scenario_2
- inflation_scenario_1
- inflation_scenario_2
local_planner_scenario_1:
node_name: "/move_base/DWAPlannerROS/"
float_configs:
max_vel_x: 0.60
min_vel_x: 0.07
max_vel_y: 0.4
min_vel_y: -0.4
local_planner_scenario_2:
node_name: "/move_base/DWAPlannerROS/"
float_configs:
max_vel_x: 0.45
min_vel_x: 0.01
max_vel_y: 0.2
min_vel_y: -0.2
inflation_scenario_1:
node_name: "/move_base/global_costmap/inflation_layer/"
bool_configs:
enabled: 1
float_configs:
inflation_radius: 12.5
inflation_scenario_2:
node_name: "/move_base/global_costmap/inflation_layer/"
bool_configs:
enabled: 0
float_configs:
inflation_radius: 40.0
dynamic_update_define:
scenario_list:
- local_planner_scenario_1
- local_planner_scenario_2
- inflation_scenario_1
- inflation_scenario_2
- I will find the scenario names under "dynamic_update_define/scenario_list"
- Each Scenario names shows the group of parameters under the same node name
local_planner_scenario_1:
node_name: "/move_base/DWAPlannerROS/"
float_configs:
max_vel_x: 0.60
min_vel_x: 0.07
max_vel_y: 0.4
min_vel_y: -0.4
inflation_scenario_2:
node_name: "/move_base/global_costmap/inflation_layer/"
bool_configs:
enabled: 0
float_configs:
inflation_radius: 40.0
- For each scenario, it has two kind of parameters. One is the node_name, and the other is $(Type)_configs
- The node_name will guide us to the right dynamic server.
- There are 4 types in $(Type)_configs, which are "float_configs", "bool_configs", "int_configs" and "string_configs"
- The usage is easy. All we have to do is add the config name and value under the right type tag.
- e,g, I put "max_vel_x: 0.60" under "float_configs:", and "enabled: 0" under "bool_configs:"
After setting the yaml, we have to add the parameters into rosparam server
There are two ways:
- rosparam load dynamic_update_config_alter.yaml
- <rosparam file="dynamic_update_config_alter.yaml" command="load"/>
It can change parameter by using the scenario names.
See dynamic_reconfig_client_test.cpp for the detail.
Note: at "} else if (atoi(argv[1]) == 4) {"