ML2VR Providing MATLAB Users an Easy Transition to Virtual Reality - - PowerPoint PPT Presentation

ml2vr providing matlab users an easy transition to
SMART_READER_LITE
LIVE PREVIEW

ML2VR Providing MATLAB Users an Easy Transition to Virtual Reality - - PowerPoint PPT Presentation

ML2VR Providing MATLAB Users an Easy Transition to Virtual Reality and Immersive Interactivity David J. Zielinski Ryan P. McMahan Wenjie Lu Silvia Ferrari Motivation: DiVE: Duke Immersive Virtual Environment. 6-Sided CAVE-type Virtual


slide-1
SLIDE 1

ML2VR Providing MATLAB Users an Easy Transition to Virtual Reality and Immersive Interactivity

David J. Zielinski Ryan P. McMahan Wenjie Lu Silvia Ferrari

slide-2
SLIDE 2

Motivation:

DiVE: Duke Immersive Virtual Environment. 6-Sided CAVE-type Virtual Reality System

Benefits of using Virtual Reality

  • Represent models to scale
  • Increased spatial understanding
  • Advanced interaction techniques
  • Collaborative exploration (CAVE-

type systems)

(Open House Every Thursday 4:30pm)

slide-3
SLIDE 3

Motivation: Engineering Students DiVE ?

slide-4
SLIDE 4

Question: What software do engineers use for simulation and modeling?

slide-5
SLIDE 5

Answer: MATLAB

"MATLAB is a numerical computing environment and programming language. Developed by MathWorks, MATLAB allows matrix manipulations, plotting of functions and data, and implementation of algorithms." -Wikipedia

slide-6
SLIDE 6

Our Goal: MATLAB DiVE

slide-7
SLIDE 7

Potential Existing Solutions:

Name Features Issues MATLAB Simulink 3D Toolbox

(Commercial Software Module)

Create and modify VRML scenegraphs. Targeted at Desktop display systems. Avizo CalculusMatlab

(Commercial Software Module)

Run MATLAB scripts inside Avizo to process data. Can't utilize user's existing rendering code. Chromium

(open-source project)

Capture and Distributes OpenGL to Render Nodes. No input device abstraction layer. Syzygy

(open-source framework)

Provides input device and display abstraction layer. No way to obtain MATLAB's graphics.

slide-8
SLIDE 8

Potential Existing Solutions:

Name Features Issues MATLAB Simulink 3D Toolbox

(Commercial Software Module)

Create and modify VRML scenegraphs. Targeted at Desktop display systems. Avizo CalculusMatlab

(Commercial Software Module)

Run MATLAB scripts inside Avizo to process data. Can't utilize user's existing rendering code. Chromium

(open-source project)

Capture and Distributes OpenGL to Render Nodes. No input device abstraction layer. Syzygy

(open-source framework)

Provides input device and display abstraction layer. No way to obtain MATLAB's graphics.

ML2VR MATLAB Syzygy

Our Solution:

slide-9
SLIDE 9

Let's see ML2VR in action!

slide-10
SLIDE 10

1 CPU 1 HMD

University of Texas at Dallas

1 CPU 4 Projectors

University of Indiana

1 CPU 1 Projector

Duke University

Common VR System Topologies

slide-11
SLIDE 11

What is OpenGL?

