1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43 from dynamic_reconfigure.encoding import extract_params
44
45 inf = float('inf')
46
47 config_description = {'upper': 'DEFAULT', 'lower': 'groups', 'srcline': 233, 'name': 'Default', 'parent': 0, 'srcfile': '/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py', 'cstate': 'true', 'parentname': 'Default', 'class': 'DEFAULT', 'field': 'default', 'state': True, 'parentclass': '', 'groups': [], 'parameters': [{'srcline': 262, 'description': 'Amount of time (s) controller is permitted to be late achieving goal', 'max': 120.0, 'cconsttype': 'const double', 'ctype': 'double', 'srcfile': '/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py', 'name': 'goal_time', 'edit_method': '', 'default': 0.1, 'level': 0, 'min': 0.0, 'type': 'double'}, {'srcline': 262, 'description': 'Maximum velocity (m/s) at end of trajectory to be considered stopped', 'max': 1.0, 'cconsttype': 'const double', 'ctype': 'double', 'srcfile': '/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py', 'name': 'stopped_velocity_tolerance', 'edit_method': '', 'default': 0.2, 'level': 0, 'min': -1.0, 'type': 'double'}, {'srcline': 262, 'description': 'right_j0 - maximum final error', 'max': 0.5, 'cconsttype': 'const double', 'ctype': 'double', 'srcfile': '/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py', 'name': 'right_j0_goal', 'edit_method': '', 'default': -0.2, 'level': 0, 'min': -0.5, 'type': 'double'}, {'srcline': 262, 'description': 'right_j1 - maximum final error', 'max': 0.5, 'cconsttype': 'const double', 'ctype': 'double', 'srcfile': '/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py', 'name': 'right_j1_goal', 'edit_method': '', 'default': -0.2, 'level': 0, 'min': -0.5, 'type': 'double'}, {'srcline': 262, 'description': 'right_j2 - maximum final error', 'max': 0.5, 'cconsttype': 'const double', 'ctype': 'double', 'srcfile': '/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py', 'name': 'right_j2_goal', 'edit_method': '', 'default': -0.2, 'level': 0, 'min': -0.5, 'type': 'double'}, {'srcline': 262, 'description': 'right_j3 - maximum final error', 'max': 0.5, 'cconsttype': 'const double', 'ctype': 'double', 'srcfile': '/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py', 'name': 'right_j3_goal', 'edit_method': '', 'default': -0.2, 'level': 0, 'min': -0.5, 'type': 'double'}, {'srcline': 262, 'description': 'right_j4 - maximum final error', 'max': 0.5, 'cconsttype': 'const double', 'ctype': 'double', 'srcfile': '/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py', 'name': 'right_j4_goal', 'edit_method': '', 'default': -0.2, 'level': 0, 'min': -0.5, 'type': 'double'}, {'srcline': 262, 'description': 'right_j5 - maximum final error', 'max': 0.5, 'cconsttype': 'const double', 'ctype': 'double', 'srcfile': '/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py', 'name': 'right_j5_goal', 'edit_method': '', 'default': -0.2, 'level': 0, 'min': -0.5, 'type': 'double'}, {'srcline': 262, 'description': 'right_j6 - maximum final error', 'max': 0.5, 'cconsttype': 'const double', 'ctype': 'double', 'srcfile': '/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py', 'name': 'right_j6_goal', 'edit_method': '', 'default': -0.2, 'level': 0, 'min': -0.5, 'type': 'double'}, {'srcline': 262, 'description': 'right_j0 - maximum error during trajectory execution', 'max': 0.5, 'cconsttype': 'const double', 'ctype': 'double', 'srcfile': '/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py', 'name': 'right_j0_trajectory', 'edit_method': '', 'default': 0.2, 'level': 0, 'min': -0.5, 'type': 'double'}, {'srcline': 262, 'description': 'right_j1 - maximum error during trajectory execution', 'max': 0.5, 'cconsttype': 'const double', 'ctype': 'double', 'srcfile': '/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py', 'name': 'right_j1_trajectory', 'edit_method': '', 'default': 0.2, 'level': 0, 'min': -0.5, 'type': 'double'}, {'srcline': 262, 'description': 'right_j2 - maximum error during trajectory execution', 'max': 0.5, 'cconsttype': 'const double', 'ctype': 'double', 'srcfile': '/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py', 'name': 'right_j2_trajectory', 'edit_method': '', 'default': 0.2, 'level': 0, 'min': -0.5, 'type': 'double'}, {'srcline': 262, 'description': 'right_j3 - maximum error during trajectory execution', 'max': 0.5, 'cconsttype': 'const double', 'ctype': 'double', 'srcfile': '/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py', 'name': 'right_j3_trajectory', 'edit_method': '', 'default': 0.2, 'level': 0, 'min': -0.5, 'type': 'double'}, {'srcline': 262, 'description': 'right_j4 - maximum error during trajectory execution', 'max': 0.5, 'cconsttype': 'const double', 'ctype': 'double', 'srcfile': '/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py', 'name': 'right_j4_trajectory', 'edit_method': '', 'default': 0.2, 'level': 0, 'min': -0.5, 'type': 'double'}, {'srcline': 262, 'description': 'right_j5 - maximum error during trajectory execution', 'max': 0.5, 'cconsttype': 'const double', 'ctype': 'double', 'srcfile': '/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py', 'name': 'right_j5_trajectory', 'edit_method': '', 'default': 0.2, 'level': 0, 'min': -0.5, 'type': 'double'}, {'srcline': 262, 'description': 'right_j6 - maximum error during trajectory execution', 'max': 0.5, 'cconsttype': 'const double', 'ctype': 'double', 'srcfile': '/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py', 'name': 'right_j6_trajectory', 'edit_method': '', 'default': 0.2, 'level': 0, 'min': -0.5, 'type': 'double'}], 'type': '', 'id': 0}
48
49 min = {}
50 max = {}
51 defaults = {}
52 level = {}
53 type = {}
54 all_level = 0
55
56
57
58
59
60
61
62
63 for param in extract_params(config_description):
64 min[param['name']] = param['min']
65 max[param['name']] = param['max']
66 defaults[param['name']] = param['default']
67 level[param['name']] = param['level']
68 type[param['name']] = param['type']
69 all_level = all_level | param['level']
70