Professional Documents
Culture Documents
VERITAS
Virtual and Augmented Environments and Realistic User Interactions
To achieve Embedded Accessibility DesignS
247765
Table of Contents
Version History Table............................................................................................i
List of Figures.......................................................................................................v
List of Tables........................................................................................................ix
List of Abbreviations............................................................................................ix
Executive Summary.............................................................................................1
1 Simulation Engine..............................................................................................2
1.1 Requirements from the Simulation Engine...........................................................2
1.2 Evaluation of proposed engines...........................................................................3
1.2.1 OGRE...................................................................................................................3
1.2.2 OpenSceneGraph................................................................................................3
1.2.3 Delta3D................................................................................................................4
1.2.4 Verdict..................................................................................................................5
1.3 Chosen engine ...................................................................................................7
1.4 Integration...........................................................................................................7
1.5 Simulation Parameters........................................................................................8
1.5.1 Simulation levels..................................................................................................8
1.5.2 World time-step....................................................................................................9
1.5.3 Collision related parameters................................................................................9
2 Architecture Analysis........................................................................................10
2.1 Overview ........................................................................................................... 10
2.1.1 Input Information................................................................................................12
2.1.2 Simulation components initialization..................................................................13
2.2 Core simulation modules...................................................................................14
2.3 Secondary humanoid modules..........................................................................16
2.3.1 Generic supportive modules..............................................................................16
2.3.2 Motor simulation modules..................................................................................17
2.3.2.1 Basic motor simulation modules......................................................................17
2.3.2.2 Advanced motor simulation modules...............................................................18
2.3.3 Vision simulation modules..................................................................................18
2.3.3.1 Hearing simulation sub-module.......................................................................19
2.3.3.2 Cognition simulation sub-module.....................................................................20
2.4 The simulation cycle..........................................................................................20
2.5 The Simulation Dependency Tree......................................................................23
3 Human Simulation............................................................................................23
3.1 Avatar Representation.......................................................................................24
3.2 Motor Simulation................................................................................................25
3.2.1 Basic Elements..................................................................................................26
3.2.1.1 Bones.............................................................................................................. 26
3.2.1.2 Joints............................................................................................................... 29
3.2.1.3 Points of Interest..............................................................................................34
3.2.2 Forward Kinematics...........................................................................................36
3.2.2.1 Avatar Configurations......................................................................................37
3.2.2.2 Motion Interpolation.........................................................................................38
3.2.3 Inverse Kinematics (IK)......................................................................................39
3.2.3.1 Inverse Kinematics Chains..............................................................................41
3.2.3.2 Numerical IK.................................................................................................... 43
3.2.3.3 Agility factor and comfort angle........................................................................45
3.2.3.4 Analytical IK..................................................................................................... 46
3.2.4 Dynamics...........................................................................................................47
References.......................................................................................................102
List of Figures
Figure 1: Simulation core platform architecture diagram. The data flow is also presented.........11
Figure 2: The core simulation platform input files. Several files from several external applications
needed to run a simulation session. The simulation session must be first initialised. Then the
simulation cycle is repeated until all the tasks (described in the scenario model file) become
successful or at least one fails............................................................................................... 13
Figure 3: The simulation platform's core modules. The four simulation modules, as well their
basic internal data, are displayed. The Simulation Module is basically an inspector of the
other three modules. The arrows display the data flow between the components.................14
Figure 4: The motor simulation modules. Advanced motor simulation (top line) is based on the
four basic modules (line in middle)........................................................................................17
Figure 5: Modules that are taking part in vision simulation. The LookAt Module must cooperate
with motor modules and the Task Manager in order to move the avatar's head and eyes. The
Vision Model applies image filtering and sends the output to the Simulation Module............19
Figure 6: Hearing Model act as a filter that receives audio data from the Simulation Module and
sends them back filtered based on the virtual user's audiogram...........................................19
Figure 7: The Cognition Module takes as input the cognitive attributes of the avatar and creates
delay factors for the Motion Manager and Task Manager modules.......................................20
Figure 9: Humanoid Module and it's components. A short description of the functionality of each
components is also presented...............................................................................................24
Figure 10: The humanoid visual representation is dependent on the loaded avatar model. Here
two different models are presented: a man's (left) and a woman's (middle). The collision
mesh (right) is calculated automatically based on the adaptation process of the loaded 3d
mesh. As it is shown the collision mesh consists of primitive shapes, such as boxes, sphere
and capsules......................................................................................................................... 25
Figure 11: The shoulder joint and its degrees of freedom. There three possible axes in which the
arm can be rotated, thus the joint's DoF number is equal to three........................................29
Figure 12: Avatar joints and their degrees of freedom. Each joint's location is represented by a
red sphere. Here, the joints regarding the movement of the limbs and the head have been
annotated.............................................................................................................................. 30
Figure 13: There are four torso joints. It is also shown that the root bone is located between the
LowerTorso joint and the Pelvis joint.....................................................................................30
Figure 14: The left hand's joints. Each hand has a total of 19 degrees of freedom....................31
Figure 15: The skeleton hierarchy. A child bone is connected to its parent bone by a joint
(represented by an arrow). The only bone that has not a parent bone is the root bone. For
illustration purposes the right arm and leg components have been hidden...........................32
Figure 16: Head Points of Interest. The arrow vectors declare the "LookAt" direction................34
Figure 17: Feet Points of Interest. These points are used by the gait planning algorithms.........34
Figure 18: The hands points of interest. Used primarily by the inverse kinematics and grasp
planning algorithms............................................................................................................... 35
Figure 19: Probability density functions of several normal distributions. The red line is
representing the standard normal distribution.......................................................................39
Figure 20: Left image presents an inverse kinematics chain (green dashed line). The ik-chain is
formed by the nine joints (yellow circled) and has two end effectors (on points A & B). The
LowerTorso_joint is considered the ik-chain's root. Both end effectors happens to have the
same parent, i.e. the RightIndexC_joint. Right image displays which bones are affected
directly by the ik-chain........................................................................................................... 42
Figure 21: Using a numerical-based ik-chain with one position-only end effector (red sphere):
the ik-chain tries to match the location of the end effector to the point of interest target (red
cross). As it's shown in the three right images, the orientation of the end-effector cannot be
controlled properly: the inverse kinematics algorithm produces different palm-orientation
solutions each time................................................................................................................ 43
Figure 22: Using a numerical-based ik-chain with two position-only end effectors (red and green
spheres), results in loose end- effector orientation control: the two targets (red and green
crosses) define an axis (in white), around which the controlled body part can be placed......43
Figure 23: Using a numerical-based ik-chain with three position-only end effectors (red, green
and blue sphere): each of the spheres must be matched to its target (red, green, blue cross
respectively), thus resulting to a unique orientation of the palm............................................43
Figure 24: Numerical-based IK resulted posture: on the left image, the IK were computed
without the agility factors resulting in a non-natural posture, while on the right the
consideration of the agility factors produced a satisfactory result. The target is represented
as a red box and the end effector is the right hand's index-fingertip. Both chains start from
the lower torso joint............................................................................................................... 46
Figure 25: A 2d schematic representation of the 2-RRT method. As it's shown, the first (in green)
tree's root is the start configuration and second (in orange) tree has as root the goal
configuration . The numbers are declare the expansion sequence of the two trees. It is
shown after 31st iteration, a connection has been found between the two trees...................54
Figure 26: After the two trees are connected (via nodes 31 & 30), the solution can be provided.
The path is represented as the sequence of the red-circled nodes.......................................55
Figure 27: A 2D representation of the 3d graph's element used in the gait path-finding algorithm.
The green nodes are the floor “open” nodes and the nodes in red denote the “closed” nodes.
The left image represents a voxel with its 8 neighbours, all of which are “open”. In the middle
image, 3 of the neighbours do not contain floor elements, thus the transition to them is
discarded (red arrows). The result is shown in the right image..............................................59
Figure 28: The floor graph and its the voxels (shown with white boxes). The walls and any other
scene objects that are not masked as “floor”, are represented with red semi-transparent
colour..................................................................................................................................... 60
Figure 29: Floor graph path-finding example: initially the voxel that are colliding with the scene
objects are marked as “closed” (top left). Then the path is computed via the A* algorithm (top
right). Any intermediate path elements that are not crucial are discarded (bottom left). Finally
a Catmull-Rom spline is fitted to the remaining elements (bottom right). ..............................61
Figure 30: Result of the path-finding algorithm on a complex scene. The walls are shown in red
semitransparent colour. The blue cones represent the locations of the floor-graph nodes that
were used, while the green cone shows the target location. The final path is represented by
a green curve (Catmull-Rom spline)......................................................................................62
Figure 31: The average gait cycle. The stance and swing phases for the right leg are displayed.
In normal gait, the stance phase is around the 60% of the gait cycle....................................63
Figure 32: Path deviation error comprehension. The path to be followed is symbolised by a
green curve, while the red arrows () are the step-progress vectors. The yellow areas (Sx)
denote the deviation from the path. If the error exceeds the threshold (left image), the
progress steps are decreased (right image) in order to decrease the avatar's deviation from
the path................................................................................................................................. 65
Figure 33: Turn angle comprehension. If the turn angle is too sharp (left image), the next step is
decreased (right image)......................................................................................................... 65
Figure 34: Gait sequence generated by the Gait Module. For better representation reasons only
the lower half skeleton is presented (red). The spline path (green) is computed based on the
floor-graph path (yellow). The step-progress vectors are shown in white. The steps are
decreased for abrupt turns.................................................................................................... 66
Figure 35: Gait sequence generated for a user model with decreased step length....................67
Figure 36: Grasp Module surface points generation. Initially, a point of interest (yellow box) and
a sphere (yellow transparent colour) must be defined. Then by applying ray casting various
target points are generated................................................................................................... 68
Figure 37: The Grasp Module generates various configurations (left). Some of them are not
valid and are rejected (middle). From the remaining, one is chosen based on criteria, such as
number of collisions, hand placement, etc.............................................................................69
Figure 38: Head and eye coordination. The LookAt Module target has been “locked” on the
purple box. The avatar's line of sight is represented by two green intersecting lines.............70
Figure 39: Normal vision, full-colour palette................................................................................71
Figure 40: Protanopia, results in red-green colour-blindness.....................................................71
Figure 41: Deuteranopia, perceiving in medium wavelengths is minimal. ..................................71
Figure 42: Tritanopia effect results into the inability to perceive short wavelengths....................71
Figure 43: Glaucoma. A large proportion of the visual field is lost..............................................72
Figure 44: Macular degeneration, results in loss of the visual field's central region....................72
Figure 45: Demonstration of the glare sensitivity symptom simulation: compared to the normal
vision case (left image), areas near bright colours and lights have lost their contours (right
image)................................................................................................................................... 72
Figure 46: Otitis, only middle frequency bands are retained. .....................................................73
Figure 47: Otosclerosis, hearing loss of low frequency bands....................................................73
Figure 48: Presbycusis, mild hearing loss..................................................................................73
Figure 49: Presbycusis, moderate hearing loss..........................................................................73
Figure 50: Noise induced hearing loss of high frequency bands (mild case)..............................74
Figure 51: Noise induced hearing loss of high frequency bands (severe case)..........................74
Figure 52: Profound hearing loss with residual low frequency hearing.......................................74
Figure 53: Hearing loss of low frequency bands, rising configuration.........................................74
Figure 54: A simple DoF-Chain consists of two elements: the start element (elem.1) which must
be always a moveable object and the end element (elem.n) which can be either moveable or
static. Several degrees of freedom elements (elem. 2 ~ n-1) can be used in between to
connect the two objects. Each degree of freedom can be either rotational or translational.. .77
Figure 55: Two or more DoF-Chains can be connected in order to allow complex object
functionality. Here a complex object consisted of five primitive objects is presented. This
complex object is consisted of four moving parts and one static part....................................78
Figure 56: A car's storage compartment example. The compartment consists of three connected
parts: the dashboard (static, red wireframe), the door (moveable, green wireframe) and the
door handle (moveable, in black). The red box denotes an object-PoI that can be used by the
avatar in order to open the door. In State A, the handle is in its initial position and the door is
locked. In State B, the handle has been pulled by an external force. If the handle rotates
enough degrees, the door unlocks (State C).........................................................................79
Figure 57: Task tree example. The root task, Task A, is analysed into three subtasks. If any of
them fails, then the whole scenario fails. The sequence that is followed here is Task A →
Task B → Task B.1 → Task B.2 → Task C → Task D → Task D.1 → Task D.2......................81
Figure 58: Simple task example. The task contains three rules. One results in action and the
other two are used for success and failure checks................................................................86
Figure 59: Automotive scenario, testing a storage compartment with handle. The compartment's
door opens when the handle is rotated/pulled enough degrees. The green lines indicated the
avatar's line of sight and the yellow arrow indicates the current subtask's target..................92
Figure 60: Automotive scenario, testing a storage compartment that can be opened by pushing
its door................................................................................................................................... 93
Figure 61: Summed time durations for all the automotive task repetitions (in sec). Each duration
refers to ten repetitions of the same task sequence..............................................................94
Figure 62: The mean torques (Eq.53) at six body locations for the automotive scenario. All
values are in Nm.................................................................................................................... 94
Figure 63: The automotive task's angular impulses (Eq. 54). Values in . It is worthy to mention
that the inclusion of the time component into the torque discriminates better the two designs.
.............................................................................................................................................. 95
Figure 64: The total estimated energy consumed (Eq.58), by each body region for the
automotive scenario. Values declared in Joules....................................................................95
Figure 65: The RoM Comfort factor (Eq.62) distributions for the automotive tasks. Higher values
are indicating more comfortable situations for the examined body region.............................96
Figure 66: The RoM-Torque Comfort factor (Eq.64) distributions for the automotive tasks. Values
near the unit indicating more comfortable and less torque demanding body postures..........96
Figure 67: Workplace scenario, two different office designs: one having the drawer above its
table (left image), and one having it below (right image).......................................................97
Figure 68: Summed durations for all the workplace task repetitions (in sec). Each duration refers
to ten repetitions of the same task sequence........................................................................97
Figure 69: The mean torques (Eq.53) at six body locations for the workplace scenario. Values
are in Nm............................................................................................................................... 98
Figure 70: The workplace task's angular impulses (Eq. 54). Values in Values in .......................99
Figure 71: The total estimated consumed energy (Eq.58) by each body region for performing the
workplace tasks. Values in Joules.........................................................................................99
Figure 72: The RoM Comfort factor (Eq.62) distributions for the workplace tasks. Higher values
are indicating more comfortable situations for the examined body region...........................100
Figure 73: The RoM-torque comfort factor (Eq.64) distributions for the workplace tasks. Values
near the unit indicating more comfortable and less torque demanding body postures........100
List of Tables
Table 1: Main engine features for each proposed candidate........................................................6
Table 2: The bone groups and their respective bones................................................................27
Table 3: The humanoid's Points of Interest.................................................................................36
Table 4: Comparison of analytical and numerical inverse kinematics methods..........................41
Table 5: Analytical IK Chains...................................................................................................... 47
Table 6: Comparison between the Graph-based and Rapidly-exploring Random Tree-based
motion planners..................................................................................................................... 56
Table 7: Collision Groups and their elements.............................................................................57
Table 8: The supported scene rule conditions. Each condition element, besides its type, may
need some extra data parameters to be defined (Param. A/B/1)...........................................80
Table 9: Scene rule result elements and their respective parameters........................................80
List of Abbreviations
Abbreviation Explanation
DoF Degree of Freedom
GUI Graphical User Interface
IK Inverse Kinematics
LGPL GNU Lesser General Public License
ODE Open Dynamics Engine
OGRE Open Source 3D Graphics Engine
OS Operating System
OSG OpenSceneGraph
PoI Point of Interest
RoM Range of Motion
RRT Rapidly-exploring Random Tree
SP Sub-Project
VR Virtual Reality
Executive Summary
The main objective of this manuscript is to analyse the development process and
algorithms that are used in the Core Simulation Platform. The Core Simulation Platform
forms the basis of the VERITAS platform. More specifically, the Platform is the
infrastructure for all simulations that take place within VERITAS and its purpose is to
provide all the necessary aids and functionality of reproducing realistically the
simulation scenarios. Support of all the intelligent avatar's structures (W1.6) and its
interaction with the virtual objects/products is also part of the Core Simulation Platform.
Finally, in order to recognize necessary design changes in the software or hardware
setup, the Core Simulation Platform contains all the needed elements that will provide
feedback to the product designer at every simulation step of the application scenario.
This document shall provide all the necessary information regarding the Core
Simulation Platform. In this manuscript, basic implementation aspects are described,
like the simulation engine that the platform has been based on, the architecture that
has been followed and the reasoning of “why this and not something else” is also
explained. Additionally, this document describes more complex aspects, like the
algorithms and structures which have been created for supporting the virtual human
simulation, the scene objects manipulation and the task sequence management.
This document is split into five sections. Each of the sections deal with one important
matter of the implementation process of the simulation core platform.
Section 1 presents a thorough analysis and evaluation of the available engines and
their characteristics. The selected engine and the reasoning behind this action is
presented.
The simulation core architecture is presented in Section 2. A detailed description of the
simulation platform's basic modules, i.e. human model, scene model and Task
Manager, and the various sub-modules that are supporting them are also described in
the same section.
Section 3 contains all the information that is relative to the human simulation. The
necessary modules that have been implemented for supporting the intelligent avatar
are also described in this section. In Section 3, the three-level simulation system is also
mentioned. Concerning the human model capabilities, there are categorized in four
main domains: motor simulation, vision simulation, hearing simulation and cognitive
simulation and are studied in each respective subsection.
The 3D scene and its objects simulation is presented in Section 4. Simple object
manipulation and more complex objects' simulation aspects are going to be presented.
The whole simulation process is supervised by a sophisticated task management
system that is described in Section 5. The task structures, their internal organization
and the overall management are supervised by the Task Manager Module which is
analysed in the same section.
Section 6 contains information about the metrics and the human factors that are used
by the core simulation platform in order to perform the product's accessibility
assessment. Two example cases are also presented, one regarding the automotive
area and one that concerns the workplace area.
1 Simulation Engine
In this section, several aspects about the selection of the simulation engine of the
VERITAS Simulation Core Platform are studied. Starting from the Platform
requirements, passing to the comparison of engine candidates and finally selecting the
best simulation engine is a difficult task and thus it is something that needs to be
described thoroughly.
1.2.1 OGRE
OGRE (Object-Oriented Graphics Rendering Engine) is a scene-oriented, flexible 3D
engine written in C++ designed to make it more intuitive for developers to produce
applications utilising hardware-accelerated 3D graphics. The class library abstracts all
the details of using the underlying system libraries like Direct3D and OpenGL and
provides an interface based on world objects and other intuitive classes. OGRE is
simple and easy to use object oriented interface designed to minimise the effort
required to render 3D scenes, and to be independent of 3D implementation i.e.
Direct3D/OpenGL. Common requirements like render state management, spatial
culling, dealing with transparency are done automatically. Full documentation exists for
all engine classes. So far it has proven to be a stable engine used in several
commercial products.
Concerning the 3D API support, the main advantage of OGRE is that is supports both
Direct3D and OpenGL. The support of Direct3D makes it able to provide a faster and
more advanced graphics rendering process. However, there are some things to be
taken into account: direct3d is an exclusive part of Microsoft Windows and is not
available for other operating systems, like Linux and MacOS. The hardware
acceleration in these operating systems can only be supported by the OpenGL API. By
default OGRE misses stereoscopic display support and it does not contain a physics
engine. However, these problems can be solved by applying plug-ins to the OGRE
library.
1.2.2 OpenSceneGraph
The OpenSceneGraph (or OSG) is an open source high performance 3D graphics tool-
kit, used by application developers in fields such as visual simulation, games, virtual
reality, scientific visualization and modelling. Written entirely in Standard C++ and
OpenGL it runs on all Windows platforms, OSX, GNU/Linux, IRIX, Solaris, HP-Ux, AIX
and FreeBSD operating systems. The OpenSceneGraph is now well established as the
world's leading scene graph technology, used widely in the vis-sim, space, scientific,
oil-gas, games and virtual reality industries.
All OpenSceneGraph structures are represented as nodes on a graph, resulting in a
very easy manipulation. Moreover, the support of smart pointers prevents memory
leaks and makes the code debugging process easier. Another advantage of the OSG is
its support for loading of numerous 3d graphics files. For reading and writing databases
the database library (osgDB) adds support for a wide variety of database formats via
an extensible dynamic plug-in mechanism - the distribution now includes 55 separate
plug-ins for loading various 3D database and image formats. 3D database loaders
include COLLADA, LightWave (.lwo), Alias Wavefront (.obj), OpenFlight (.flt),
TerraPage (.txp) including multi-threaded paging support, Carbon Graphics GEO
(.geo), 3D Studio MAX (.3ds), Peformer (.pfb), AutoCAd? (.dxf), Quake Character
Models (.md2). Direct X (.x), and Inventor Ascii 2.0 (.iv)/ VRML 1.0 (.wrl), Designer
Workshop (.dw) and AC3D (.ac) and the native .osg ASCII format.
The scene graph will not only run on portables all the way up to high end multi-core,
multi-GPU systems and cluster. This is possible because the core scene graph
supports multiple graphics contexts for both OpenGL display lists and texture objects,
and the cull and draw traversals have been designed to cache rendering data locally
and use the scene graph almost entirely as a read-only operation. This allows multiple
cull-draw pairs to run on multiple CPU's which are bound to multiple graphics
subsystems. Support for multiple graphic context and multi-threading is all available
out-of-the-box via osgViewer - all the examples in the distribution can run multi-
threaded and multi-GPU.
OpenSceneGraph supports OpenGL, but misses any implementation of the Direct3D
API. Another drawback is the lack of physics support, which is needed for the VERITAS
simulations. Moreover, the OSG does not have any embedded sound libraries.
In general, OpenSceneGraph provides the programmer with advanced state of the art
3d graphics and animation functions, but misses support of core elements, like physics
and sound.
1.2.3 Delta3D
Delta3D [6] is an Open Source engine which can be used for games, simulations, or
other graphical applications. Its modular design integrates well-known Open Source
projects such as Open Scene Graph (OSG), Open Dynamics Engine (ODE [7]),
Character Animation Library (CAL3D [8]), and OpenAL as well as projects such as
Trolltech’s Qt, Crazy Eddie’s GUI (CEGUI), Xerces-C, Producer, InterSense Tracker
Drivers, HawkNL, and the Game Networking Engine (GNE). Rather than bury the
underlying modules, Delta3D integrates them together in an easy-to-use API which
allows direct access to important underlying behaviour when needed. Delta3D renders
using OpenSceneGraph and OpenGL.
The primary goal of Delta3D is to provide a single, flexible API with the basic elements
needed by all visualization applications. In addition to the underlying components,
Delta3D provides a variety of tools such as the Simulation, Training, and Game Editor
(STAGE), the BSP Compiler, the particle editor, a stand-alone model viewer, and a HLA
Stealth Viewer. Further, Delta3D has an extensive architectural suite that is integrated
throughout the engine. This suite includes frameworks such as the Application Base
Classes (ABC) for getting started; the Dynamic Actor Layer (DAL) for Actor Proxies and
Properties; signal/slot support for direct method linking; the Game Manager (GM) for
actor management; pluggable terrain tools for reading, rendering, and decorating
terrain; and high-level messaging for actor communication.
As mentioned earlier, Delta3D is a full Game/Simulation engine that is built on top of
OpenSceneGraph. Therefore, all the features of OSG are supported. Moreover,
physics and rigid body collisions are fully supported. Advances audio playback is also
1.2.4 Verdict
The main features of each engine are presented in the Table 1. Several partners
working in 3D applications have had experience with both OGRE and
Delta3D/OpenSceneGraph, the following are a list of things were observed and are of
importance to the final choice:
• OGRE is more oriented towards games and stereoscopic support is not a
priority for the developer community of that engine; therefore it is not as
thoroughly supported as required. OpenSceneGraph and Delta3D however are
targeted more to simulation and VR and have stereoscopic support out of the
box.
• Cluster support for OGRE exists only under a Linux environment through DMX.
OpenSceneGraph and Delta3D have integrated support for cluster rendering.
• Tools and editors in OGRE are sparse and mostly revolve around mesh, particle
and animation viewers without an official world creation tool that integrates
everything (along with physics support) into a single application. On the other
hand, the STAGE editor provided with Delta3D is a full featured world editor that
is extensible to include any new type of object declared through the modular
Actor architecture supported by Delta3D.
• Fraunhofer is already using OSG under their Lightning platform and therefore
are familiar with OSG development for Immersive VR.
• OSG supports more 3D/2D content formats than OGRE out of the box making it
easier to develop the necessary tools for VERITAS that will provide system
integration as stated in A2.3.5.
The pre-mentioned facts along with the inherent support for cluster rendering and
stereoscopic display indicate that Delta3D is better suited as the VERITAS simulation
engine of choice.
Delta3D
Feature OGRE (+OpenSceneGraph)
Stereoscopic display Through patch Integrated
Cluster support Only under Linux Integrated
OS support Windows, Linux, OSX Windows, Linux, OSX
Physics Engines Integration Plugin: Newton, PhysX, Integrated: ODE
ODE, Bullet Plugin: Newton, PhysX
GUI Support Integrated: CEGUI Integrated: CEGUI, Qt
Plugin: WxWidgets, Gtk, Plugin: WxWidgets, Gtk,
Qt, MFC, Flash MFC
3D Format Support Integrated: .mesh / Integrated: .3dc, .3ds,
.skeleton (OGRE specific) .ac, .dw, .flt, .geo, .ive,
Plugin: .bsp .logo, .lwo, .lws, .md2,
.obj, .osg, .tgz, .x,
Spatial Audio Plugin: FMOD, OpenAL Integrated: OpenAL
VR peripheral support Custom code Integrated: VRPN
Graphics API support DirectX, OpenGL OpenGL
Animation Support Frame-based, FK support, Frame-based,
Internal code for skeletal Skeletal animation using
animation and animation integrated Cal3D/
blending, IK through ReplicantBody, integrated
OpenTissue IK
License LGPL/MIT LGPL
Scene Editor External Developer: Integrated: STAGE 2.3.0
Ogitor v.0.3.2
Physics support in editor No Yes
AI support External Integrated: Waypoint
following, FSM, Scripting
Community Support Excellent OpenSceneGraph:
Excellent
Delta3D: Average
1.4 Integration
The Core Simulation Platform has been implemented as a C++ library (Dynamic Link
Library). Code is encapsulated in a single library file which contains a set of classes
and methods. This approach is one of the most effective in terms of performance (no
overheads) and easiness of integration (direct use of the exposed API).
Library integration allows an effective form of integration between software
components, both in terms of performance and productivity. The library API itself
specifies a «communication protocol» between the user and the library, avoiding the
2 Architecture Analysis
2.1 Overview
The basic operation of the simulation core platform can be summarized in the following
three primary steps:
a) Import to the simulation core platform any information and parameters that
consist the simulation scenario.
b) Update all the internal simulation components and their structures so to match
the simulation scenario specification.
c) Run the simulation cycle, determine if the task feasibility and report if the task
was successful or not.
These steps can be analysed to more secondary steps, but in general they describe all
the basis of the data flow. In this section, every one of these three steps will be studied.
In the following subsections more about the components (modules) and several special
parameters that consist the simulation platform will be described.
The simulation core platform architecture and the simulation data flow is shown in
Figure 1.
Figure 1: Simulation core platform architecture diagram. The data flow is also presented.
The avatar files are generated as an output of using the tools provided by the activities
A1.6.3 "Intelligent avatar" and A2.1.6 "Virtual User and Simulation models adaptor".
The virtual user models are provided through the tool of A.1.6.5 "Integrated user model
generator". The whole process is shown in Figure 2.
Task Simulation
Scene
Model Model
Virtual
Scenario Scene Avatar
User
Model Model Files
Model
is also created and the functionality of each one is generated. The responsible
structures for the scene model are described in section 4.
The last thing is the implementation of all the simulation scenario file structures that will
take place in a simulation session. From these the internal task sequence is generated.
The simulation core platform has internal structures for supporting each task. It also
has an advanced module that is is responsible for managing this task sequence. The
task management is described in section 5.
Simulation
Simulation
Module
Module
simulation
parameters
Scene Humanoid
Scene
Module Humanoid
Module
Module Module
motor
scene scene properties
objects (collision mesh, vision
gravity etc,) humanoid
capabilities hearing
cognition
objects scene
degrees of functionality humanoid
freedom and rules functionality
Task Manager
Task Manager
Module
Module
tasks
Figure 3: The simulation platform's core modules. The four simulation modules, as well
their basic internal data, are displayed. The Simulation Module is basically an inspector
of the other three modules. The arrows display the data flow between the components.
• the Simulation Module, which is responsible for managing the whole simulation
and providing the user feedback.
• the Humanoid Module (or human model module), which is responsible for
simulating the avatar's capabilities and performing its actions.
• the Scene Module (or scene model module), which is responsible for managing
the scene objects and theirs functionality.
• the Task Manager Module, which has the purpose of managing the tasks
needed to be done, i.e. the sequence of the avatar's actions and their results
on the scene objects.
As it is shown, the Simulation Module encapsulates the other three components. In
terms of hierarchy, the Simulation Module is above any other structure in the VERITAS
simulation platform. It is the main component that supervises the whole simulation and
organizes the communication between the human, scene and Task Manager modules.
If anything goes wrong, from simple matters, like wrong input to the platform, to more
advanced, like physics instability issues, is reported by the Simulation Module.
The Humanoid Module's primary responsibility for managing the avatar structures
during the Simulation Module. More precisely, it is responsible for moving the avatar
based in the virtual user model motor capabilities, and applying various visual and
hearing filters, based on the virtual use model vision and hearing capabilities.
Moreover, it is responsible for applying basic alteration in the avatar's functions based
on the provided cognitive parameters. Beside all these, the Scene Module organizes
and manages the attributes of the scene objects. After parsing the scene model file, the
Scene Module is responsible for constructing all the scene objects and defining their
functionality. Simple rules define the functionality of an object. A simple rule example
would be "if the object-button is translated, i.e. pressed, more that 1cm, then the
object-compartment opens. This rule system, along with other elements such as the
object collisions, physical attributes (e.g. weight), environmental attributes (e.g. surface
mesh, gravitational forces), are all parts of the Scene Module.
The Task Manager Module manages everything related to the scenario tasks. When a
task is to be performed, the Task Manager informs the Humanoid Module to act. Then
the Task Manager supervises the humanoid at every simulation step and reports to the
Simulation Module if anything went wrong. The Task Manager Module organizes its
tasks in sets of rules or rulesets. Each rule is activated when its condition part is met.
More about the task rulesets can be found in section 5.
The reason why the simulation core platform has been split into four core modules is
because:
• It provides better organization, as each core module has to cope with specific
problems and entities.
• It provides better data flow coordination, as each module sends and receives
data only in the time-frame this is needed.
• It provides better code implementation scalability, meaning that:
◦ each core module can be given extra functionality easily if needed.
◦ A core module can even be used alone, e.g. only the humanoid classes
could be easily integrated into another platform/application.
Advanced
Gait Module Collision Avoidance Manager Grasp Module
Motor Modules
Humanoid Module
Figure 4: The motor simulation modules. Advanced motor simulation (top line) is based
on the four basic modules (line in middle).
The Inverse Kinematics Manager (or IK Manager), contains all structures that are
needed for computing the avatar's inverse kinematics. The IK Manager gets
information from the current task and generates a desired posture. Then passes this
“target” posture to the Motion Manager to move the respected body parts.
Task Manager
Module
set
Motor Modules target
Humanoid Module
Figure 5: Modules that are taking part in vision simulation. The LookAt Module must
cooperate with motor modules and the Task Manager in order to move the avatar's
head and eyes. The Vision Model applies image filtering and sends the output to the
Simulation Module.
The LookAt Module is used for coordinating the head and rotating eye balls. This
coordination is based on a target point set by the task module and The LookAt Module
also provides the Humanoid Module with the necessary transformations needed to
visualize the avatar's line of sight.
audio input
audiogram
Humanoid Module Hearing Model Simulation Module
specs
filtered audio
audio
exchange
External Application
Figure 6: Hearing Model act as a filter that receives audio data from the Simulation
Module and sends them back filtered based on the virtual user's audiogram.
The hearing simulation is performed by one sub-module which is called the Hearing
Model. The Hearing Model contains several parameters that are based on the virtual
user model's audiogram. Initially it receives audio data from either the Simulation
Module or the external application and then applies audio filters to them. Finally it plays
the sound or sends it back to the external application. The whole process is displayed
in Figure 6.
cognitive delay
Humanoid Module Congition Module Motion Manager
attributes factors
Task Manager
Module
Figure 7: The Cognition Module takes as input the cognitive attributes of the avatar and
creates delay factors for the Motion Manager and Task Manager modules.
In its current state the Cognition Module cooperates with both Motion Manager and the
Task Manager. The Motion Manager contains elements which support the delay of the
functionality of some movements performed by the humanoid based on the virtual user
model cognitive parameters. The delay factors are also applied for the task actions,
e.g. to simulate the thinking process; so, the Cognition Module communicates with the
Task Manager. The Virtual User Model cognition parameters are passed through the
Humanoid Module (Figure 7).
No
Is any task Yes
running or waiting for
execution?
No
No
Inform structures
Bone Manager
Inform structures
Joint Manager Inform structures Inform structures inform
Vision Model
Motion Manager Hearing Model Cognition Module structures
LookAt Module
IK Manager
+ advanced modules
Humanoid Scene
Module Module
Figure 8: The simulation cycle diagram. The core modules are displayed with
gray boxes. The simulation session will fail if the read lined boxed if activated.
3 Human Simulation
The human simulation is carried out through the Humanoid Module. The Humanoid
Module organises and coordinates a set of other sub-modules. These are shown in
Figure 9. Besides the sub-modules, several more components are included in the
humanoid structure in order to make its manipulation more convenient. In the following
sub-sections, the functionality of these components is going to be analysed.
Bone coordination,
tracking bone position,
Bone Manager orientation, velocity.
Points of interest
management.
Joint coordination,
tracking rotations,
Joint Manager range of motion limitation,
avatar posture control,
torque generation.
Management of collision
Gait Module
avoidance algorithms
3.2.1.1 Bones
The bone is a basic construction unit of the humanoid skeleton. By using the term
“bone” it must not be mistaken that the bone is a representation of an actual human
bone. Instead, the term “bone” is used to describe a specific body part.
The humanoid consists of 51 such bones. The number of bones is chosen having in
mind two facts:
a) the parameters that were gathered from the activities of the SP1 (either from
the bibliography or the multisensorial platform) did not refer to any extra body
parts than the ones defined here.
b) any extra bones would decrease the performance of the simulation platform
without providing any additional functionality and may even cause instability
issues in the dynamics simulation.
For better manipulation, the bone elements are organized in groups, which are called
“bone groups”. There are 10 bone groups, presented in Table 2. The bone groups are
structures that are manipulated by the Bone Manager.
Each bone has a rigid body and is defined by the following attributes:
• Mass: the mass definition includes the bone mass measured in kg along with a
[ ]
I 1,1 I 1,2 I 1,3
3x3 matrix I = I 2,1 I 2,2 I 2,3 , which is called the moment of inertia tensor
I 3,1 I 3,2 I 3,3
and is a measure of an object's resistance to changes to its rotation. The
tensor matrix is used only in dynamic sessions.
• Volume (m3): the volume is defined by the type and size of the primitive shape
that is representing the bone.
• Position (m): a 3d vector ⃗p =( x , y , z ) which states the current position in
absolute coordinates of the bone's centre of mass.
• Orientation: this attribute stores the global orientation of the bone's volume.
There three different ways to define it:
◦ Via a quaternion q=( q w , q x , q y , q z ) . This is the fastest and more preferable
method of the three. The inverse rotation is also derived very fast.
◦ Via an angle and axis ( a ,( x , y , z ) ) . This is as powerful as the quaternion
and it is generally a more intuitive representation. Axis angles are
• u=
Linear velocity (m/s): is defined by a triple of float numbers ⃗ ( dxdt , dydt , dzdt )
that declare the absolute linear velocity of the bone's centre of mass.
• Angular velocity (rad/s): is defined by a triple of float numbers
ω
⃗= ( dr x dr y dr z
,
dt dt dt
, )
which declare the angular velocity of the bone's volume
a linear =
⃗
d ⃗u
dt (=
du x du y du z
,
dt dt dt
, = )(
d 2 x d2 y d2z
, ,
dt 2 dt 2 dt 2 )
, where u is the linear
velocity.
◦ in dynamics sessions it is better to consider that the linear acceleration is
equal to the quotient of dividing the net force applied to the centre of mass
⃗ net
F
by the mass size, i.e. ⃗
a= .
m
• Angular acceleration (rad/s2): respectively as the linear acceleration case
◦ in purely kinematics, the angular acceleration is given by:
a angular =
⃗
dω⃗
dt
=
dt(
d ωx d ω y d ω z
,
dt
,
dt
.
)
◦ In dynamics sessions angular acceleration it is described better by taking
into consideration the bone's net torque and the tensor that is applied to the
bone, i.e.:
a angular = I −1τ⃗ net , where I −1 is the inverse of the inertia tensor and τ⃗ net is
⃗
the net torque applied to the bone.
• Collision mesh: represented by an ODE geometry. Basically, it is an abstract
geometry object having the shape of the bone's primitive shape.
Initially, the avatar has a predefined weight (in kg), which is given as input to the
Humanoid Module by the Cal3D module's parser. The weight is distributed uniformly to
each bone's mass depending on its volume. The bone volume is automatically
computed based on the visual representation (mesh) of the avatar 3d model. More
specifically, this is achieved by:
1. First, converting the cal3d model into a set of oriented bounding boxes. Each
bounding box is orientated regarding the cal3d bone part's mesh.
2. Then, at each bounding box, a primitive 3d shape must fit. This process is
performed by the cooperation of the Cal3d module and the Bone Manager,
where the first creates the bounding boxes and the seconds fits a primitive
shape into them. The primitive shapes can be either be boxes, a spheres or a
capsules1. These primitive shapes are easier to manipulate by the dynamics
engine than the original triangle mesh. Another advantage is the lower
computational cost of the collision algorithms.
The bone can take part in the simulation in two available states: kinematic or dynamic.
When in kinematic state, the mass property of the bone is ignored. The kinematic state
is activated when the simulation is running in level-1 modes. When in dynamic state,
forces and torques can be applied to the bone, e.g. to move it, rotate it, etc. The
dynamic state of the bone is active when the simulation is running in level-2.
In respect to this point, it must be mentioned that there is a special bone in the skeleton
that needs to be analysed more. This is the Root Bone and is positioned in the pelvis
region. The root bone is unique because it defines the centre of the avatar and it is the
manipulation reference of changing the avatar's global location and/or orientation. By
default, the root bone is not allowed to have any mass attributes assigned to it and its
volume is equal to zero, meaning that is a point. However it keeps all the rest
attributes, such as the position, orientation, velocities and accelerations.
3.2.1.2 Joints
A joint is an element that keeps two bones connected. There are a total of 50 joints
supporting the skeleton. Each joint permits its attached bones to rotate:
a) by either setting the bones' orientations directly (in level-1 simulations) or
b) by generating and applying torques (in level-2 simulations) to them.
The number of the rotational degrees of freedom (DoF) is predefined by the Joint
Manager for each joint and can vary from 1 DoF to 3 DoF. One DoF joint means that it
can apply rotation to its two bones around one axis only (such 1-DoF joints are most of
the finger joints). Joints having 3DOF permit rotations along all three axes. Such a joint
is the shoulder joint shown in Figure 11
Figure 11: The shoulder joint and its degrees of freedom. There three possible axes in
which the arm can be rotated, thus the joint's DoF number is equal to three.
1 A capsule is a cylinder capped with hemispheres. The capsules are preferred over cylinders
because of their better dynamics behaviour.
Figure 12: Avatar joints and their degrees of Figure 13: There are four torso joints.
freedom. Each joint's location is represented It is also shown that the root bone is
by a red sphere. Here, the joints regarding located between the LowerTorso joint
the movement of the limbs and the head and the Pelvis joint.
have been annotated.
Figure 14: The left hand's joints. Each hand has a total of 19
degrees of freedom.
The joints' names along with their locations and DoF are presented in figures 12, 13
and 14. The joints are following a hierarchical system, i.e. each joint is connected to
another one in a specific manner (Figure 15). A joint is permitted to have only one
parent joint or none at all – the two joints without a parent are the ones that are
attached to the root bone, i.e. the “LowerTorso_joint” and the “Pelvis_joint”. Having this
in mind, a joint may have one or more children joints, that inherit their parent
transformation. Using this hierarchical skeletal system the rotations can be applied very
fast. The two bones that are attached to the joint are declared as parent and child
bone.
HEAD
Head
Head_joint
Neck
LeftShoulder_joint
LeftUpperArm UpperTorso
LeftElbow_joint
UpperTorso_joint
LeftLowerArm TORSO
MiddleTorso
LEFT LeftWrist_joint
HAND MiddleTorso_joint
LeftHand
LowerTorso
LeftUpperLeg_joint
LeftRingA LeftIndexA
LeftUpperLeg
LeftRingB_joint LeftIndexB_joint
LeftFoot LEFT
LEG
LeftToes_joint
LeftToes
There are several attributes that define the behaviour of each joint. These are:
• The joint's anchor: basically declares the current joint position. It is basically a
3d vector ⃗p joint =( x , y , z ) . The joint's anchor can be expressed in three
possible ways:
◦ as an absolute set of coordinates.
◦ as a relative translation to its parent and
◦ as a relative translation to the root bone's position.
• The joint's local axis/axes of rotation: the local axis define the rotational axis
along which the child bone is permitted to be rotated relative to the parent's
bone. The axes number is the same as the joint's DoF number, thus varying
from one to three. It is a requirement by the core simulation platform that in the
3-DoF joints all the axes must be perpendicular.
• The range of motion of the joint's degrees of freedom: each degree of freedom
is defined by an angle value. All the possible angle values define the DoF's
range of motion. The upper and lower angle limits are stored inside the joint's
structure and are parametrisable, depending by the virtual user model's motor
capabilities.
• The comfort angle: the comfort angle is the angle at which the joint's DoF
results in comfortable bone postures. Each joint can be assigned from one to
three comfort angles, depending on its number of DoF. Every comfort angle
must be inside the respective range of limit.
• The agility factor: this factor declares the kinematic behaviour of the joint. The
agility factor is used by the inverse kinematics resulting into more natural body
postures.
• The torque definitions (applies only to dynamics): while in dynamics sessions,
each joint can apply to its child bone torques in order to rotate them. Every joint
can apply limited torque based on the formula:
τ max=τ min + f τ⋅τ base (1)
where:
◦ τ max is the maximum torque that can be generated in the joint.
◦ τ min is the joint's minimum torque. This value must always be greater than
zero. Although zero values are permitted, they can lead to instability issues,
and thus must be avoided.
◦ τbase is the joint's base torque: the base torque measures how strong is a
joint compared to the rest body joints.
◦ f τ is joint's torque factor and is depending on the strength capabilities of
the loaded virtual user model.
All the torque values are measured in Nm.
Figure 16: Head Points of Interest. The Figure 17: Feet Points of Interest. These
arrow vectors declare the "LookAt" points are used by the gait planning
direction. algorithms.
Thumb fingertip
Index fingertip
Middle fingertip
Ring fingertip
Pinky fingertip
stability. The kinds of functions that produces such curves are called bell-
shaped functions. The most known is the normal/Gaussian distribution
probability density (pdf) function (Figure 19):
2
−( x− μ )
1 2σ
2
ϕ μ , σ ( x)= e (11)
√2π σ 2
Figure 19: Probability density functions of several normal distributions. The red line
is representing the standard normal distribution
By replacing the uniform distribution of the time parameter values of Eq. 8&9
with the distribution defined in Eq. 11, the linear angular velocities can be easily
converted to bell-shaped velocities.
• Fade-in/out variations: applying only the left half part of the bell-shaped
function to the time parameter, will result that the angular velocity will gradually
increase. This is useful for “fade in” motion effects, i.e. at the start of movement
series. The same can be applied for “fade-out” effects, i.e. when ending the
movement of the avatar. These kinds of motion, besides they are necessary for
computing target postures in dynamics sessions, they also produce more
natural animation.
chains is parted by only one end effector. There are a number of rules that must apply
at the construction of an IK chain:
• The ik-chain must have only one root. The ik-root is basically a joint and is
considered the “start” of the chain. Chains having more than one roots are
invalid and are not supported by the IK Manager.
• All the joints that take part in an ik-chain must be connected. For example, the
ik-chain shown in Figure 20 could not have the “Head_joint” as part of it,
because it is not connected directly to any of its joints.
• The skeleton hierarchy is maintained into the ik-chain, meaning that each ik-
joint acts as parent of another ik-joint(s).
• The end effector elements cannot have any children and their parent must
always be an ik-joint.
Figure 20: Left image presents an inverse kinematics chain (green dashed line). The
ik-chain is formed by the nine joints (yellow circled) and has two end effectors (on
points A & B). The LowerTorso_joint is considered the ik-chain's root. Both end
effectors happens to have the same parent, i.e. the RightIndexC_joint. Right image
displays which bones are affected directly by the ik-chain.
Also, regarding the numerical IK only:
• An IK chain with only one end-effector point cannot be used for computation of
effector orientations (Figure 21).
• By adding more than one end effector points to the same ik-joint, a desired
orientation can be set. Two end-effectors can be used for loose orientation
control (Figure 22) and three end-effectors are needed for a more strict control
of orientation (Figure 23).
Figure 21: Using a numerical-based ik-chain with one position-only end effector (red
sphere): the ik-chain tries to match the location of the end effector to the point of
interest target (red cross). As it's shown in the three right images, the orientation of the
end-effector cannot be controlled properly: the inverse kinematics algorithm produces
different palm-orientation solutions each time.
Figure 22: Using a numerical-based ik-chain with two position-only end effectors (red
and green spheres), results in loose end- effector orientation control: the two targets
(red and green crosses) define an axis (in white), around which the controlled body
part can be placed.
Figure 23: Using a numerical-based ik-chain with three position-only end effectors (red,
green and blue sphere): each of the spheres must be matched to its target (red, green,
blue cross respectively), thus resulting to a unique orientation of the palm.
3.2.3.2 Numerical IK
The numerical IK method uses a Jacobian algorithm for computing the joint angles.
The Jacobian is a “vector derivative with respect to another vector”. The two vectors in
the ik case are:
T
Φ =[ϕ 1, ϕ 2 ,… ϕ N ] (12)
T
E=[ e 1, e 2 ,… , e M ] (13)
Where Φ is the vector containing the N degrees of freedom parameters of the ik-
chain, i.e. the joint angles, and E contains the M degrees of freedom parameters of
the end effectors. Because the end effectors are containing position-only information,
the Eq.13, may be rewritten as a matrix:
[ ]
e 1, x e 1, y e 1, z
E= e 2, x e 2, y e 2, z
(14)
⋮
eK , x eK , y eK , z
Where e i , x denotes the x translation of the i-th end effector. It is derived easily that:
1
K= M (15)
3
The Jacobian can then be given by the matrix:
[ ]
∂ e1, x ∂e 1, x ∂ e1, x
…
∂ϕ1 ∂ϕ2 ∂ϕ N
∂e 1, y ∂e 1, y ∂e
… ∂ ϕ1, y
∂ϕ1 ∂ϕ2
dE N
J ( E ,Φ )= = ∂ e 1,z ∂ e1, z ∂ e 1,z (16)
dΦ …
∂ϕ1 ∂ϕ2 ∂ϕ N
⋮ ⋮ ⋱ ⋮
∂e K , z ∂e K , z ∂e K , z
… ∂ϕ
∂ϕ1 ∂ϕ2 N
∂e k , x
where the is the partial derivative of the x component of the k-th end effector to
∂ ϕn
the n-th degree of freedom angle. The derivative contains a measure of “how much an
end effector is moving on an axis when a joint rotates”.
Having a vector Δ Φ that represents a small change in the joint DoF values, i.e.:
dΦ
ΔΦ= ≈Φ (t)−Φ (t −1) (17)
dt
then the change of the end effectors can be estimated by:
dE
Δ E≈ Δ Φ =J (E ,Φ )⋅Δ Φ (18)
dΦ
which can be inversed into:
Δ Φ ≈ J −1 (E , Φ )⋅Δ E (19)
So, having the Δ E (i.e. the end effector to target difference) and inverting the
Jacobian matrix, the change of the DoF angles can be found and added to the avatar's
[]
∂ ek , x
∂ϕn
[ ][ ]
an, x e k , x− p n , x
∂ ek , y
⇔ = a n , y × ek , y− p n , y (21)
∂ϕn
an, z ek , z − pn , z
∂ ek , z
∂ϕn
where ⃗ a n denotes the joint DoF global rotational axis, ⃗e k the end effectors global
position, ⃗p n the joint's global position and “x” denotes the cross product operation. By
computing the Eq.21 for every end-effector and joint-DoF pair, the Jacobian matrix is
derived.
The solution to the second problem is the application the damped least squares
method. First the product of the Jacobian to its transpose matrix is computed:
T
U =JJ (22)
Then, a small value is added to the U diagonal elements in order to make the squared
U more stable for its inversion:
U ←U+ λ2 I (23)
By inverting U , multiplying it by Δ E and applying the result into Eq. 19:
Figure 24: Numerical-based IK resulted posture: on the left image, the IK were
computed without the agility factors resulting in a non-natural posture, while on the
right the consideration of the agility factors produced a satisfactory result. The target is
represented as a red box and the end effector is the right hand's index-fingertip. Both
chains start from the lower torso joint.
3.2.3.4 Analytical IK
The implemented analytical inverse kinematics algorithms are based on the method
described in [9]. More specifically, the analytical inverse kinematics algorithm has a
number of particularities:
• The ik-chain must have three joints, no more, no less.
• The number of DoF is: three for the root joint, and two for the rest joints.
• Only one end effector is supported and it has six degrees of freedom.
The pre-described model will be called as “3-2-2-DoF model”. Despite its restrictions,
the 3-2-2-DoF structure is present in four crucial body regions of the avatar. These are:
the left/right arm and the left/right leg (Table 5).
Analytical IK Chain Joints
Left Arm LeftShoulder (3), LeftElbow (2), LeftWrist (2)
Right Arm RightShoulder (3), RightElbow (2), RightWrist (2)
Left Leg LeftUpperLeg (3), LeftKnee (2), LeftAnkle (2)
Right Leg RightUpperLeg (3), RightKnee (2), RightAnkle (2)
3.2.4 Dynamics
Each body joint is able to generate torques to move its attached bones. There are two
methods provided for applying the dynamics: either by directly setting the exact torque,
i.e. by forward dynamics, or by setting the desired relative angle velocity, i.e. by inverse
dynamics. It is reminded that all the dynamics described in this manuscript are referring
only to rigid body dynamics [10].
[ ][ ][ ]
−1
ar , x I xx I xy I xz τx
τ⃗ =I ⃗a r ⇔ ⃗a r =I −1 τ⃗ ⇔ a r , y = I yx I yy I yz τy (26)
ar , z I zx I zy I zz τz
where the τ⃗ is the 3d torque vector in relative to parent bone coordinate system, ⃗ a r is
the angular acceleration of the child bone and I is a 3x3 matrix called the moment of
inertia tensor. The moment of inertia tensor is a measure of a rigid body's resistance to
changes to its rotation. Each bone element has its own moment of inertia tensor. The
moment of inertia tensor depends on the bone's mass and its shape. Same masses
distributed in different shapes result in different tensors. The mass distribution and the
computation of the bone elements is performed by the Bone Manager.
By using Eq.26, after the application of torque, the child bone is accelerated. The joint
is responsible for this angular acceleration. However the joint, besides the torque,
needs to apply a force to its two child bone in order to keep it connected to its parent.
This force is computed internally by the Open Dynamics Engine. So, besides the
angular acceleration, the force change the linear acceleration of the child bone, via:
⃗f internal =m⃗ a internal =m ⃗f internal
a internal ⇔ ⃗
−1
(27)
where ⃗f internal is the internal force vector, ⃗
a internal is the linear acceleration of the child
bone's centre of mass due to this force, and m is a scalar that declares the bone's
mass.
Finally, in order to compensate the gravitational forces, the joint adds an extra anti-
[ ]
0
⃗f anti− gravity =−⃗
γ m≈ 0 (28)
9.81⋅m
where ⃗f anti− gravity is the force that the joint needs to apply the for negating its weight,
and γ
⃗ declares the earth's constant gravitational acceleration.
Forward dynamics are used only for testing the avatar's dynamic capabilities. The must
be avoided when running simulations, because their usage may lead into unnatural
motions. For proper simulations, the inverse dynamics way must be followed,
otherwise, the user must calculate and apply all the forces and torques to the rigid
bodies.
[ ]
ω x (t+ 1)−ω x (t)
1
v angular =
⃗ ω y (t+ 1)−ω y (t) (30)
dt
ω z (t+ 1)−ω z ( t)
where ω x (t) denotes the x-axis component of the joint's relative angular velocity in
the current time step and the same Euler angle ω x (t+ 1) in the target frame. If the
target configuration is containing relative rotations declared in quaternions, the relative
rotation change is given by:
the inverse quaternion of the current frame. Quaternion q delta is then converted into an
axis-angle representation:
[ ]
d ω⋅r x
[ ]
q delta → d ω → d ω⋅r y
⃗r
d ω⋅r z
(32)
where the ⃗r is the unit axis around which the child bone must be rotated by d ω rad
in order to reach it target configuration. Dividing Eq.32 by dt the ⃗ v angular can be
retrieved:
[ ]
d ω⋅r x
1
v angular =
⃗ d ω⋅r y (33)
dt
d ω⋅r z
Having the angular velocity (either from Eq.30 or 33), the next step is to compute the
needed forces and torques that need to be applied at the joints in order to move the
respective bones. This problem is solved automatically by the Open Dynamics Engine
(ODE) and the only requirement is to input the target angular velocity ⃗ v angular of the
joint. ODE uses a Lagrange multipliers technique in order to provide the solution of
computing the inverse dynamics. Lagrange multipliers besides the target velocity, take
into consideration a number of constrains, such as the maximum allowable torque of
the joint, the joint's range of motion, etc. and provide a solution with the minimum
required torque.
Here it must be noted that, depending on the avatar's strength capabilities, i.e. its
maximum joint torques, the target configuration may not be achieved in the time that
was given. The Motion Manager takes this into consideration and can extend the joint's
given time if needed. Of course, this feature can be disabled for more “strict” simulation
sessions.
elements:
• An avatar's configuration/posture.
• An abstract mass object – it is defined as a point-mass.
• A specific body part, i.e. bone, to which the mass object will be attached.
Having the above declarations, the dynamics trainer, applies the posture to the avatar
and attaches the mass object to the declared bone. Then it computes the torques
needed for holding this weight stable. The final output of the dynamics trainer is the
computation for all the torque factors f τ (Eq. 1).
C= {c1, c2 ,… , c N } (34)
where C denotes the configuration space containing N configurations ( c ). These
configurations are called “samples”. The sampling process is based on the construction
of randomly generated postures of the avatar. Configurations that contain self-colliding
postures are discarded at the process. Here, it must be mentioned that the “real”
configuration space has an infinite number of avatar configurations and that Eq.34
contains a representative proportion of it.
After loading the scene, each configuration c is tested for collisions with the scene
objects. The whole process is performed by the Collision Avoidance Manager and is
inspected by the Scene and Humanoid modules. Let the boolean function that decides
if the configuration is collision-free denoted by f free . If the configuration is not colliding
with the scene object is flagged as “free3” or “true”, otherwise it is flagged as “closed” or
“false”:
f free {
(c)= 1, if c → collision free
0, otherwise } (35)
3 The adjectives “free” and “closed” are derived from the robotics domain.
Both of the above distances can be computed very fast and are used extensively in the
collision avoidance algorithms.
and manage the C free samples. Let the graph be denoted as: G={V , E } , where the
set V contains the graph nodes and the set E contains the edges/links that connect
its nodes.
After loading the scene, a set of configuration samples is generated by the Collision
Avoidance Manager. At each sample-generation step, the sample is checked for
collisions with the scene. If it is collision-free, the sample is placed as a node into the
graph, otherwise it is discarded. So the set V is actually the free configuration space,
i.e.:
V ≡C free (42)
It is preferable that the V is as dense as possible, i.e. that there are enough samples
occupying the 3d scene space. Otherwise the graph will not be capable of providing
satisfactory results. After lots of tests, a couple of thousand configurations is the golden
rule for a providing satisfactory results regarding a 2x2x2m3 region.
When a sample c is placed into the graph, it is checked whether it can connect with
any of the existing graph nodes. A connection between two nodes, c a and c b ,
declares that the transition c a → cb is possible, i.e. that the avatar can move without
colliding from configuration c a to c b . This check is achieved buy using the f free
function (Eq.35) in conjunction with the motion interpolation described in 3.2.2.2. So,
the link set E is the:
R= {V , E } , where V is the set of tree nodes and E declares their connections set.
Let the avatar's initial configuration c 0 is stored at the tree's root ( c 0 ∈V ) and the
avatar's goal configuration be denoted as c G . Both c 0 and c G must belong to the
C free space, otherwise the algorithm will return error.
At every iteration, the algorithm runs a series of steps in order to expand the tree until
the path c 0 → c G is found. These steps are:
Step 1: Select pseudo-randomly an existing tree node. When there are not any
other nodes except the root c 0 , select c 0 . Let this selected node be denoted
as c expand . The selection of the c expand node is based on some criteria and is
not purely random. The idea is that the c expand candidate most of the times will
be the most distant and isolated of the tree nodes. This will help the tree to
cover most of the C free space very fast.
Step 2: The algorithm will tree to expand the c expand node, by generating another
configuration, c new , that is close to c expand . The generation process adds
random angle deviations to the c expand angles. Instead of the generation of the
c new , every k iterations the c G is used as a c new .
Step 3: Check if the path from c expand to c new configuration exists, i.e.:
c new → c b , their trees can be connected also, and the solution is the
combination of their respective sub-paths, i.e. c 0 → c new and c b → c G .
The method with the two RRT is converging much faster, comparing to the 1-RRT,
because it cannot be trapped easily near the closed/obstacle space C closed . A
schematic representation of the implemented 2-RRT example is presented in Figures
25 and 26.
c0 cG
1 2
3 5 4 6
7 9 8 10
11 13 15 17 12 14 16
19 21 18 20
23 25 27 31 29 22 24 26
28 30
Figure 25: A 2d schematic representation of the 2-RRT method. As it's shown, the first
(in green) tree's root is the start configuration c 0 and second (in orange) tree has as
root the goal configuration c G . The numbers are declare the expansion sequence of
the two trees. It is shown after 31 st iteration, a connection has been found between the
two trees.
c0 cG
1 2
3 5 4 6
7 9 8 10
11 13 15 17 12 14 16
19 21 18 20
23 25 27 31 29 22 24 26
28 30
Figure 26: After the two trees are connected (via nodes 31 & 30), the solution can be
provided. The path is represented as the sequence of the red-circled nodes.
are the collision groups. The collision groups are presented in Table 7.
Collision Group Description Group Can Collide With
Null Used for elements that are Cannot collide with anything
not submitted to collisions.
Floor Used for scene objects that Although can cause collision with
can be used as floor (i.e. avatar body parts and moveable
ramps, stairs). objects, the Floor Group's elements
cannot be moved.
Static Object Used for scene objects that Although can cause collision with
cannot be moved. avatar body parts and moveable
objects, the Static Object Group's
elements cannot be moved.
Moveable Object Used for moveable scene Static Object, Floor, Left/Right
objects. Arm/Hand/Leg/Foot, Head, Torso,
other Moveable objects.
Left Arm Used for left arm (excluding
the hand and fingers)
Right Arm Used for right arm (excluding
the hand and fingers)
Left Hand Used for left hand.
Right Hand Used for right hand.
Left Leg Used for left leg (excluding Moveable Object, Static Object,
the foot). Floor.
Right Leg Used for right leg (excluding
the foot).
Left Foot Used for left foot and toes.
Right Foot Used for right foot and toes.
Torso Used for torso body parts
(includes the pelvis).
Head Used for head and neck.
The user can fully parametrise the dynamic behaviour of the simulation collisions by
enabling or disabling a set of flags that define the properties of the collision groups.
The supported flags are:
• Flag “Null”: no collision.
• Flag “Moveable with Static”: if true, it enables the collision between the
moveable and static objects.
• Flag “Moveable with Moveable”: if true, it enables the collision between the
moveable objects.
• Flag ”Moveable With Floor”: if true, it enables the collision between the
moveable objects and the floor objects.
• Flag “Avatar Self Collision”: if true, it enables the collision between the groups
that part the avatar's body.
• Flag “Avatar with Static”: if true, the avatar can collide to the static objects.
• Flag “Avatar with Moveable”: if true, the avatar can collide to the moveable
objects.
• Flag “Avatar with Floor”: if true, the avatar can collide to the floor.
Several flags (or all) can be enabled simultaneously in order to allow specific collision
behaviour. However, it must be noted that enabling all the flags may lead into
instabilities in level-2 sessions if the scene complexity is very high.
voxel centres. Any connection between the “free” (i.e. floor) and “closed” (i.e.
wall, object, etc.) nodes is not valid and is discarded. A link between two nodes
declares that the avatar's transition, i.e. step, from a voxel to another is
permitted (Figure 27).
After the creation of the floor-graph, the floor will be represented by a set of voxels. A
floor graph example is shown in Figure 28. It must be noted that any graph elements
that are near the walls are label as “closed” by the Gait Module, taking into account the
bounding volume of the avatar. Additionally, the floor graph takes into consideration the
height of the avatar and rejects any floor elements that are too close to the floor below,
e.g. “the ground below the first steps of a set of stairs”.
Figure 28: The floor graph and its the voxels (shown with white boxes). The walls and
any other scene objects that are not masked as “floor”, are represented with red semi-
transparent colour.
After various tests, the best (in terms both of accuracy and efficiency) avatar's
bounding geometry for rejecting the pre-mentioned elements was the capsule.
Bounding boxes suffer from inaccuracies around the corners, while the cylinder
performed poorly in ramps and stairs. More complex bounding volume representation
are not recommended, because the floor graph's creation process would need too
much time. Using the capsule, the graph is generated in less than 0.5 sec for the scene
shown in Figure 28.
The shortest path can be found by applying the A* algorithm to the floor graph. The
solution (whether it exists or not) is provided rapidly. However, because of the scene
segmentation process the result is not satisfying. Thus, a series of post-process steps
are needed to be applied. First, any intermediate path nodes that are not needed are
discarded and then a Catmull-Rom [18] spline is fitted through the remaining nodes
(Figure 29). A path-finding example is shown in Figure 30.
END END
START START
END END
START START
Figure 29: Floor graph path-finding example: initially the voxel that are colliding with
the scene objects are marked as “closed” (top left). Then the path is computed via the
A* algorithm (top right). Any intermediate path elements that are not crucial are
discarded (bottom left). Finally a Catmull-Rom spline is fitted to the remaining elements
(bottom right).
Figure 30: Result of the path-finding algorithm on a complex scene. The walls are
shown in red semitransparent colour. The blue cones represent the locations of the
floor-graph nodes that were used, while the green cone shows the target location. The
final path is represented by a green curve (Catmull-Rom spline).
Figure 31: The average gait cycle. The stance and swing phases for the right leg are
displayed. In normal gait, the stance phase is around the 60% of the gait cycle.
to the Gait Module. The Gait Module, then, coordinates the avatar to walk on the path
that has been computed by the path planning algorithm. The coordination takes into
account the maximum allowable deviation surface from the path and the maximum
allowed turn angle.
if the avatar steps away from the computed path, then a collision with a wall or any
other obstacle may occur. Thus, it is very important that the avatar stays as much
closer to the path. This is achieved by using the following algorithm (Figure 32):
Step 1: Compute the step progress 6-dimensional vector ⃗v p , which symbolises the
transition from the current step to the next, taking into consideration the step
length, the ground deviation. Let:
[]
px
py
[]
⃗p p
⃗v p= = z (45)
vx
⃗v
vy
vz
where the ⃗p , is the current projection of the avatar's centre onto the ground
surface and ⃗ v is the vector that denotes the direction of the next step. The
length of is equal to the respective leg's step of the used gait cycle, i.e.:
∣⃗v p∣=s LR (46)
where the s LR denotes the respective leg's step. The direction v⃗ is computed
in such way, so that the point ⃗p + ⃗v intersects with the path, i.e.
⃗p + ⃗v ∈T (47)
where T denotes the path's curve.
Step 2: Compute the path deviation error. The error is given as the surface
S ( ⃗v p , T ) that is defined by the ⃗v p and the path's curve (Figure 32).
Step 3: If the S ( ⃗v p , T ) , exceeds a predefined threshold, the algorithm returns to
Step 1 and decreases the step length, i.e. Eq. 46 becomes:
∣⃗v p∣=s ' LR=a⋅s LR , a∈(0,1) (48)
Otherwise, the algorithm advances to the computation of the next progress
vector.
The avatar is allowed to turn when walking a path. Extreme turns must be avoided
because they lead into unnatural gait simulation. The Gait Module has a maximum
allowable turn angle threshold, above which it decreases the next step's length in order
to decrease the turn's angle (Figure 33). The algorithm is similar to the one mentioned
previously, but in Step 3: it checks if the angle threshold has been exceeded.
⃗v 2 ⃗v 3
S2 S3
⃗v 2
S1 S1 S2
⃗v 1
⃗v 1
Figure 32: Path deviation error comprehension. The path to be followed is symbolised
v x ) are the step-progress vectors. The yellow
by a green curve, while the red arrows ( ⃗
areas (Sx) denote the deviation from the path. If the error exceeds the threshold (left
image), the progress steps are decreased (right image) in order to decrease the
avatar's deviation from the path.
θ 1,2
θ 1,2
⃗v 2 θ 2,3
⃗v 1 ⃗v 2 ⃗v 1 ⃗v 3
Figure 33: Turn angle comprehension. If the turn angle is too sharp (left image), the
next step is decreased (right image).
After the computation of the next step-progress vector, the Gait Module requests from
the gait cycle the avatar configurations and transforms them accordingly. Then the
configurations are passed to the Motion Manager and the avatar moves. The Gait
Module stops the avatar movement when it has reached the path's end or when the
gait-task has failed. Here it must be mentioned that the Gait Module in its current form
does not support gait generation based on dynamics. However, the dynamics metrics
can be still approximated by using the kinematics. Two examples of the Gait Module
data sequences are shown in Figures 34 and 35.
Figure 34: Gait sequence generated by the Gait Module. For better representation
reasons only the lower half skeleton is presented (red). The spline path (green) is
computed based on the floor-graph path (yellow). The step-progress vectors are
shown in white. The steps are decreased for abrupt turns.
Figure 35: Gait sequence generated for a user model with decreased step length.
Figure 36: Grasp Module surface points generation. Initially, a point of interest (yellow
box) and a sphere (yellow transparent colour) must be defined. Then by applying ray
casting various target points are generated.
Each of the generated points is going to be used as a target of the avatar's palm. By
applying inverse kinematics the Grasp Module generates various arm configurations.
The grasp planner check for hand-object penetration and discards the configuration
that are not valid. From the remaining configurations, it chooses the best one, based on
the following criteria:
• the palm's placement: arm configurations where the palm's centre is closer to
the sphere's centre are preferable.
• hand orientation: configurations having orientations that are enfolding the object
are preferred.
• finger collisions: grasp configurations that result into many finger collisions with
the object's surface are favored over the ones that do not.
Figure 37: The Grasp Module generates various configurations (left). Some of them
are not valid and are rejected (middle). From the remaining, one is chosen based on
criteria, such as number of collisions, hand placement, etc..
head motions. Several restrictions are applied in the computation of each joint rotation.
The parameters that define this behaviour are:
• maximum allowable head and neck joint angular velocity,
• maximum allowable eyeball angular velocity,
• respect to the range of motion of the head and neck degrees of freedom.
Figure 38: Head and eye coordination. The LookAt Module target has been “locked”
on the purple box. The avatar's line of sight is represented by two green intersecting
lines.
As it is shown in Figure 38, the LookAt Module uses two lines for informing the user of
the avatar-target line of sight. The line of sight is updated at each simulation step. If the
avatar's target is out of the line of sight the lines change their colour from green into
red.
Figure 39: Normal vision, full-colour Figure 40: Protanopia, results in red-
palette. green colour-blindness.
Figure 45: Demonstration of the glare sensitivity symptom simulation: compared to the
normal vision case (left image), areas near bright colours and lights have lost their
contours (right image).
The vision impairment simulation is based on image filters. The filters are applied on
the input frame stored in the Vision Model's buffer. Many filters can be combined in
order to simulate a set of symptoms. Both global and per-pixel filters have been
developed for this purpose. Global filters are used for the generation of the glaucoma,
macular degeneration and glare sensitivity symptoms, while the per-pixel filters are
used for the simulation of protanopia, deuteranopia, tritanopia and their less severe
variations, i.e. protanomaly, deuteranomaly and tritanomaly. The Vision Model filtering
is performed using OpenCV functions.
the audiogram of the avatar. Using the audiogram, the hearing model generates the
audio filter and applies it on all input sounds.
Using the above method, several audio impairment symptoms can be simulated, such
as otitis [29], otosclerosis [30], noise induced hearing loss, presbycusis [31] etc. Audio
impairment audiograms are presented in Figures 46 to 53.
Figure 46: Otitis, only middle frequency Figure 47: Otosclerosis, hearing loss of
bands are retained. low frequency bands.
Figure 48: Presbycusis, mild hearing loss. Figure 49: Presbycusis, moderate hearing
loss.
Figure 50: Noise induced hearing loss of Figure 51: Noise induced hearing loss of
high frequency bands (mild case). high frequency bands (severe case).
Figure 52: Profound hearing loss with Figure 53: Hearing loss of low frequency
residual low frequency hearing. bands, rising configuration.
• In-action delay factor: the in-action delay factor is applied while the avatar is in
motion. The target time is increased by this factor, and the whole process takes
longer. This is achieved by increasing the interpolating duration between the
key-postures.
By applying the pre-action and in-action delay factors, the final task time is given by
Eq.49:
t task =t pre + f i n⋅t target , f i n≥1.0 (49)
where t task is the resulted duration of the action, t pre is the pre-action delay, f i n is
the in-action delay factor, and t target is the target time duration. Both t pre and f i n are
given as pre-computed parameters to the cognition module.
In most cases the simulated object represents only a part of its real-life object. Thus,
several objects must be defined in order to create the virtual representation of a real-
life object. This is achieved by connecting several primitive objects and creating
“chains” of objects which are called “DoF-Chains”. The DoF-Chains are analysed in
Subsection 4.3.
object.
• At least one DoF element must be declared. However, there is no restriction in
the maximum number of the DoF-elements that will be used. It must be noted,
though, that more than three degrees of freedom may lead to indefinite system
behaviour.
moveable
moveable
DoF DoF DoF or static
object
object
or
rotational translational
Figure 54: A simple DoF-Chain consists of two elements: the start element (elem.1)
which must be always a moveable object and the end element (elem.n) which can be
either moveable or static. Several degrees of freedom elements (elem. 2 ~ n-1) can be
used in between to connect the two objects. Each degree of freedom can be either
rotational or translational.
There are two kinds of DoF elements, that can be used for connecting the two objects:
rotational DoF and translational DoF. A rotational DoF allows the objects to rotate
around a specific axis, while the translational DoF allows them to move on a specific
direction. Several rotational and translational DoF elements can be combined in order
to allow complex movements.
Each DoF element, depending on its nature (rotational or translational) has a number
of special attributes. A translational DoF has the following attributes:
• axis of translation: defined by a 3d vector. The translation between the two
objects is parallel to this axis.
• range of motion: defined by the minimum and maximum translation between the
two objects. The two objects are allowed to move only inside these limits.
• spring attributes: defined by a desired relative linear velocity between the
objects and the maximum force that can be applied in order to achieve it. The
spring attributes can be used to emulate springs or motor behaviours. The
spring force and velocity direction is always parallel to the the axis of
translation.
The rotational DoF has the following attributes:
• axis of rotation: defined by a 3d vector an a 3d point.
• range of motion: defined by the minimum and maximum angles of rotation. The
zero angle is the angle that the two objects have in their initial states.
• spring attributes: same as in the translational DoF. However the velocity here is
angular and it is achieved by the application of torque (instead of force).
moveable moveable
DoF DoF DoF DoF
object object
moveable moveable
object object
DoF DoF
DoF DoF
static
object
Figure 55: Two or more DoF-Chains can be connected in order to allow complex object
functionality. Here a complex object consisted of five primitive objects is presented.
This complex object is consisted of four moving parts and one static part.
The Scene Module allows the connection between two or more DoF-Chains, to allow
the creation of complex virtual objects, i.e. objects with more than one moving parts
(Figure 55). One such example is shown in Figure 56. In this example a car's storage
compartment has been created. The compartment is consisted of three primitive
objects: the dashboard (static), the compartment's door (moveable) and its handle
(moveable). The objects are connected via two rotational DoF-Chains: one connecting
the door to the dashboard and one connecting the handle to its door.
The Scene Module allows the assignment of more than one DoF-Chains to the same
pair of objects. In these cases, however, only one DoF-Chain can be active – the
others are deactivated automatically be the Scene Module. This activation/deactivation
function can be used in order to simulate objects that change their DoF characteristics.
pool of the DoF-Chains. Several configurations can be defined by the user (via the
Interaction Adaptor) in order to define special states of an object.
The object configurations are used by the Task Manager in order to check the state of
the current task or as target object configuration for specific sub-tasks. For example,
concerning the storage compartment of Figure 56, three states, i.e. three configurations
can be declared: a) the initial configuration b) one with the handle fully open and c) one
with the door open. These three configurations can be given as an input to the Task
Manager in order to coordinate the avatar to open the storage compartment.
scene rule condition types, along with their data and parameters, are presented in
Table 8.
Scene-Rule Condition Param. A Param. B Param. 1 Description
DofValueBiggerThanParam1
Compares the DoF-
DofValueSmallerThanParam1 specific
4 element's current
DoF-Chain DoF-index angle or
DofValueBiggerOrEq.alToParam1 value to the
distance.
Param.1.
DofValueSmallerOrEq.alToParam1
DofChainIsActive Checks if the DoF-
DoF-Chain - - Chain is active or
DofChainIsNotActive not.
Dummy condition –
used at the
AlwaysTrue - - -
initialisation of
scene.
Table 8: The supported scene rule conditions. Each condition element, besides its
type, may need some extra data parameters to be defined (Param. A/B/1).
Concerning the scene rule result element, they can be one of the following categories:
• results that activate or deactivate DoF-Chains,
• results that enable or disable the collision between objects,
• results that change the attributes of the DoF-Chains.
The supported result elements along with their parameters are displayed in Table 9.
Scene-Rule Result Param. A Param. B Param. 1 Description
DofChainActivate Enables or disables
DoF-Chain - -
DofChainDeactivate the DoF-Chain.
MoveableCannotCollideWith moveable Prevents collision
-
Moveable object between the two
moveable
elements – useful for
MoveableCannotCollideWith object
static object - objects which have
Static too coarse geometry.
new range
DofSetParam_rangeMin
minimum
new range Changes the
DofSetParam_rangeMax
maximum attribute of the
DoF-Chain DoF-index new specified DoF
DofSetParam_fResist resistance element with the one
force/torque declared in Param.1.
new desired
DofSetParam_velocSpring
velocity
4 The DoF index denotes the identification of a specific DoF element inside its parent chain.
Using the pre-mentioned scene rule conditions and results, special object
functionalities like the one of the storage compartment in Figure 56 can be defined. In
this example, a scene rule needs to be created having one condition that checks the
state of the “handle → door” DoF-Chain. If the rotational DoF exceeds the predefined
angle parameter then the “dashboard → door” DoF-Chain increases its maximum
angle limit in order to let the door open.
5 Task Simulation
The whole simulation process is supervised by a sophisticated task management
system that is described in this section. The task structures, their internal organisation
and the overall management are supervised by the Task Manager Module which is
going to be analysed in the following sub-sections.
Task A
An example of a tree structure is shown in Figure 57. In this example, the Task A is the
root task. It has three children tasks: Task B, C, D. The Task B is further analysed into
two sub-tasks (B.1 and B.2). Task D has also two sub-tasks (D.1 and D.2). The
1. Task A
2. Task B
3. Task B.1
4. Task B.2
5. Task B: if both B.1 and B.2 where successful, then B is also successful.
6. Task C
7. Task D
8. Task D.1
9. Task D.2: if D.2 is successful the flag
10. Task D: if both D.1 and D.2 where successful, the D is also successful.
11. Task A: if both B, C, D were successful, then Task A is also successful and the
scenario has been performed successfully by the avatar.
• “TaskNotStarted”: true, if the rule's parent task has not started yet. Condition is
false if task has already failed or completed successfully.
• “TimeSinceRuleStarted_GreaterThan”: true, if the time since the specified rule
has started is greater than the seconds declared.
• “TimeSinceTaskStarted_GreaterThan”: true, if the time passed since the parent
task has started, is greater than the seconds declared.
• “TimesRuleHasBeenCalled”: true, if the number of times that the specified rule
has been called is equal to the integer declared in the condition. This type is
very useful when needing to call a rule only once (the integer equals to zero).
• “TimesRuleHasBeenCalled_GreaterThan”: same as the previous type, but now
the condition becomes true only when the number of times exceeds the
declared threshold.
• “TimesTaskHasBeenCalled_GreaterThan”: same manner as the previous type,
but now it counts the times the parent task has been called.
• “DistanceAverage_EndEffectorsFromPoiSet_GreaterThan”: this condition
checks if the average distance of the end effectors of an ik-chain to the
specified object PoI-set is greater than the meters defined. The current ik-chain
data are applied to the humanoid joints and then, the distance from the PoI-set
is computed. The rule expects that the ik-effector names and the poi names are
matched 1-1, i.e. they have the same set of names. This type of condition is
usually used to declare a task as failed.
• “DistanceAverage_EndEffectorsFromPoiSet_LessThan”: same as previous, but
now the condition becomes true if the distance is lower than the one specified.
This type of condition is usually used to declare a task as successful.
• “RuleStateIs”: checks if the rule's state is equal to the defined state (NotStarted,
Running, Succeeded, Failed).
• “DistanceAll_CurrentAnglesToSpecificPose_LessThan”: checks if the
hunamoid's current pose is close enough to a predefined one. It checks every
angle of the predefined pose and if the maximum difference is less than a
threshold, returns true.
• “DistanceAll_CurrentAnglesToSpecific_GreaterThan”: same as the previous
type, but now returns true if the maximum difference is greater than the
predefined.
• “OnLoadScenario”: this condition becomes true when the scenario model file is
loaded. In order for this to work correctly, the parent task must be the root task.
• “DofValue_GreaterThan”: true, if the specified degree of freedom of a scene
DoF-chain, has a current value greater than the defined threshold (meters or
degrees, depending on the nature of the DoF).
• “DofValue_LessThan”: opposite manner of the previous.
• “HumanoidIsFree”: returns true, if the humanoid has not any action to perform.
All the above condition types can be used either in kinematic1 (level-1) and dynamic
(level-2) simulations. However, when the level-0 simulation is selected, some of these
types cannot be applied. Level-0 simulation tasks are supported by the following
condition types:
• “L0_PassAsTrue”: Always true condition. Used for passing to the next task
without making any comparisons.
• “L0_ComparePoseValid”: Compares the joint capabilities of the current user
model to a predefined pose and returns true if the pose is feasible.
• “L0_ComparePoseInvalid”: Compares the joint capabilities of the current user
model to a predefined pose and returns true if the pose is not feasible.
5 A rule that contains a “SetTaskState” element that succeeds is called a “success rule”, while
a rule that contains a “SetTaskState” element that fails is called a “failure rule”.
Task:
Reach storage compartment's handle with right hand
Task Rule 1
Condition set:
a. Number of times "Task Rule 1" called = 0 Action Rule:
("TimesRuleHasBeenCalled") results in action.
Result set:
a. Move right hand to handle in dt secs max.
("MoveEndEffectorsToPoiSet")
Task Rule 2
Condition set:
a. Time since current task started > dt secs
("TimeSinceTaskStarted_GreaterThan") Success Rule:
results in a
b. Distance of right hand to handle ≤ 0.01m. successful task.
("DistanceAverage_EndEffectorsFromPoiSet_LessThan")
Result set:
a. Set current task state = succeeded
("SetTaskState")
Task Rule 3
Condition set:
a. Time since current task started > dt secs
("TimeSinceTaskStarted_GreaterThan") Failure Rule:
results in a
b. Distance of right hand to handle > 0.01m. failed task.
("DistanceAverage_EndEffectorsFromPoiSet_GreaterThan")
Result set:
a. Set current task state = failed
("SetTaskState")
Figure 58: Simple task example. The task contains three rules. One results in action
and the other two are used for success and failure checks.
6 Accessibility Assessment
This section contains information about the metrics and the human factors that are
used by the core simulation platform in order to perform the product's accessibility
assessment. Two example cases are also presented, one regarding the automotive
area and one that concerns the workplace area.
simulations.
• Anthropometry factors: measures how comfortable the avatar postures are
during the simulation.
The physical and anthropometry factors are, in fact, human factors. Human factors can
provide to the end user important accessibility assessment criteria. Moreover, the
human factors move on step further and can be used to evaluate the ergonomics of the
virtual products.
6.1.1.1 Success-Failure
The task result, i.e. success or failure, is the minimum information required for the
accessibility assessment of the tested product. Additional Information comes with the
failure result, .e.g. the distance of the hand to the target when the reach task has failed.
6.1.2.1 Torque
When a body part is moved, or more precisely rotated, torques are generated by the
musculoskeletal system. These torques, which are 3-dimensional vectors can be easily
measured at each humanoid joint. The joint's net torque is given by:
τ⃗ net =I α⃗ (50)
where I is the moment of inertia and ⃗ a is the angular acceleration of the rotated
body part. This means that when a user motor task needs to be completed very fast,
requires higher body acceleration, which results in higher torques. Beside this, if the
body part is interacting with an object, extra torque is needed in order to cope with the
object's added moment of inertia. Thus, this τ⃗ net could be used as a factor measuring
strength.
However, there are some things to be reconsidered: every body joint generates forces,
besides torques, which are trying to keep its body parts connected. Higher forces mean
that the body is stressed or pressured, which results in discomfort. So, it is wise to take
into account these forces too. These forces can be converted into torques:
⃗
τ⃗ force=⃗r × F (51)
where ⃗r is the vector from the joint's centre to the body part's centre of mass and ×
denotes the cross product. Thus, the final joint torque that is generated in a time instant
is now given by:
τ⃗ (t)=⃗ ⃗ (t)
τ net (t)+ τ⃗ force (t)= I ⃗a (t)+ ⃗r (t )× F (52)
By computing each joint torque and averaging it through time, a measure of “how
strength demanding is a human task'' can be constructed. This, mean torque factor, is
given by:
n
1
τ mean= ∑∣τ⃗ (t)∣
n t=1
(53)
where n is the number of time frames passed from the task's start, and τ⃗ (t) is the
torque generated by the joint at the time t . At this point, it must be mentioned that all
simulation time steps are considered equal.
an estimation of the total chemical energy consumed by the joint and its body parts can
be made.
where m is the total number of the joint's DoF. The can be normalized to the interval
by using the following equation:
m
2 ∑ C d ( t)
d =1
C (t)= m (61)
∑ (θ d ,max −θ d , min )
d =1
Values near unit are considered more “comfortable” than values near zero. The C (t)
factor changes only when the joint rotates. By taking the average of these C (t) over
time, the “RoM Comfort Factor” can be derived by:
n
1
C= ∑ C (t)
n t=1
(62)
By computing Eq.61, 62, an estimation of the humanoid's overall posture comfort can
be given for a specific task.
( )
n
1 ( 1−C (t) )∣⃗
τ (t)∣
Cτ =1− ∑ (64)
n t =1 τ max∣
∣⃗
where τ⃗ max is the joint torque with the maximum magnitude that has been recorded in
the task. It is worthy to mention that the factor Cτ is already normalized to the interval
[0,1] . The Cτ will be referred as the “RoM-Torque” comfort factor and will be used to
evaluate the overall body posture comfort considering the dynamics demands of the
task.
6.2 Experiments
The factors that are presented in 6.1 were applied into two different realistic scenarios:
one coming from the automotive area and one considering a typical workplace. In each
scenario two different designs were tested. A common car interior was evaluated in the
first scenario, while in the second a common workplace design was examined.
In each scenario, the human factors were computed for five different virtual user
models:
• fully capable user: normal values of RoM in all body joints, full strength
capabilities.
• elderly user (aged 60~84), decreased strength capabilities, mild decrease of
RoM in several body joints.
• user with spinal cord injury: heavy decrease of shoulder's RoM.
• user with rheumatoid arthritis: severe decrease of shoulder's RoM.
6.2.1 Automotive
The automotive scenario included the design of the storage compartment in a common
car interior. The scenario contained three subtasks: a) locate the storage compartment,
b) reach it with the right hand's index finger and c) open it. The accessibility of two
different storage compartments was evaluated. The compartment tested first, had a
handle, which must be pulled (Figure 59). The second did not include any handle and
in order to open it, the user had to simply push it (Figure 60). The compartment's
resistance torque in both cases was the same, around 5⋅10−4 Nm .
Figure 59: Automotive scenario, testing a storage compartment with handle. The
compartment's door opens when the handle is rotated/pulled enough degrees. The
green lines indicated the avatar's line of sight and the yellow arrow indicates the
current subtask's target.
Figure 60: Automotive scenario, testing a storage compartment that can be opened by
pushing its door.
All users, except the one having rheumatoid arthritis, were capable of running
successfully all the tasks. The user with rheumatoid arthritis due to his/her heavy
restriction of the shoulder RoM could not reach the compartment. So, this user's seated
location was moved a little bit towards the storage compartment, until it was within
his/her reach.
Each subject was given a target time of 2sec to complete each task. However, this time
amount could change, depending on the different user model capabilities and the
loaded scene setup. Each test was repeated ten times in order to eliminate the inverse
kinematics and motion planning randomness. For the motion planning the RRT
(3.3.1.4) method was used.
The results are shown in Figures 61 to 66 and indicate that the design of the
compartment with the pushable door is more accessible than the one with the handle. A
detailed discussion about the results can be found in [32].
Figure 61: Summed time durations for all the automotive task repetitions
(in sec). Each duration refers to ten repetitions of the same task sequence.
Figure 62: The mean torques (Eq.53) at six body locations for the automotive scenario.
All values are in Nm.
Figure 63: The automotive task's angular impulses (Eq. 54). Values in Nm⋅sec . It is
worthy to mention that the inclusion of the time component into the torque
discriminates better the two designs.
Figure 64: The total estimated energy consumed (Eq.58), by each body region for the
automotive scenario. Values declared in Joules.
Figure 65: The RoM Comfort factor (Eq.62) distributions for the automotive tasks.
Higher values are indicating more comfortable situations for the examined body region.
Figure 66: The RoM-Torque Comfort factor (Eq.64) distributions for the automotive
tasks. Values near the unit indicating more comfortable and less torque demanding
body postures.
6.2.2 Workplace
In the workplace scenario, an office desk was the evaluated product. Two different
designs were tested: one having its drawer above the desk's table and one having it
below (Figure 67). The task sequence contained three subtasks: a) reach the drawer,
b) grab its handle and c) pull it. The users' left hand was used. The task was
considered to be successful when the drawer was opened at least 15cm. The drawer
weight was set at 300gr and its resistance force was very small, at 0.01N.
Figure 67: Workplace scenario, two different office designs: one having the drawer
above its table (left image), and one having it below (right image).
Figure 68: Summed durations for all the workplace task repetitions (in
sec). Each duration refers to ten repetitions of the same task
sequence.
Each task sequence was repeated ten times in order to avoid the randomness of the
motion planning algorithms. The target time duration that was given to each user model
was 3.5sec per repetition. All user models were capable of performing all subtasks. The
results are shown in Figures 68 to 73. As it is shown, overall, the drawer below the
office has been proven more accessible than the one above, both in terms of strength
and comfort requirements. A more detailed report can be found in [32].
Figure 69: The mean torques (Eq.53) at six body locations for the workplace scenario.
Values are in Nm.
Figure 70: The workplace task's angular impulses (Eq. 54). Values in Values in
Nm⋅sec .
Figure 71: The total estimated consumed energy (Eq.58) by each body region for
performing the workplace tasks. Values in Joules.
Figure 72: The RoM Comfort factor (Eq.62) distributions for the workplace tasks.
Higher values are indicating more comfortable situations for the examined body region.
Figure 73: The RoM-torque comfort factor (Eq.64) distributions for the workplace tasks.
Values near the unit indicating more comfortable and less torque demanding body
postures.
6.2.3 Verdict
The experiments indicated that only the consideration of task durations and success-
failure result, cannot discriminate the product design among different user populations.
Accessibility assessment can be improved when measuring special physical and
anthropometric factors. The integration of these factors into the VERITAS Core
Simulation Platform increases the fidelity of the accessibility results and helps the end-
user to find the population response to the designed product.
Future Work
In its current state, the Core Simulation Platform supports a lot of humanoid and
environment simulation algorithms. However, there are things are missing and are
needed, in order to achieve a complete simulation framework. This lack of features is
going to be filled by the work that will be implemented as part of the Veritas D2.1.4.
The Core Simulation Platform is able to perform simulations of 3D environments.
However, there is the need of performing accessibility assessment for graphical user
interfaces (GUI), which in most of the cases are 2D. The Vision Model filters can be
easily applied into 2D surfaces and there is no need for changes to the Hearing Model.
However, several of the motor related modules need to be reinforced with the
implementation of their 2D counterpart algorithms.
Concerning the cognitive support, currently it is simulated by applying delay factors in
the various humanoid actions. This behaviour can be supported with extra cognition
factors related to context awareness aspects.
Regarding the motor simulation, the gait module needs to gain fully dynamic
functionality, as currently is based on reproduction of gait cycles. Moreover, the
implementation of a Sitting Module would provide the necessary feedback of actions
related to sitting and standing up.
Testing the same virtual product for many different Virtual User Models, requires now
many user actions, parsing different user models. The need of supporting an automatic
loading (in a cascade manner) the various VUM would result in a great decrease of the
evaluation process.
Finally, the various session data that are gathered by the Simulation Module, must
somehow be presented via a graph statistics to the user. This will help to the
accessibility assessment process of the virtual product very much.
References
[1] OpenCV, Open Source Computer Vision, http://opencv.willowgarage.com/wiki/
[2] OpenAL, http://connect.creativelabs.com/openal/default.aspx
[3] CogTool, http://cogtool.hcii.cs.cmu.edu/research/research-publications
[4] OGRE, Open Source 3D Graphics Engine, http://www.ogre3d.org/
[5] OpenSceneGraph, Open source high performance 3D graphics toolkit,
http://www.openscenegraph.org/projects/osg
[6] Delta3D, Open Source Game and Simulation Engine, http://www.delta3d.org/
[7] ODE, Open Dynamics Engine, http://www.ode.org/
[8] CAL3D, 3D Character Animation Library, http://gna.org/projects/cal3d/
[9] Marcelo Kallmann, Analytical inverse kinematics with body posture control, 2008
[10] Roy Featherstone, Rigid Body Dynamics Algorithms,
[11] Bruno Siciliano, Oussama Khatib, Springer Handbook of Robotics, 2008
[12] Thomas H. Cormen, Charles E. Leiserson, Ronald L. Rivest, Clifford Stein,
Introduction to Algorithms, 2009
[13] Steven M. Lavalle and James J. Kuffner and Jr., Rapidly-Exploring Random
Trees: Progress and Prospects, Algorithmic and Computational Robotics: New
Directions, 2000, pg 293--308.
[14] Harold C. Sun and Dimitris N. Metaxas. 2001. Automating gait generation. In
Proceedings of the 28th annual conference on Computer graphics and interactive
techniques (SIGGRAPH '01). ACM, New York, NY, USA, 261-270.
[15] KangKang Yin, Kevin Loken, and Michiel van de Panne. 2007. SIMBICON: simple
biped locomotion control. ACM Trans. Graph. 26, 3, Article 105 (July 2007).
[16] Xiaoyue Guo, Shibiao Xu, Wujun Che, and Xiaopeng Zhang. 2010. Automatic
motion generation based on path editing from motion capture data. In
Transactions on edutainment IV, Lecture Notes In Computer Science, Vol. 6250.
Springer-Verlag, Berlin, Heidelberg 91-104.
[17] P.E. Hart, N.J. Nilsson, B. Raphael, A Formal Basis for the Heuristic
Determination of Minimum Cost Paths, 1968
[18] Catmull, E., and Rom, R. A class of local interpolating splines. In Computer Aided
GeometricDesign, R. E. Barnhill and R. F. Reisenfeld, Eds. Academic Press, New
York, 1974, pp. 317–326.
[19] Jacquelin Perry, Gait Analysis: Normal and Pathological Function, 1992
[20] Riener R, Rabuffetti M, Frigo C: Stair ascent and descent at different
inclinations.Gait & Posture 2002, 15:32-44.
[21] Anastasia Protopapadaki, Wendy I. Drechsler, Mary C. Cramp, Fiona J. Coutts,
Oona M. Scott, Hip, knee, ankle kinematics and kinetics during stair ascent and
descent in healthy young individuals, Clinical Biomechanics, Volume 22, Issue 2,
February 2007, Pages 203-210, ISSN 0268-0033,
10.1016/j.clinbiomech.2006.09.010.
[22] Berenson, D.; Diankov, R.; Nishiwaki, K.; Kagami, S.; Kuffner, J.; , "Grasp
planning in complex scenes," Humanoid Robots, 2007 7th IEEE-RAS
International Conference on , vol., no., pp.42-48, Nov. 29 2007-Dec. 1 2007
[23] Kaiser, Peter K.; Boynton, R.M. (1996). Human Color Vision (2nd ed.).
Washington, DC: Optical Society of America. ISBN 1-55752-461-0.
[24] McIntyre, Donald (2002). Colour Blindness: Causes and Effects. UK: Dalton
Publishing. ISBN 0-9541886-0-8.
[25] Merck Manual Home Edition, "Glaucoma". Merck.com,
http://www.merckmanuals.com/home/eye_disorders/glaucoma/glaucoma.html
[26] Bradley, D T; Zipfel, P F; Hughes, A E (2011). "Complement in age-related
macular degeneration: a focus on function". Eye 25 (6): 683–693.
[27] David A. Quillen, Common Causes of Vision Loss in Elderly Patients,
Pennsylvania State University College of Medicine, Hershey, PennsylvaniaAm
Fam Physician. 1999 Jul 1; 60 (1): 99-108.
[28] Audiogram, http://en.wikipedia.org/wiki/Audiogram
[29] Neff M.J. (June 2004). "AAP, AAFP, AAO-HNS release guideline on diagnosis and
management of otitis media with effusion". Am Fam Physician 69 (12): 2929–31.
[30] House J.W., Cunningham C.D. III. Otosclerosis. In: Cummings CW, Flint PW,
Haughey BH, et al, eds. Otolaryngology: Head & Neck Surgery. 5th ed.
Philadelphia, Pa: Mosby Elsevier; 2010:chap 144.
[31] D.W. Robinson and G.J. Sutton "Age effect in hearing - a comparative analysis of
published threshold data." Audiology 1979; 18(4): 320-334.
[32] P. Moschonas, N. Kaklanis, and D. Tzovaras. 2011. Novel human factors for
ergonomy evaluation in virtual environments using virtual user models. In
Proceedings of the 10th International Conference on Virtual Reality Continuum
and Its Applications in Industry (VRCAI '11). ACM, New York, NY, USA, 31-40.