0001-New-types-to-describe-animations-for-Flobi.patch

J. Wienke, 01/05/2016 02:49 PM

Download (7.35 KB)

View differences:

proto/sandbox/rst/animation/BinocularHeadGaze.proto
1
package rst.animation;
2

  
3
option java_outer_classname = "BinocularHeadGazeType";
4

  
5
import "rst/geometry/SphericalDirectionFloat.proto";
6

  
7
/**
8
 * Description of a gaze configuration of a system having tow eyes
9
 * mounted on a pan-tilt joint (something like a human or robot
10
 * head).
11
 *
12
 * @author Simon Schulz <sschulz@techfak.uni-bielefeld.de>
13
 */
14
message BinocularHeadGaze {
15

  
16
    /**
17
     * Spherical direction of the target to gaze at with respect to a
18
     * neutral "straight-ahead" direction of the described "head". The
19
     * direction originates from the center point between both eyes. The
20
     * underlying Cartesian coordinate system of the spherical
21
     * coordinates is as follows:
22
     *
23
     *  * The positive X axis points towards the "straight-ahead"
24
     *    direction.
25
     *
26
     *  * The positive Y axis points to the head's left direction.
27
     *
28
     *  * The positive Z axis points up with respect to the
29
     *    "straight-ahead" direction of the head.
30
     */
31
    required .rst.geometry.SphericalDirectionFloat target = 1;
32

  
33
    /**
34
     * Vergence angle of both eyes. This describes how both eyes deviate
35
     * from a parallel configuration. The default of 0.0 describes a
36
     * straight, parallel gaze. The angles are expressed as a rotation
37
     * around the normal vector of a plane defined by the connecting
38
     * line between both eyes and a ray that points into the neutral
39
     * "straight-ahead" direction of the eyes. Each eye's adjustment
40
     * angle is 0.5 times the given value where positive values
41
     * correspond to the eyes moving inwards.
42
     */
43
    // @unit(radian)
44
    required float eye_vergence = 2 [default = 0.0];
45

  
46
    /**
47
     * Offset angles describing how much the head direction deviates
48
     * from @ref .target. The overall gaze (head + eyes) will still
49
     * point to the requested target
50
     *
51
     * [0, 0] corresponds to no offset.
52
     */
53
    required .rst.geometry.SphericalDirectionFloat offset = 3;
54

  
55
}
proto/sandbox/rst/animation/EmotionExpression.proto
1
package rst.animation;
2

  
3
option java_outer_classname = "EmotionExpressionType";
4

  
5
/**
6
 * Description of one of a set of predefined emotions to express by a
7
 * robot for a certain time.
8
 *
9
 * @author Simon Schulz <sschulz@techfak.uni-bielefeld.de>
10
 */
11
message EmotionExpression {
12

  
13
    /**
14
     * The available emotions to express. Apart from being neutral,
15
     * these relate to Ekman's basic emotions.
16
     */
17
    enum Emotion {
18
        /**
19
         * Neutral expression.
20
         */
21
        NEUTRAL = 0;
22
        /**
23
         * Happiness.
24
         */
25
        HAPPY = 1;
26
        /**
27
         * Sadness.
28
         */
29
        SAD = 2;
30
        /**
31
         * Being angry.
32
         */
33
        ANGRY = 3;
34
        /**
35
         * Being surprised.
36
         */
37
        SURPRISED = 4;
38
        /**
39
         * Being feared.
40
         */
41
        FEAR = 5;
42
    }
43

  
44
    /**
45
     * Indicates which emotion to express.
46
     */
47
    required Emotion emotion = 1;
48

  
49
    /**
50
     * The duration how long this emotion should be displayed.
51
     *
52
     * The duration is given in milliseconds.
53
     *
54
     * TODO: zero? Constraint or description
55
     */
56
    // @unit(millisecond)
57
    required uint32 duration = 2;
58

  
59
}
proto/sandbox/rst/animation/HeadAnimation.proto
1
package rst.animation;
2

  
3
option java_outer_classname = "HeadAnimationType";
4

  
5
/**
6
 * This type describes a set of simple (predefined) animations to be
7
 * executed on a humanoid robotic head.
8
 *
9
 * @author Simon Schulz <sschulz@techfak.uni-bielefeld.de>
10
 */
11
message HeadAnimation {
12

  
13
    /**
14
     * Predefined animation to execute by the head.
15
     */
16
    enum Animation {
17
        /**
18
         * No animation, idle.
19
         */
20
        IDLE = 0;
21
        /**
22
         * Nodding.
23
         */
24
        HEAD_NOD = 1;
25
        /**
26
         * Shake.
27
         */
28
        HEAD_SHAKE = 2;
29
        /**
30
         * Blink with the left eye.
31
         */
32
        EYEBLINK_LEFT = 3;
33
        /**
34
         * Blink with the right eye.
35
         */
36
        EYEBLINK_RIGHT = 4;
37
        /**
38
         * Blink with both eyes.
39
         */
40
        EYEBLINK_BOTH = 5;
41
        /**
42
         * Raise both eyebrows
43
         */
44
        EYEBROWS_RAISE = 6;
45
        /**
46
         * Lower the eyebrows.
47
         */
48
        EYEBROWS_LOWER = 7;
49
        /**
50
         * Shift the head orientation to the left.
51
         */
52
        ENGAGEMENT_LEFT = 8;
53
        /**
54
         * Shift the head orientation to the right.
55
         */
56
        ENGAGEMENT_RIGHT = 9;
57
    }
58

  
59
    /**
60
     * Requested animation to perform.
61
     */
62
    required Animation animation = 1;
63

  
64
    /**
65
     * Number of repetitions.
66
     *
67
     * Defaults to one repetition
68
     *
69
     * TODO: is 0 valid? What happens if so? Otherwise add a constraint.
70
     */
71
    required uint32 repetitions = 2 [default = 1];
72

  
73
    /**
74
     * The duration of each execution of the defined animation.
75
     *
76
     * The duration is given in milliseconds.
77
     *
78
     * TODO: as above zero...
79
     */
80
    // @unit(millisecond)
81
    required uint32 duration_each = 3;
82

  
83
    /**
84
     * How to scale the animation with respect to the expressed emphasis.
85
     *
86
     * Given as a float value. Different value ranges express the
87
     * following meanings:
88
     *
89
     *  * ``]0, 1[``: less pronounced
90
     *
91
     *  * ``[1, 1]``: as designed, no special emphasis
92
     *
93
     *  * ``]1, n]``: over pronounced
94
     */
95
    // @constraint(value > 0)
96
    required float emphasis_scale = 4 [default = 1.0];
97

  
98
}
proto/sandbox/rst/animation/__package.proto
1
/**
2
 * Contains types to describe animations to be performed. Character
3
 * animation is a specific application.
4
 */
5
package rst.animation;
0
-