.. _package-rst-animation:
=======================
Package rst.animation
=======================
Contains types to describe animations to be performed. Character
animation is a specific application.
Messages
========
.. container:: mess4ge-multi
.. container:: mess4ge-graph
.. digraph:: message_graph
fontname="Arial";
fontsize=11;
stylesheet="../_static/graphs.css";
node [fontsize=11,fontname="Arial"]
edge [fontsize=11,fontname="Arial"]
"5" [label=<
| EmotionExpression |
|
Emotion | emotion |
UINT32 | duration |
>,shape=box,style=filled,fillcolor="white"];
"6" [label=< | Emotion |
|
NEUTRAL | 0 |
HAPPY | 1 |
SAD | 2 |
ANGRY | 3 |
SURPRISED | 4 |
FEAR | 5 |
>,shape=box,style=filled,fillcolor="white"];
"3" [label=< | BinocularHeadGaze |
|
SphericalDirectionFloat | target |
FLOAT32 | eye_vergence |
SphericalDirectionFloat | offset |
>,shape=box,style=filled,fillcolor="white"];
"4" [label=< | SphericalDirectionFloat |
|
FLOAT32 | azimuth |
FLOAT32 | elevation |
>,shape=box,style=filled,fillcolor="white"];
"1" [label=< | HeadAnimation |
|
Animation | animation |
UINT32 | repetitions |
UINT32 | duration_each |
FLOAT32 | emphasis_scale |
>,shape=box,style=filled,fillcolor="white"];
"2" [label=< | Animation |
|
IDLE | 0 |
HEAD_NOD | 1 |
HEAD_SHAKE | 2 |
EYEBLINK_LEFT | 3 |
EYEBLINK_RIGHT | 4 |
EYEBLINK_BOTH | 5 |
EYEBROWS_RAISE | 6 |
EYEBROWS_LOWER | 7 |
ENGAGEMENT_LEFT | 8 |
ENGAGEMENT_RIGHT | 9 |
>,shape=box,style=filled,fillcolor="white"];
"5" -> "6" [];
"5":emotion -> "6" [];
"3":offset -> "4" [];
"3":target -> "4" [];
"1" -> "2" [];
"1":animation -> "2" [];
.. container:: mess4ge-list
.. container:: messages
* :ref:`HeadAnimation `
* :ref:`BinocularHeadGaze `
* :ref:`EmotionExpression `
.. container:: clearer
clearer: should be made invisible via css
.. _message-rst-animation-headanimation:
Message HeadAnimation
---------------------
.. container:: message-rst-animation-headanimation-multi
.. container:: message-rst-animation-headanimation-documentation
.. py:class:: rst.animation.HeadAnimation
This type describes a set of simple (predefined) animations to be
executed on a humanoid robotic head.
.. codeauthor:: Simon Schulz
.. py:attribute:: animation
:type: :py:class:`rst.animation.HeadAnimation.Animation`
Requested animation to perform.
.. py:attribute:: repetitions
:type: :py:class:`UINT32`
**Constraint**: ``value > 0``
Number of repetitions.
Defaults to one repetition
.. py:attribute:: duration_each
:type: :py:class:`UINT32`
**Constraint**: ``value > 0``
**Unit**: millisecond
The duration of each execution of the defined animation.
The duration is given in milliseconds.
.. py:attribute:: emphasis_scale
:type: :py:class:`FLOAT32`
**Constraint**: ``value > 0``
How to scale the animation with respect to the expressed emphasis.
Given as a float value. Different value ranges express the
following meanings:
* ``]0, 1[``: less pronounced
* ``[1, 1]``: as designed, no special emphasis
* ``]1, n]``: over pronounced
.. container:: message-rst-animation-headanimation-source
:download:`Download this file /home/jenkins/workspace/rst-manual-0.15-merge-simulator/upstream/RST-0.15.0-Linux/share/rst0.15/proto/stable/rst/animation/HeadAnimation.proto>`
.. literalinclude:: //home/jenkins/workspace/rst-manual-0.15-merge-simulator/upstream/RST-0.15.0-Linux/share/rst0.15/proto/stable/rst/animation/HeadAnimation.proto
:lines: 13-100
:language: protobuf
:emphasize-lines: 52-52,61-61,71-71,86-86
.. _message-rst-animation-headanimation-animation:
Message Animation
-----------------
.. container:: message-rst-animation-headanimation-animation-multi
.. container:: message-rst-animation-headanimation-animation-documentation
.. py:class:: rst.animation.HeadAnimation.Animation
Predefined animation to execute by the head.
.. py:attribute:: IDLE
= 0
No animation, idle.
.. py:attribute:: HEAD_NOD
= 1
Nodding
.. py:attribute:: HEAD_SHAKE
= 2
Shake
.. py:attribute:: EYEBLINK_LEFT
= 3
Blink with the left eye.
.. py:attribute:: EYEBLINK_RIGHT
= 4
Blink with the right eye.
.. py:attribute:: EYEBLINK_BOTH
= 5
Blink with both eyes.
.. py:attribute:: EYEBROWS_RAISE
= 6
Raise both eyebrows
.. py:attribute:: EYEBROWS_LOWER
= 7
Lower the eyebrows.
.. py:attribute:: ENGAGEMENT_LEFT
= 8
Shift the head orientation to the left.
.. py:attribute:: ENGAGEMENT_RIGHT
= 9
Shift the head orientation to the right.
.. container:: message-rst-animation-headanimation-animation-source
:download:`Download this file /home/jenkins/workspace/rst-manual-0.15-merge-simulator/upstream/RST-0.15.0-Linux/share/rst0.15/proto/stable/rst/animation/HeadAnimation.proto>`
.. literalinclude:: //home/jenkins/workspace/rst-manual-0.15-merge-simulator/upstream/RST-0.15.0-Linux/share/rst0.15/proto/stable/rst/animation/HeadAnimation.proto
:lines: 18-59
:language: protobuf
:emphasize-lines: 5-5,9-9,13-13,17-17,21-21,25-25,29-29,33-33,37-37,41-41
.. _message-rst-animation-binocularheadgaze:
Message BinocularHeadGaze
-------------------------
.. container:: message-rst-animation-binocularheadgaze-multi
.. container:: message-rst-animation-binocularheadgaze-documentation
.. py:class:: rst.animation.BinocularHeadGaze
Description of a gaze configuration of a system having tow eyes
mounted on a pan-tilt joint (something like a human or robot
head).
.. codeauthor:: Simon Schulz
.. py:attribute:: target
:type: :py:class:`rst.geometry.SphericalDirectionFloat`
Spherical direction of the target to gaze at with respect to a
neutral "straight-ahead" direction of the described "head". The
direction originates from the center point between both eyes. The
underlying Cartesian coordinate system of the spherical
coordinates is as follows:
* The positive X axis points towards the "straight-ahead"
direction.
* The positive Y axis points to the head's left direction.
* The positive Z axis points up with respect to the
"straight-ahead" direction of the head.
.. py:attribute:: eye_vergence
:type: :py:class:`FLOAT32`
**Unit**: radian
Vergence angle of both eyes. This describes how both eyes deviate
from a parallel configuration. The default of 0.0 describes a
straight, parallel gaze. The angles are expressed as a rotation
around the normal vector of a plane defined by the connecting
line between both eyes and a ray that points into the neutral
"straight-ahead" direction of the eyes. Each eye's adjustment
angle is 0.5 times the given value where positive values
correspond to the eyes moving inwards.
.. py:attribute:: offset
:type: :py:class:`rst.geometry.SphericalDirectionFloat`
Offset angles describing how much the head direction deviates
from :py:attr:`target `. The overall gaze (head + eyes) will still
point to the requested target
[0, 0] corresponds to no offset.
.. container:: message-rst-animation-binocularheadgaze-source
:download:`Download this file /home/jenkins/workspace/rst-manual-0.15-merge-simulator/upstream/RST-0.15.0-Linux/share/rst0.15/proto/stable/rst/animation/BinocularHeadGaze.proto>`
.. literalinclude:: //home/jenkins/workspace/rst-manual-0.15-merge-simulator/upstream/RST-0.15.0-Linux/share/rst0.15/proto/stable/rst/animation/BinocularHeadGaze.proto
:lines: 16-57
:language: protobuf
:emphasize-lines: 18-18,31-31,40-40
.. _message-rst-animation-emotionexpression:
Message EmotionExpression
-------------------------
.. container:: message-rst-animation-emotionexpression-multi
.. container:: message-rst-animation-emotionexpression-documentation
.. py:class:: rst.animation.EmotionExpression
Description of one of a set of predefined emotions to express by a
robot for a certain time.
.. codeauthor:: Simon Schulz
.. py:attribute:: emotion
:type: :py:class:`rst.animation.EmotionExpression.Emotion`
Indicates which emotion to express.
.. py:attribute:: duration
:type: :py:class:`UINT32`
**Constraint**: ``value > 0``
**Unit**: millisecond
The duration how long this emotion should be displayed.
The duration is given in milliseconds.
.. container:: message-rst-animation-emotionexpression-source
:download:`Download this file /home/jenkins/workspace/rst-manual-0.15-merge-simulator/upstream/RST-0.15.0-Linux/share/rst0.15/proto/stable/rst/animation/EmotionExpression.proto>`
.. literalinclude:: //home/jenkins/workspace/rst-manual-0.15-merge-simulator/upstream/RST-0.15.0-Linux/share/rst0.15/proto/stable/rst/animation/EmotionExpression.proto
:lines: 13-61
:language: protobuf
:emphasize-lines: 37-37,47-47
.. _message-rst-animation-emotionexpression-emotion:
Message Emotion
---------------
.. container:: message-rst-animation-emotionexpression-emotion-multi
.. container:: message-rst-animation-emotionexpression-emotion-documentation
.. py:class:: rst.animation.EmotionExpression.Emotion
The available emotions to express. Apart from being neutral,
these relate to Ekman's basic emotions.
.. py:attribute:: NEUTRAL
= 0
Neutral expression.
.. py:attribute:: HAPPY
= 1
Happiness
.. py:attribute:: SAD
= 2
Sadness
.. py:attribute:: ANGRY
= 3
Being angry.
.. py:attribute:: SURPRISED
= 4
Being surprised.
.. py:attribute:: FEAR
= 5
Being feared.
.. container:: message-rst-animation-emotionexpression-emotion-source
:download:`Download this file /home/jenkins/workspace/rst-manual-0.15-merge-simulator/upstream/RST-0.15.0-Linux/share/rst0.15/proto/stable/rst/animation/EmotionExpression.proto>`
.. literalinclude:: //home/jenkins/workspace/rst-manual-0.15-merge-simulator/upstream/RST-0.15.0-Linux/share/rst0.15/proto/stable/rst/animation/EmotionExpression.proto
:lines: 19-44
:language: protobuf
:emphasize-lines: 5-5,9-9,13-13,17-17,21-21,25-25