Building Objects and Interactors for Collaborative Interactions with GASP Thierry Duval and David...
-
Upload
martha-bradley -
Category
Documents
-
view
215 -
download
0
Transcript of Building Objects and Interactors for Collaborative Interactions with GASP Thierry Duval and David...
Building Objects and Interactors for Collaborative Interactions with
GASP
Thierry Duval and David Margery
IRISA - Siames
Our Background
GASP : overview
An abstract Object Oriented frameworkObjects in GASP = simulation objects
Its implementation is C++ based
A run-time platform which deals with :Network programming3D visualization3D interactions
Our Specifics :GASP is not user-centered
Collaboration could also happen with or affect autonomous agents
The number of workstations involved is not limited to the number of users
Because of autonomous agents, a common notion of time has to be maintained across all workstationsTimestamps are the basis of our consistence
mechanism
Outline
A short presentation of GASP
How does GASP deal with distribution issues
How GASP enables shared interactions within 3D virtual environments
Conclusion and ongoing work
Framework - Overview
An object in GASP is publicly seen as:A number of public data fields we call outputsA frequency at which its behavior must be
calculated
And privately it also has:A number of private data fields called inputsA calculation object holding all the necessary data
and member functions (especially calculate) for the calculation of its behavior
FC2:FollowerCalculFC1:FollowerCalcul
Framework - Calculation Objects
Manage the creation and connection of the inputs of their simulation object
Read the inputs of their simulation object
Calculate and produce the outputs of their simulation object
position
F1:FollowerFollowed position position
F2:FollowerFollowed position
Framework - Frequencies
Each simulation object has its own frequencyThe connection between input and outputs is an
abstract one for the programmer Interpolation or extrapolation is fundamental to the
frameworkWhether the connection is local or uses a network
is of no importance when the entity is written
FC2:FollowerCalculFC1:FollowerCalcul
position
F1:Followerposition
F2:FollowerFollowed position 50hz25hzFollowed position
GASP’s Distributed Run-Time Platform
CommunicationHow is the data connection between simulation
objects implemented ?
SynchronizationHow is the notion of time kept meaningful across a
network of workstations ?
ConsistencyHow is the virtual environment kept coherent ?
Distribution - Communications
FC2:FollowerCalcul
FC1:FollowerCalcul
position
F1:FollowerFollowed position
position
F2:FollowerFollowed position 50hz
25hz
Process A
Process B
position
F1:Follower(Mirror)
Distribution - Synchronization
Algorithm (parameterized by latency)Proceed to simulation step of date T if all the
update data of simulation step of date T-dt-latency from the other controllers is available (dt is the simulated time spent during one simulation step)
Send update values and repeatFast controllers have to wait for slower ones
Simulation step T takes place while update values of T - dt transit through the networkControllers do not have to wait for update values
Distribution - Consistency
Extrapolation avoids waiting for exact valuesGood approximations are available for date T And for date T - dt if needed depending on latency
Timestamp of update values is in the past Values used locally are still extrapolated, but from
a more exact baseNo disruption in the nature of the signal : no
artifacts are introduced with this methodBut, a constant delay (latency) is introduced in the
propagation of signal changes
Sharing 3D Virtual Environments
Simulation objects can have 3D representations
The visualization of the virtual environment and its contained objects is also a simulation object
We can use several visualization simulation objectsDistributed on several workstations using the
GASP run-time kernel, thus sharing VEs
Interacting within VEs
By using « Interactors » simulation objectsEntities that provide outputs for interaction2 kinds: Low-Level and Advanced Interactors
These interactors act upon interactive objectsExisting entities ready for interactionSpecialized entities that have been made interactive
using inheritance
The Interactors
Low-Level Interactors (Drivers)Used for hardware device encapsulationProvide Raw data
Advanced InteractorsBuilt upon Low-Level Interactors Provide Higher-level data
Low-Level Interactors
A “Driver” is a simulation object:Typically with no inputsThe calculation part deals with the hardwareWhich provides raw outputs such as:
• any DoF (3D positions, 3D orientations, …)• any meaningful output (blood pressure, …)
A Led-Tracker Driver
Tracks 4 LEDs (for the example)
Gets these 3D positions from a serial link to the physical device tracking the LEDs
Provides the 3D positional outputs of the LEDs
Calculation (RS 232)
position1
position2
position3
position4
LED Driver
Using the Led-Tracker Driver
To drive some geometrical components ...
Calculation (RS 232)
position1
position2
position3
position4
LED Driver
CC1:CornerCalculation
positionC1:Corner
CC2:CornerCalculation
positionC2:Corner
CC3:CornerCalculation
positionC3:Corner
CC4:CornerCalculation
positionC4:Cornerposition
position
position
position
Using the Led-Tracker Driver
Advanced Interactors
Are pure software
Make a higher-level software interpretation of the drivers outputs
Are able to send messages to interactive objects:To take control of them …To release them ...
A 3D LEDs-Based InteractorCalculation (RS 232)
position1
position2
position3
position4
LED Driver
CC1:CornerCalculation
positionC1:Corner
CC8:CornerCalculation
positionC8:Corner
3D Mouse Calculation
positionD1
positionD2
positionC1
positionC2
3D Mouse
positionC3
positionC4
positionC6
positionC5
positionC8
positionC7
position
...
message for control taking proposal
Grouping the LEDs
Analysis of the positions
CC8:CornerCalculationCCC8:ControlledCornerCalculation
A 3D LEDs-Based InteractorCalculation (RS 232)
position1
position2
position3
position4
LED Driver
CC1:CornerCalculation
positionC1:Corner
positionC8:Corner
3D Mouse Calculation
positionD1
positionD2
positionC1
positionC2
3D Mouse
positionC3
positionC4
positionC6
positionC5
positionC8
positionC7
position
...
position
Using the 3D Mouse (1/3)
Using the 3D Mouse (2/3)
Using the 3D Mouse (3/3)
Sharing interaction
The visualization objects also provide interactors for keyboard and mouse
We share interaction:Each user can act upon a different object of the
environmentSeveral users can act upon the same shared
object• if the interactive object is able to handle multiple
interactors…
Building Interactive Objects (1/2)
From scratch It is the hard way to do this ...
Providing Interactive classes to inherit fromWhat about already existing simulation objects ?
Modifying existing simulation objectsWhat about software engineering point of view ?
Inheriting manually from existing objectsQuite cumbersome but possible ...
Building Interactive Objects (2/2)
Parameterized inheritance: the best solution !C++ template inheritanceAllows effective code reuse
Template interactive classes (adapters) with 2 parameters :Ready to inherit from the first parameter classAble to create a new calculation object inheriting
from the second parameter class
The “MouseFollower” adapter
Is able to force the position of a simulation object to the one of the Mouse
Knows how to handle the “asking for interaction” message
class Corner ; class CornerCalculation ;
template <class InitialObject, class initialCalculation>class MouseFollower : public initialObject { …}
MouseFollower <Corner, CornerCalculation> anInteractiveObj ;
The “MouseFollowerCalculation”
Inherits from the calculation it has to replace
Redefines the effective calculation:Calls the inherited calculation (position and
orientation for example)Enforces the position of the object to the proposed
positionThus, allows the orientation to be up to date...
Example of interaction
Reuse of adapters for interaction
The “MouseFollower” class and its associated calculation: Have been used for several simulation objects
• followers• geometrical elements (cube’s sub-elements)• targets of the museum’s visitors
Have been refined to be able to manage any parameter of a simulation object
• according to its type and name
Conclusion and ongoing work
We believe GASP enables varied forms of collaborations in Virtual Environments between several end-users:on the same machine or noton the same simulation object or not
Effective code reuse to obtain interactive objects using our adapters
We still have to learn on the specifics of human-human collaboration (awareness)