humotion / src / server / config.cpp @ 7531602c
History | View | Annotate | Download (4.259 KB)
1 |
/*
|
---|---|
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.4; |
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 |
// calculate the overall target distance based on neck target instead of using the real neck
|
85 |
// position
|
86 |
use_neck_target_instead_of_position_eye = true;
|
87 |
|
88 |
// parameters fo the breathing pattern
|
89 |
// healthy adult human: 12-15 breaths/min (see e.g. "Ganong's review of medical physiology")
|
90 |
// total breathe: 60/12-15 = 3-5s
|
91 |
// inhale 1.5-2s
|
92 |
// exhale 1.5-2s
|
93 |
// pause 2s
|
94 |
// overall period given in seconds
|
95 |
breath_period = 4.5; // = 1.5 + 1.5 + 1.5 for inhale, pause & exhale |
96 |
// amplitude given in degrees
|
97 |
breath_amplitude = 1.0; |
98 |
|
99 |
|
100 |
// params for eyelid motion
|
101 |
// should the eyelids follow the eyeball?
|
102 |
eyelids_follow_eyemotion = true;
|
103 |
|
104 |
|
105 |
// parameters for eye blinking
|
106 |
// duration for one eyeblink, value is given in seconds
|
107 |
eyeblink_duration = 0.15; |
108 |
|
109 |
// occurance of periodic eyeblinks, uniformly distributed over the given range
|
110 |
// typical values for a human are one blink every 2...10s
|
111 |
// values are given in seconds
|
112 |
eyeblink_periodic_distribution_lower = 2.0; |
113 |
eyeblink_periodic_distribution_upper = 10.0; |
114 |
|
115 |
// probability that one eye saccade causes an eyeblink, value given in percent
|
116 |
// for humans this is up to 95%, this gets quite annoying on the robot so the default is lower
|
117 |
eyeblink_probability_after_saccade = 0.33; |
118 |
|
119 |
// blocking time where further eyeblinks are suppressed, value given in seconds
|
120 |
eyeblink_blocked_time = 1.0; |
121 |
} |