humotion / src / server / config.cpp @ 6de0fc2e
History | View | Annotate | Download (4.335 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 | 2aa96942 | sschulz | // publish internal debug data as topics?
|
42 | publish_internals = false;
|
||
43 | |||
44 | 6d13138a | sschulz | // saccade detection thresholds:
|
45 | // 1) velocity threshold, values above this value trigger an eye saccade
|
||
46 | // value is given in deg/s
|
||
47 | threshold_velocity_eye_saccade = 15.0; |
||
48 | |||
49 | // 2) angular threshold, a target change higher than this value will trigger a neck saccade
|
||
50 | // value is given in deg
|
||
51 | threshold_angle_neck_saccade = 15.0; |
||
52 | |||
53 | // 3) eyes reaching ocolumotor limits will trigger correction saccade
|
||
54 | // value given in percent (NOTE: 1.0 = 100%)
|
||
55 | threshold_angle_omr_limit = 0.95; |
||
56 | |||
57 | |||
58 | // neck motion generation configuration
|
||
59 | // humotion calculates neck velocities based on the linear equation Hmax from
|
||
60 | // [Guitton87] "Gaze control in humans: eye-head coordination during orienting movements ..."
|
||
61 | // In order to allow better adaption to the robot capabilities humotion allows to
|
||
62 | // scale the calculated velocity, value is given in percent (NOTE: 1.0 = 100% human velocity)
|
||
63 | 7531602c | sschulz | scale_velocity_neck = 0.4; |
64 | 6d13138a | sschulz | |
65 | // scale acceleration
|
||
66 | scale_acceleration_neck = 0.7; |
||
67 | |||
68 | // additionally humotion allows to limit the maximum velocity, value is given in deg/s
|
||
69 | limit_velocity_neck = 700.0; |
||
70 | |||
71 | // limit the maximum acceleration, value is given in deg/s^2
|
||
72 | limit_acceleration_neck = 1000.0; |
||
73 | |||
74 | // eye motion generation configuration
|
||
75 | // scale the calculated velocity, value is given in percent (NOTE: 1.0 = 100% human velocity)
|
||
76 | scale_velocity_eye = 1.0; |
||
77 | |||
78 | // scale acceleration
|
||
79 | scale_acceleration_eye = 1.0; |
||
80 | |||
81 | // additionally humotion allows to limit the maximum velocity, value is given in deg/s
|
||
82 | limit_velocity_eye = 700.0; |
||
83 | |||
84 | // limit the maximum acceleration, value is given in deg/s^2
|
||
85 | limit_acceleration_eye = 80000;
|
||
86 | |||
87 | f7954788 | sschulz | // calculate the overall target distance based on neck target instead of using the real neck
|
88 | // position
|
||
89 | use_neck_target_instead_of_position_eye = true;
|
||
90 | 6d13138a | sschulz | |
91 | // parameters fo the breathing pattern
|
||
92 | // healthy adult human: 12-15 breaths/min (see e.g. "Ganong's review of medical physiology")
|
||
93 | // total breathe: 60/12-15 = 3-5s
|
||
94 | // inhale 1.5-2s
|
||
95 | // exhale 1.5-2s
|
||
96 | // pause 2s
|
||
97 | // overall period given in seconds
|
||
98 | 06d6a491 | sschulz | breath_period = 4.5; // = 1.5 + 1.5 + 1.5 for inhale, pause & exhale |
99 | 6d13138a | sschulz | // amplitude given in degrees
|
100 | breath_amplitude = 1.0; |
||
101 | |||
102 | |||
103 | e71325d1 | sschulz | // params for eyelid motion
|
104 | // should the eyelids follow the eyeball?
|
||
105 | eyelids_follow_eyemotion = true;
|
||
106 | |||
107 | |||
108 | 6d13138a | sschulz | // parameters for eye blinking
|
109 | // duration for one eyeblink, value is given in seconds
|
||
110 | eyeblink_duration = 0.15; |
||
111 | |||
112 | // occurance of periodic eyeblinks, uniformly distributed over the given range
|
||
113 | // typical values for a human are one blink every 2...10s
|
||
114 | // values are given in seconds
|
||
115 | eyeblink_periodic_distribution_lower = 2.0; |
||
116 | eyeblink_periodic_distribution_upper = 10.0; |
||
117 | |||
118 | // probability that one eye saccade causes an eyeblink, value given in percent
|
||
119 | // for humans this is up to 95%, this gets quite annoying on the robot so the default is lower
|
||
120 | eyeblink_probability_after_saccade = 0.33; |
||
121 | |||
122 | // blocking time where further eyeblinks are suppressed, value given in seconds
|
||
123 | 277050c7 | sschulz | eyeblink_blocked_time = 1.0; |
124 | 6d13138a | sschulz | } |