Revision e71325d1 cfg/humotion.cfg
cfg/humotion.cfg | ||
---|---|---|
9 | 9 |
result = re.findall("=\s*([\d.]+);", line) |
10 | 10 |
print result |
11 | 11 |
if result: |
12 |
return float(result[0])
|
|
12 |
return result[0]
|
|
13 | 13 |
else: |
14 | 14 |
print("ERROR: could not find parameter %s in config.cpp" % (param_name)) |
15 | 15 |
sys.exit(1) |
16 | 16 |
|
17 | 17 |
def add_entry(group, param_name, descr, min, max): |
18 |
default_val = fetch_default(param_name) |
|
18 |
default_str = fetch_default(param_name) |
|
19 |
default_val = float(default_str) |
|
19 | 20 |
if (default_val > max): |
20 | 21 |
print("ERROR: default value %f for %s exceeds max value (%f)" % (default_val, param_name, max)) |
21 | 22 |
sys.exit(1) |
... | ... | |
25 | 26 |
|
26 | 27 |
group.add(param_name, double_t, 0, descr, default_val, min, max) |
27 | 28 |
|
29 |
def add_entry_bool(group, param_name, descr): |
|
30 |
default = fetch_default(param_name) |
|
31 |
|
|
32 |
default_val = True |
|
33 |
if (default == "false"): |
|
34 |
default_val = False |
|
35 |
|
|
36 |
group.add(param_name, bool_t, 0, descr, default_val) |
|
37 |
|
|
38 |
|
|
28 | 39 |
gen = ParameterGenerator() |
29 | 40 |
|
30 | 41 |
general_group = gen.add_group("thresholds") |
... | ... | |
32 | 43 |
add_entry(general_group, "threshold_angle_neck_saccade", "magnitude of gaze change that triggers neck saccade (in deg)", 1.0, 30.0) |
33 | 44 |
add_entry(general_group, "threshold_angle_omr_limit", "threshold for a deflection that triggers a correction neck saccade (in percent of OMR)", 0.1, 1.0) |
34 | 45 |
|
35 |
|
|
36 | 46 |
neck_group = gen.add_group("neck") |
37 | 47 |
add_entry(neck_group, "scale_velocity_neck", "scaling factor for neck velocity (in percent, 1.0 = full human velocities)", 0.1, 1.0) |
38 | 48 |
add_entry(neck_group, "scale_acceleration_neck", "scaling factor for neck acceleration (in percent, 1.0 = full human acceleration)", 0.1, 1.0) |
... | ... | |
52 | 62 |
add_entry(eyeblink_group, "eyeblink_probability_after_saccade", "probability for an eyeblink after a saccade (in percent)", 0.01, 1.0) |
53 | 63 |
add_entry(eyeblink_group, "eyeblink_blocked_time", "blocking time for further eyeblinks (in seconds)", 0.1, 100.0) |
54 | 64 |
|
65 |
eyelids_group = gen.add_group("eyelids") |
|
66 |
add_entry_bool(eyelids_group, "eyelids_follow_eyemotion", "should the eyelids follow the eye tilt motion?") |
|
67 |
|
|
55 | 68 |
breath_group = gen.add_group("breath") |
56 | 69 |
add_entry(breath_group, "breath_period", "duration for a full breath periond: inhale, pause and exhale (in seconds)", 1.0, 100.0) |
57 | 70 |
add_entry(breath_group, "breath_amplitude", "amplitude for breath animation (in deg)", 0.0, 10.0) |
Also available in: Unified diff