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/fuerte/stacks/dynamic_reconfigure/src/dynamic_reconfigure/parameter_generator.py', 'cstate': 'true', 'parentname': 'Default', 'class': 'DEFAULT', 'field': 'default', 'state': True, 'parentclass': '', 'groups': [], 'parameters': [{'srcline': 259, 'description': 'Polling rate for the parallax eddie.', 'max': 30.0, 'cconsttype': 'const double', 'ctype': 'double', 'srcfile': '/opt/ros/fuerte/stacks/dynamic_reconfigure/src/dynamic_reconfigure/parameter_generator.py', 'name': 'update_rate', 'edit_method': '', 'default': 30.0, 'level': 0, 'min': 60.0, 'type': 'double'}, {'srcline': 259, 'description': 'The possible drive modes (twist, eddie, drive).', 'max': '', 'cconsttype': 'const char * const', 'ctype': 'std::string', 'srcfile': '/opt/ros/fuerte/stacks/dynamic_reconfigure/src/dynamic_reconfigure/parameter_generator.py', 'name': 'drive_mode', 'edit_method': "{'enum_description': '', 'enum': [{'srcline': 11, 'description': 'Takes a geometry_msgs/Twist message and is navigation compatible.', 'srcfile': '../cfg/EddieBot.cfg', 'cconsttype': 'const char * const', 'value': 'twist', 'ctype': 'std::string', 'type': 'str', 'name': 'twist'}, {'srcline': 12, 'description': 'Takes a eddiebot_node/Eddie message and is eddiesim compatible.', 'srcfile': '../cfg/EddieBot.cfg', 'cconsttype': 'const char * const', 'value': 'eddie', 'ctype': 'std::string', 'type': 'str', 'name': 'eddie'}, {'srcline': 13, 'description': 'Takes a eddiebot_node/Drive message which drives the EddieBot as described in the Parallax Eddie manual.', 'srcfile': '../cfg/EddieBot.cfg', 'cconsttype': 'const char * const', 'value': 'drive', 'ctype': 'std::string', 'type': 'str', 'name': 'drive'}]}", 'default': 'twist', 'level': 0, 'min': '', 'type': 'str'}, {'srcline': 259, 'description': 'How long to wait before timing out on a velocity command..', 'max': 0.5, 'cconsttype': 'const double', 'ctype': 'double', 'srcfile': '/opt/ros/fuerte/stacks/dynamic_reconfigure/src/dynamic_reconfigure/parameter_generator.py', 'name': 'cmd_vel_timeout', 'edit_method': '', 'default': 0.5, 'level': 0, 'min': 0.0, 'type': 'double'}, {'srcline': 259, 'description': 'Stops motors when the bumps sensor is hit.', 'max': True, 'cconsttype': 'const bool', 'ctype': 'bool', 'srcfile': '/opt/ros/fuerte/stacks/dynamic_reconfigure/src/dynamic_reconfigure/parameter_generator.py', 'name': 'stop_motors_on_bump', 'edit_method': '', 'default': True, 'level': 0, 'min': False, 'type': 'bool'}, {'srcline': 259, 'description': 'Enables or disables the gyro.', 'max': True, 'cconsttype': 'const bool', 'ctype': 'bool', 'srcfile': '/opt/ros/fuerte/stacks/dynamic_reconfigure/src/dynamic_reconfigure/parameter_generator.py', 'name': 'has_gyro', 'edit_method': '', 'default': True, 'level': 0, 'min': False, 'type': 'bool'}, {'srcline': 259, 'description': 'Scaling factor for correct gyro operation.', 'max': 6.0, 'cconsttype': 'const double', 'ctype': 'double', 'srcfile': '/opt/ros/fuerte/stacks/dynamic_reconfigure/src/dynamic_reconfigure/parameter_generator.py', 'name': 'gyro_scale_correction', 'edit_method': '', 'default': 1.35, 'level': 0, 'min': 0.0, 'type': 'double'}, {'srcline': 259, 'description': 'Measurement range supported by gyro.', 'max': 300.0, 'cconsttype': 'const double', 'ctype': 'double', 'srcfile': '/opt/ros/fuerte/stacks/dynamic_reconfigure/src/dynamic_reconfigure/parameter_generator.py', 'name': 'gyro_measurement_range', 'edit_method': "{'enum_description': 'Gyro Options', 'enum': [{'srcline': 25, 'description': 'ADXRS613 150deg/s', 'srcfile': '../cfg/EddieBot.cfg', 'cconsttype': 'const double', 'value': 150.0, 'ctype': 'double', 'type': 'double', 'name': 'ADXRS613'}, {'srcline': 26, 'description': 'ADXRS652 250deg/s', 'srcfile': '../cfg/EddieBot.cfg', 'cconsttype': 'const double', 'value': 250.0, 'ctype': 'double', 'type': 'double', 'name': 'ADXRS652'}, {'srcline': 27, 'description': 'ADXRS642 300deg/s', 'srcfile': '../cfg/EddieBot.cfg', 'cconsttype': 'const double', 'value': 300.0, 'ctype': 'double', 'type': 'double', 'name': 'ADXRS642'}]}", 'default': 150.0, 'level': 0, 'min': 0.0, 'type': 'double'}, {'srcline': 259, 'description': 'A correction applied to the computation of the rotation in the odometry.', 'max': 3.0, 'cconsttype': 'const double', 'ctype': 'double', 'srcfile': '/opt/ros/fuerte/stacks/dynamic_reconfigure/src/dynamic_reconfigure/parameter_generator.py', 'name': 'odom_angular_scale_correction', 'edit_method': '', 'default': 1.0, 'level': 0, 'min': 0.0, 'type': 'double'}, {'srcline': 259, 'description': 'A correction applied to the computation of the translation in odometry.', 'max': 3.0, 'cconsttype': 'const double', 'ctype': 'double', 'srcfile': '/opt/ros/fuerte/stacks/dynamic_reconfigure/src/dynamic_reconfigure/parameter_generator.py', 'name': 'odom_linear_scale_correction', 'edit_method': '', 'default': 1.0, 'level': 0, 'min': 0.0, 'type': 'double'}, {'srcline': 259, 'description': 'Minimum angular velocity of the EddieBot.', 'max': 3.0, 'cconsttype': 'const double', 'ctype': 'double', 'srcfile': '/opt/ros/fuerte/stacks/dynamic_reconfigure/src/dynamic_reconfigure/parameter_generator.py', 'name': 'min_abs_yaw_vel', 'edit_method': '', 'default': 0, 'level': 0, 'min': 0.0, 'type': 'double'}, {'srcline': 259, 'description': 'Maximum angular velocity of the EddieBot.', 'max': 3.0, 'cconsttype': 'const double', 'ctype': 'double', 'srcfile': '/opt/ros/fuerte/stacks/dynamic_reconfigure/src/dynamic_reconfigure/parameter_generator.py', 'name': 'max_abs_yaw_vel', 'edit_method': '', 'default': 0, 'level': 0, 'min': 0.0, '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
71 EddieBot_twist = 'twist'
72 EddieBot_eddie = 'eddie'
73 EddieBot_drive = 'drive'
74 EddieBot_ADXRS613 = 150.0
75 EddieBot_ADXRS652 = 250.0
76 EddieBot_ADXRS642 = 300.0
77