humotion / src / server / config.cpp @ 277050c7
History | View | Annotate | Download (3.974 KB)
1 | 6d13138a | sschulz | /*
|
---|---|---|---|
2 | * This file is part of humotion
|
||
3 | *
|
||
4 | * Copyright(c) sschulz <AT> techfak.uni-bielefeld.de
|
||
5 | * http://opensource.cit-ec.de/projects/humotion
|
||
6 | *
|
||
7 | * This file may be licensed under the terms of the
|
||
8 | * GNU Lesser General Public License Version 3 (the ``LGPL''),
|
||
9 | * or (at your option) any later version.
|
||
10 | *
|
||
11 | * Software distributed under the License is distributed
|
||
12 | * on an ``AS IS'' basis, WITHOUT WARRANTY OF ANY KIND, either
|
||
13 | * express or implied. See the LGPL for the specific language
|
||
14 | * governing rights and limitations.
|
||
15 | *
|
||
16 | * You should have received a copy of the LGPL along with this
|
||
17 | * program. If not, go to http://www.gnu.org/licenses/lgpl.html
|
||
18 | * or write to the Free Software Foundation, Inc.,
|
||
19 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||
20 | *
|
||
21 | * The development of this software was supported by the
|
||
22 | * Excellence Cluster EXC 277 Cognitive Interaction Technology.
|
||
23 | * The Excellence Cluster EXC 277 is a grant of the Deutsche
|
||
24 | * Forschungsgemeinschaft (DFG) in the context of the German
|
||
25 | * Excellence Initiative.
|
||
26 | */
|
||
27 | |||
28 | #include "humotion/server/config.h" |
||
29 | |||
30 | using humotion::server::Config;
|
||
31 | |||
32 | Config::Config() { |
||
33 | init_defaults(); |
||
34 | } |
||
35 | |||
36 | |||
37 | Config::~Config() { |
||
38 | } |
||
39 | |||
40 | void Config::init_defaults() {
|
||
41 | // saccade detection thresholds:
|
||
42 | // 1) velocity threshold, values above this value trigger an eye saccade
|
||
43 | // value is given in deg/s
|
||
44 | threshold_velocity_eye_saccade = 15.0; |
||
45 | |||
46 | // 2) angular threshold, a target change higher than this value will trigger a neck saccade
|
||
47 | // value is given in deg
|
||
48 | threshold_angle_neck_saccade = 15.0; |
||
49 | |||
50 | // 3) eyes reaching ocolumotor limits will trigger correction saccade
|
||
51 | // value given in percent (NOTE: 1.0 = 100%)
|
||
52 | threshold_angle_omr_limit = 0.95; |
||
53 | |||
54 | |||
55 | // neck motion generation configuration
|
||
56 | // humotion calculates neck velocities based on the linear equation Hmax from
|
||
57 | // [Guitton87] "Gaze control in humans: eye-head coordination during orienting movements ..."
|
||
58 | // In order to allow better adaption to the robot capabilities humotion allows to
|
||
59 | // scale the calculated velocity, value is given in percent (NOTE: 1.0 = 100% human velocity)
|
||
60 | scale_velocity_neck = 0.5; |
||
61 | |||
62 | // scale acceleration
|
||
63 | scale_acceleration_neck = 0.7; |
||
64 | |||
65 | // additionally humotion allows to limit the maximum velocity, value is given in deg/s
|
||
66 | limit_velocity_neck = 700.0; |
||
67 | |||
68 | // limit the maximum acceleration, value is given in deg/s^2
|
||
69 | limit_acceleration_neck = 1000.0; |
||
70 | |||
71 | // eye motion generation configuration
|
||
72 | // scale the calculated velocity, value is given in percent (NOTE: 1.0 = 100% human velocity)
|
||
73 | scale_velocity_eye = 1.0; |
||
74 | |||
75 | // scale acceleration
|
||
76 | scale_acceleration_eye = 1.0; |
||
77 | |||
78 | // additionally humotion allows to limit the maximum velocity, value is given in deg/s
|
||
79 | limit_velocity_eye = 700.0; |
||
80 | |||
81 | // limit the maximum acceleration, value is given in deg/s^2
|
||
82 | limit_acceleration_eye = 80000;
|
||
83 | |||
84 | |||
85 | // parameters fo the breathing pattern
|
||
86 | // healthy adult human: 12-15 breaths/min (see e.g. "Ganong's review of medical physiology")
|
||
87 | // total breathe: 60/12-15 = 3-5s
|
||
88 | // inhale 1.5-2s
|
||
89 | // exhale 1.5-2s
|
||
90 | // pause 2s
|
||
91 | // overall period given in seconds
|
||
92 | breath_period = 1.5 + 1.5 + 1.5; // inhale, pause & exhale |
||
93 | // amplitude given in degrees
|
||
94 | breath_amplitude = 1.0; |
||
95 | |||
96 | |||
97 | // parameters for eye blinking
|
||
98 | // duration for one eyeblink, value is given in seconds
|
||
99 | eyeblink_duration = 0.15; |
||
100 | |||
101 | // occurance of periodic eyeblinks, uniformly distributed over the given range
|
||
102 | // typical values for a human are one blink every 2...10s
|
||
103 | // values are given in seconds
|
||
104 | eyeblink_periodic_distribution_lower = 2.0; |
||
105 | eyeblink_periodic_distribution_upper = 10.0; |
||
106 | |||
107 | // probability that one eye saccade causes an eyeblink, value given in percent
|
||
108 | // for humans this is up to 95%, this gets quite annoying on the robot so the default is lower
|
||
109 | eyeblink_probability_after_saccade = 0.33; |
||
110 | |||
111 | // blocking time where further eyeblinks are suppressed, value given in seconds
|
||
112 | 277050c7 | sschulz | eyeblink_blocked_time = 1.0; |
113 | 6d13138a | sschulz | } |