MATLAB OpenGL Screen fill3([0 0 0],[1 0 0],[1 0 1], glBegin(GL_TRIANGLES) glVertex3f(0,0,0); glVertex3f(1,0,0); glVertex3f(1,0,1); glEnd();

"OpenGL is an API (Application Progamming Interface) for rendering 2D and 3D computer graphics. The API is typically used to interact with a GPU, to achieve hardware-accelerated

  • rendering. OpenGL was developed by Silicon Graphics Inc. in

1992." -Wikipedia

vertex = corner

slide-12
SLIDE 12

What does OpenGL intercept mean?

  • 1. We add our replacement opengl32.dll to the MATLAB directory.
  • 2. At runtime, MATLAB now loads our replacement opengl32.dll
  • 3. When MATLAB calls an opengl function, our function gets called
  • 4. After sending out the data, we pass the data onto the real
  • pengl32.dll function
slide-13
SLIDE 13

What does OpenGL intercept mean?

  • 1. We add our replacement opengl32.dll to the MATLAB directory.
  • 2. At runtime, MATLAB now loads our replacement opengl32.dll
  • 3. When MATLAB calls an opengl function, our function gets called
  • 4. After sending out the data, we pass the data onto the real
  • pengl32.dll function

glVertex3f(...) glVertex3f (...) { // send to GPU } cplxmap(...) MATLAB command normal case

slide-14
SLIDE 14

What does OpenGL intercept mean?

  • 1. We add our replacement opengl32.dll to the MATLAB directory.
  • 2. At runtime, MATLAB now loads our replacement opengl32.dll
  • 3. When MATLAB calls an opengl function, our function gets called
  • 4. After sending out the data, we pass the data onto the real
  • pengl32.dll function

glVertex3f(...) glVertex3f (...) { // send to GPU } glVertex3f (...) { send_szg_glVertex3(...); real_opengl.glVertex3f (...); } cplxmap(...) MATLAB command intercept case normal case

slide-15
SLIDE 15

System Architecture Challenges

  • Complicated MATLAB simulations may run at low frame rate.
  • Our Syzygy content viewer runs at a higher frame rate.
  • Can we utilize this "frame rate mismatch?"

Simulator Sickness Interaction Latency

slide-16
SLIDE 16

Detailed System Architecture

Graphics content is generated by MATLAB simulation That content is displayed by

  • ur Syzygy viewer
slide-17
SLIDE 17

Detailed System Timeline

  • MATLAB simulation generates content
  • Syzygy viewer receives a content frame
  • While waiting for new content, Syzygy viewer allows user to view content from different

viewpoints (head based rendering).

  • Fast head based rendering = reduced simulation sickness
slide-18
SLIDE 18
  • Minimal additions to access data from VR devices

MATLAB Script

vr = vr_interface(ServerIP,ServerPort); while 1 [event,btn,pos]=vr.get_button_event(); if event==1 && btn==0 % modify data here end clf; % clear screen surf(dataX,dataY,dataZ); % render surface drawnow; % flush end

slide-19
SLIDE 19

Programming API

vr = vr_interface(ServerIP,ServerPort); Parameters: vr.set_return_type(value) vr.set_transform_matrix(value) Events: helps with low frame rate simulations [event, button, pos3]=vr.get_button_event() [event, axis, pos3, val]=vr.get_joystick_event() Polling: [matrix4]=vr.get_sensor_state(sensorID) [val]=vr.get_button_state(buttonID) [val]=vr.get_joystick_state(axisID) Navigation: vr.do_navigation_translate(vec3) vr.do_navigation_rotate(obj, vec3, amount)

slide-20
SLIDE 20

Case Study: Robot Path Planning

Silvia Ferrari Duke University Wenjie Lu Duke University

  • Artificial potential function used to plan the motion of the robot
  • Potential function recalculates the best path to the target while

adapting to the dynamic addition and removal of obstacles.

  • We added in ML2VR functions to make the simulation interactive.

Key: Robot Obstacle Goal

Original Desktop Simulation Now in VR !

  • G. Zhang, and S. Ferrari, “An adaptive artificial potential function approach for geometric

sensing,” in IEEE Decision and Control, 2009, pp. 7903-7910.

slide-21
SLIDE 21

New Features Robot Demo

Raycasting Move the goal

slide-22
SLIDE 22

New Sci Vis Examples

coneplot and streamline (complicated 3D visualization) surf demo with parameter modification with joystick x-axis

slide-23
SLIDE 23

Interaction Examples

01_click 02_joystick 03_touch 04_drag_pos3 05_drag_matrix4 06_virtual_hand_pos3 07_virtual_hand_matrix4 08_raycasting 09_sphere_spawner 10_polling 11_navigation

slide-24
SLIDE 24

Contributions:

  • Open source cross-platform software system.
  • MATLAB scripts can easily obtain input device data.
  • Decoupled (fast) head based rendering.
  • Successful case study of a desktop to VR conversion.
  • Suite of Interaction programming examples.
slide-25
SLIDE 25

March is ML2VR Month!

What Where When Friday Forum Talk Duke University March 8th Poster Session @ FIP Symposium Duke University March 10th-11th Poster @ IEEE VR 2013 Orlando, Florida March 16th-23rd Invited Speaker @ "Immersive Visualization Bootcamp" Indianapolis, Indiana March 25th-27th

slide-26
SLIDE 26

Software Robustness

  • More OpenGL primitives
  • Dynamic buffers
  • Line rendering issues
  • Desktop simulator refinement

Evaluation

  • What is the benefit of immersive visualization

and interaction for MATLAB?

Future Work

slide-27
SLIDE 27

Future Work

Robotics Applications

Quadcopter Simulation Human-Robot Collaboration Simulation

slide-28
SLIDE 28

Future Work Front + Back Ends

ML2VR MATLAB Syzygy Mathematica

Camille Goudeseune University of Illinois

FreeVR VR Juggler R

Bill Sherman Indiana University Judy Vance Iowa State University

slide-29
SLIDE 29

Future Work More Collaborators

Michael "Gus" R. Gustafson Teaches EGR 53L, a Computational Methods in Engineering w/ MATLAB course, that is required for all Pratt (Duke Engineering) first-year students. Regis Kopper New director of the DiVE. Ross Tredinnick Living Environments Laboratory (UW Madison CAVE)

slide-30
SLIDE 30

David J. Zielinski Duke University

Authors

Ryan P. McMahan University of Texas at Dallas

Acknowledgements:

Rachael B. Brady Eric E. Monson Sarah V. Goetz

Support:

National Science Foundation. IGERT Grant No. DGE-1068871.

Silvia Ferrari Duke University Wenjie Lu Duke University

slide-31
SLIDE 31

Thank You! Questions?

djzielin@duke.edu http://sourceforge.net/projects/ml2vr/