building objects and interactors for collaborative interactions with gasp thierry duval and david...

33
Building Objects and Interactors for Collaborative Interactions with GASP Thierry Duval and David Margery IRISA - Siames

Upload: martha-bradley

Post on 12-Jan-2016

219 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Building Objects and Interactors for Collaborative Interactions with GASP Thierry Duval and David Margery IRISA - Siames

Building Objects and Interactors for Collaborative Interactions with

GASP

Thierry Duval and David Margery

IRISA - Siames

Page 2: Building Objects and Interactors for Collaborative Interactions with GASP Thierry Duval and David Margery IRISA - Siames

Our Background

Page 3: Building Objects and Interactors for Collaborative Interactions with GASP Thierry Duval and David Margery IRISA - Siames

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

Page 4: Building Objects and Interactors for Collaborative Interactions with GASP Thierry Duval and David Margery IRISA - Siames

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

Page 5: Building Objects and Interactors for Collaborative Interactions with GASP Thierry Duval and David Margery IRISA - Siames

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

Page 6: Building Objects and Interactors for Collaborative Interactions with GASP Thierry Duval and David Margery IRISA - Siames

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

Page 7: Building Objects and Interactors for Collaborative Interactions with GASP Thierry Duval and David Margery IRISA - Siames

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

Page 8: Building Objects and Interactors for Collaborative Interactions with GASP Thierry Duval and David Margery IRISA - Siames

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

Page 9: Building Objects and Interactors for Collaborative Interactions with GASP Thierry Duval and David Margery IRISA - Siames

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 ?

Page 10: Building Objects and Interactors for Collaborative Interactions with GASP Thierry Duval and David Margery IRISA - Siames

Distribution - Communications

FC2:FollowerCalcul

FC1:FollowerCalcul

position

F1:FollowerFollowed position

position

F2:FollowerFollowed position 50hz

25hz

Process A

Process B

position

F1:Follower(Mirror)

Page 11: Building Objects and Interactors for Collaborative Interactions with GASP Thierry Duval and David Margery IRISA - Siames

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

Page 12: Building Objects and Interactors for Collaborative Interactions with GASP Thierry Duval and David Margery IRISA - Siames

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

Page 13: Building Objects and Interactors for Collaborative Interactions with GASP Thierry Duval and David Margery IRISA - Siames

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

Page 14: Building Objects and Interactors for Collaborative Interactions with GASP Thierry Duval and David Margery IRISA - Siames

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

Page 15: Building Objects and Interactors for Collaborative Interactions with GASP Thierry Duval and David Margery IRISA - Siames

The Interactors

Low-Level Interactors (Drivers)Used for hardware device encapsulationProvide Raw data

Advanced InteractorsBuilt upon Low-Level Interactors Provide Higher-level data

Page 16: Building Objects and Interactors for Collaborative Interactions with GASP Thierry Duval and David Margery IRISA - Siames

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, …)

Page 17: Building Objects and Interactors for Collaborative Interactions with GASP Thierry Duval and David Margery IRISA - Siames

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

Page 18: Building Objects and Interactors for Collaborative Interactions with GASP Thierry Duval and David Margery IRISA - Siames

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

Page 19: Building Objects and Interactors for Collaborative Interactions with GASP Thierry Duval and David Margery IRISA - Siames

Using the Led-Tracker Driver

Page 20: Building Objects and Interactors for Collaborative Interactions with GASP Thierry Duval and David Margery IRISA - Siames

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 ...

Page 21: Building Objects and Interactors for Collaborative Interactions with GASP Thierry Duval and David Margery IRISA - Siames

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

Page 22: Building Objects and Interactors for Collaborative Interactions with GASP Thierry Duval and David Margery IRISA - Siames

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

Page 23: Building Objects and Interactors for Collaborative Interactions with GASP Thierry Duval and David Margery IRISA - Siames

Using the 3D Mouse (1/3)

Page 24: Building Objects and Interactors for Collaborative Interactions with GASP Thierry Duval and David Margery IRISA - Siames

Using the 3D Mouse (2/3)

Page 25: Building Objects and Interactors for Collaborative Interactions with GASP Thierry Duval and David Margery IRISA - Siames

Using the 3D Mouse (3/3)

Page 26: Building Objects and Interactors for Collaborative Interactions with GASP Thierry Duval and David Margery IRISA - Siames

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…

Page 27: Building Objects and Interactors for Collaborative Interactions with GASP Thierry Duval and David Margery IRISA - Siames

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 ...

Page 28: Building Objects and Interactors for Collaborative Interactions with GASP Thierry Duval and David Margery IRISA - Siames

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

Page 29: Building Objects and Interactors for Collaborative Interactions with GASP Thierry Duval and David Margery IRISA - Siames

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 ;

Page 30: Building Objects and Interactors for Collaborative Interactions with GASP Thierry Duval and David Margery IRISA - Siames

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...

Page 31: Building Objects and Interactors for Collaborative Interactions with GASP Thierry Duval and David Margery IRISA - Siames

Example of interaction

Page 32: Building Objects and Interactors for Collaborative Interactions with GASP Thierry Duval and David Margery IRISA - Siames

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

Page 33: Building Objects and Interactors for Collaborative Interactions with GASP Thierry Duval and David Margery IRISA - Siames

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)