WorldViz User Forum oculus rift and inertia cube interaction problems
 User Name Remember Me? Password
 Register FAQ Search Today's Posts Mark Forums Read

 Thread Tools Rate Thread Display Modes
#1
03-06-2014, 12:29 PM
 apboone Member Join Date: Mar 2014 Posts: 3
oculus rift and inertia cube interaction problems

We have an oculus set up to define head direction and an inertia cube that defines the body orientation. The inertia cube is set up such that the program ignores the roll and pitch information. The problem is that when you run the program and turn around in the environment the systems (oculus and inertia cube) are additive. That is, when you turn 90 degrees in the real world, you've turned 180 in the virtual environment. We think it has something to do with relative vs. absolute designations of the two systems.

This is what we have with the inertia cube. We are trying to define a similar function for the oculus so that we can control whether it's relative or absolute etc.

Code:
```def updateOriBody():
ori = tracker.getEuler()
pitch = 0
roll = 0
viz.MainView.setEuler([ori[0],0,0],viz.BODY_ORI,viz.ABS_GLOBAL)```
Thanks for you help!
#2
03-10-2014, 01:41 AM
 Jeff WorldViz Team Member Join Date: Aug 2008 Posts: 2,471
Can you explain the setup in more detail? Is it necessary to move the viewpoint with the body updates or do you just need to record that data?
#3
03-11-2014, 12:25 PM
 apboone Member Join Date: Mar 2014 Posts: 3
The inertia cube is our tracker for the body orientation of the main viewpoint and oculus default head tracking is enabled. A main purpose is that we do not want to navigate by head tracking, but rather we want head tracking and body tracking to remain independent. This way when you walk (via joystick) through the environment, you can look around with your head without going that direction (unless you walk that direction). Our problem is this, in attempting to make a 90 degree turn, in the VE you have only turned through 45 degrees. It seems that during rotations the orientation tracking of both the inertia cube and oculus add up. Basically it is possible to decouple the inertia cube from the oculus?

thanks
#4
03-12-2014, 06:15 AM
 Jeff WorldViz Team Member Join Date: Aug 2008 Posts: 2,471
You could link the viewpoint orientation to the head tracker:
Code:
`viz.link(headTracker,viz.MainView,mask=viz.LINK_ORI)`
Then calculate the change in x, z position every frame based on body tracker yaw and joystick data and set the viewpoint position:
Code:
`viz.MainView.setPosition([x,0,z],viz.REL_GLOBAL)`
Or you could set the viewpoint body orientation so position movements are relative to that and then adjust the final viewpoint orientation:
Code:
```MOVE_SPEED = 5

def updateViewpoint():

x,y,z = joy.getPosition()
move_amount = MOVE_SPEED * viz.getFrameElapsed()
viz.MainView.move([x*move_amount,0,y*move_amount], viz.BODY_ORI)

headOri = headTracker.getEuler()
bodyOri = bodyTracker.getEuler()
viz.MainView.setEuler([bodyOri[0],0,0],viz.BODY_ORI)
viz.MainView.setEuler([headOri[0] - bodyOri[0],headOri[1],headOri[2]])

vizact.onupdate(0,updateViewpoint)```
#5
03-13-2014, 10:45 AM
 apboone Member Join Date: Mar 2014 Posts: 3
This is working now!

I guess that our problem was that we didn't think to apply the get.euler to our headtracking component in the oculus. This makes sense.

Thank you!

 Thread Tools Display Modes Rate This Thread Linear Mode Rate This Thread: 5 : Excellent 4 : Good 3 : Average 2 : Bad 1 : Terrible

 Posting Rules You may not post new threads You may not post replies You may not post attachments You may not edit your posts BB code is On Smilies are On [IMG] code is On HTML code is Off Forum Rules
 Forum Jump User Control Panel Private Messages Subscriptions Who's Online Search Forums Forums Home Getting Vizard Help with AI Announcements Vizard Precision Position Tracker (PPT) Plug-in development

All times are GMT -7. The time now is 01:01 AM.

 Contact Us - WorldViz Home - Archive - Top

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Copyright 2002-2023 WorldViz LLC