View Single Post
  #1  
Old 09-21-2015, 01:43 AM
hzhao hzhao is offline
Member
 
Join Date: Sep 2012
Posts: 18
Question how to reduce motion sickness with Oculus rift+logitech driving force

Hi,

I am setting up my Oculus rift DK2 with Logitech driving force GT. To use these two, I combined the two demo codes for Oculus and joy stick control (attached below). It works. But I don't feel well when I use this setup because of the very strong motion sickness. I used the position tracking from Oculus. Could anyone give me some help to improve it? reduce the motion sickness? Thanks.

the code I used:

hmd = oculus.Rift()

# Get list of joystick device information
dinput = viz.add('DirectInput.dle')
devices = dinput.getJoystickDevices()
joy = dinput.addJoystick(devices[selected])
joy.setDeadZone(0.05)


# Check if HMD supports position tracking
supportPositionTracking = hmd.getSensor().getSrcMask() & viz.LINK_POS
if supportPositionTracking:

# Add camera bounds model
camera_bounds = hmd.addCameraBounds()
camera_bounds.visible(False)

# Change color of bounds to reflect whether position was tracked
def CheckPositionTracked():
if hmd.getSensor().getStatus() & oculus.STATUS_POSITION_TRACKED:
camera_bounds.color(viz.GREEN)
else:
camera_bounds.color(viz.RED)
vizact.onupdate(0, CheckPositionTracked)

# Setup navigation node and link to main view
navigationNode = viz.addGroup()
HMDviewLink = viz.link(navigationNode, viz.MainView)
HMDviewLink.preMultLinkable(hmd.getSensor())

# Apply user profile eye height to view
profile = hmd.getProfile()
if profile:
HMDviewLink.setOffset([0,profile.eyeHeight,0])
else:
HMDviewLink.setOffset([0,1.8,0])


########################### joystick turn and move speed###############
joy_MOVE_SPEED = 2.0
joy_TURN_SPEED = 60.0
################################################## #############

def UpdateView():

########for joy control############
e = viz.elapsed()
x,y,z = joy.getPosition()

navigationNode.setEuler([x * joy_TURN_SPEED * e, 0, 0], viz.REL_LOCAL)
navigationNode.setPosition([0, 0, (y+1) * joy_MOVE_SPEED * viz.getFrameElapsed()], viz.REL_LOCAL)
#################################



vizact.ontimer(0,UpdateView)
Reply With Quote