WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 08-17-2021, 05:10 AM
rdkirkden rdkirkden is offline
Member
 
Join Date: May 2017
Posts: 18
Can I get the Walking tracker’s turning motion while using an Oculus VR DK2 tracker?

Long title: Can I achieve the same turning motion that is implemented by the Mouse and Keyboard Walking tracker while also using an Oculus VR DK2 tracker?

In Vizard 5, I am using the ‘Oculus VR DK2’ tracker in combination with a ‘WandMagicCarpet’ transport that receives joystick input (set up using Vizconnect) so that the avatar can move backwards/forwards/left/right and turn with the joystick in addition to looking around with the Oculus HMD. However, the turning motion can cause motion sickness, and I think this might be associated with the accelerations and decelerations that the transport implements. I have noticed that the ‘Mouse and Keyboard Walking’ tracker produces a different sort of turning motion with the mouse that feels more like looking around than turning the body and seems to produce less motion sickness. I would like to implement this sort of turning in combination with the ‘Oculus VR DK2’ tracker, but I can’t find a way to do this in Vizconnect. (1) I was able to make the ‘Mouse and Keyboard Walking’ tracker work alongside the existing ‘Oculus VR DK2’ tracker by combining them in the Scene Graph, but no matter how I arranged them they interacted in nauseating ways. I need them to work independently. (2) It would seem to make more sense to have ‘walking’ as a transport than as a tracker, as transports and trackers can be combined. There is a ‘Walking’ transport available in Vizconnect, but this gives the same kind of turning as the ‘WandMagicCarpet’ transport. (3) Since the ‘Mouse and Keyboard Walking’ tracker uses a mouse input for turning, I thought of adding a mouse input, but there is no such Input option available in Vizconnect. The nearest is ‘Mouse Button’, and this gives the same sort of turning as the joystick when the left mouse button is assigned to ‘turnLeft’ and the right button to ‘turnRight’ in the transport. Overall, I think I need either: (1) a way to have two trackers operating independently; or (2) a transport with the same physics as the ‘Mouse and Keyboard Walking’ tracker. Please can you tell me if this is possible?
Reply With Quote
  #2  
Old 08-25-2021, 05:41 AM
rdkirkden rdkirkden is offline
Member
 
Join Date: May 2017
Posts: 18
Further comments

I thought I’d add a bit of further information to clarify the sort of turning movement that I’m after. I’d be interested to know if anybody else has an opinion on this, even if there isn’t a simple solution.

The transports seem to implement a particular type of turning, which is based on the physics of acceleration and deceleration. The game controller’s joystick position does not directly control velocity. Rather, it controls acceleration, which in turn affects velocity. In contrast, with the ‘Mouse and Keyboard Walking’ tracker, the turning behaviour seems intended to simulate looking around rather than turning the body, and it does not involve gradual acceleration and deceleration. It is normally controlled with a mouse, not a joystick, and I’m not sure if it would work with a joystick. But mouse movements seem to translate more or less directly into changes in viewing angle, rather than simulating the physics of turning. It’s like some computer games that use the mouse to look around and the keyboard to move relative to the direction faced. The viewing direction changes more or less immediately and the turning process is as fast as the mouse movement. I’m inclined to think that this is more naturalistic, as it like turning your head: you more or less switch from one view to another while barely registering the intermediate views. It seems to me that it produces less nausea.

Googling VR sickness, I’ve subsequently come across the ‘Oculus Best Practices’ document, which indicates that VR sickness has many causes, but highlights acceleration as one of them. It goes on to say: “An instantaneous burst of acceleration is more comfortable than an extended, gradual acceleration to the same movement velocity.” This seems to bear out my experience. The transports simulate the physics of motion for maximal realism, but this has a cost. The document mentions a novel approach aimed at mitigating VR sickness: “Rather than smoothly rotating, pressing left or right on a controller causes the camera to immediately jump by a fixed angle (e.g., 30°) in the desired direction.” This is a more extreme (i.e. less realistic) solution than I had in mind, but the general thrust of this approach (i.e. achieving more or less instantaneous turning) is similar.

If there is not an easy solution (i.e. a way to combine trackers, or a ready-made transport), then I suppose it would be necessary to rewrite some of the code that controls how one of the existing transports works.
Reply With Quote
  #3  
Old 08-25-2021, 10:35 AM
sado_rabaudi sado_rabaudi is offline
WorldViz Team Member
 
Join Date: Jul 2016
Posts: 25
Hi,

You can use a "merged" tracker that will combine the orientation from one tracker and the position from another. For instance you could use the "Virtual Mouse Orientation" tracker to use the mouse orientation and then use the position from the DK2.

Best,
Sado
Reply With Quote
  #4  
Old 08-27-2021, 06:36 AM
rdkirkden rdkirkden is offline
Member
 
Join Date: May 2017
Posts: 18
Hi Sado,

Thanks so much for your reply.

The ‘Virtual Mouse Orientation’ tracker gives the same kind of rotation as the ‘Mouse and Keyboard Walking’ tracker, which is great. But I’m struggling to combine this with the ‘Oculus VR DK2’ tracker, as the trackers seem to affect one another. Testing in the Vizconnect interface, the best arrangement I’ve found is as shown in the image.

In this arrangement, the ‘Virtual Mouse Orientation’ tracker behaves well, and the ‘Oculus VR DK2’ tracker seems fine except that turning the head from side to side causes roll in addition to yaw. Is there a better arrangement that I could use? Or perhaps I could resolve this by preventing any rolling motion from occurring by adding some code somewhere in the Vizconnect file or my main Vizard program?

Richard
Attached Thumbnails
Click image for larger version

Name:	merged_trackers1.png
Views:	101
Size:	106.5 KB
ID:	992  
Reply With Quote
  #5  
Old 08-27-2021, 12:24 PM
sado_rabaudi sado_rabaudi is offline
WorldViz Team Member
 
Join Date: Jul 2016
Posts: 25
One way to do this is to first create a group tracker in vizconnect that will contain the modified tracking data without roll. Next, in the avatar animator set the avatar head to move with this group tracker. Then in a callback function, which could be in the postInit or the application script, set the group tracker's position,yaw, and pitch using data coming from the Oculus tracker. Here's an example function:

def postInit():
"""Add any code here which should be called after all of the initialization of this configuration is complete.
Returned values can be obtained by calling getPostInitResult for this file's vizconnect.Configuration instance."""

Group tracker need to be added to vizconnect and used in animator
groupTracker = vizconnect.getRawTracker('headTrackerGroup')
steamHeadTracker = vizconnect.getRawTracker('head_tracker')

def onUpdate():
pos = oculusHeadTracker.getPosition(viz.ABS_GLOBAL)
ori = oculusHeadTracker.getEuler(viz.ABS_GLOBAL)

Set roll to 0
ori = [ori[0], ori[1], 0]
groupTracker.setPosition(pos, viz.ABS_GLOBAL)
groupTracker.setEuler(ori, viz.ABS_GLOBAL)

vizact.onupdate(vizconnect.PRIORITY_ANIMATOR+1, onUpdate)

return None
Reply With Quote
  #6  
Old 09-01-2021, 10:03 AM
rdkirkden rdkirkden is offline
Member
 
Join Date: May 2017
Posts: 18
Hi Sado,

Thanks for getting back to me with such detailed advice! I’ve got it working now. I did one thing differently by mistake, but then left it as it was because I think it suits the design of my program. I’ll outline what I did, in case this is useful for anybody else. I admit that the things I did that deviated from your advice were pretty haphazard, but it worked in the end.

The main thing I did differently was that I used the group tracker to prevent roll on the mouse controls instead of on the Oculus HMD. I realise this makes no sense, given that my objective was to prevent rolling when the HMD turned from side to side – as I said, it was a mistake! But in my program I want to restrict the mouse controls to yaw only, and when I used the group tracker to prevent both roll and pitch movements on the mouse, this somehow stopped the HMD from producing the unwanted roll when turning from side to side. I should add that I had no choice but to prevent pitch movements on the mouse, because they were being accompanied by an unpleasant lurching forward/rolling behaviour.

I intend to keep the transport for linear movements, i.e. backwards, forwards, left and right. I’m going to upgrade from the DK2 to a Rift S and when I do I hope to replace my gamepad controller with a touch controller, so that the player can have the touch controller in one hand and the mouse in the other. Hopefully it is possible to use just one touch controller – I haven’t tried this yet. The keyboard would be an alternative if I used the Mouse and Keyboard Walking tracker instead of the Mouse Orientation tracker, but I think a touch controller thumbstick would be easier to use while wearing an HMD. Also, I want to use one of the keys on the controller.

I set up the vizconnect scene graph as shown in the image. I set up the vizconnect avatar animator with the head tracker, as setting it up with the mouse orientation group tracker caused some unpleasant effects. The head tracker was specified in the transport settings. Then I added the following code to the postInit() function of the vizconnect file:

Code:
def postInit():
	"""Add any code here which should be called after all of the initialization of this configuration is complete.
	Returned values can be obtained by calling getPostInitResult for this file's vizconnect.Configuration instance."""
	import vizact
	groupTracker = vizconnect.getRawTracker('mouse_orientation_group')
	mouseOrientationTracker = vizconnect.getRawTracker('mouse_orientation')
	def onUpdate():
		pos = mouseOrientationTracker.getPosition(viz.ABS_GLOBAL)
		ori = mouseOrientationTracker.getEuler(viz.ABS_GLOBAL)
		#Set pitch and roll to 0
		ori = [ori[0], 0, 0]
		groupTracker.setPosition(pos, viz.ABS_GLOBAL)
		groupTracker.setEuler(ori, viz.ABS_GLOBAL)
		return None
	vizact.onupdate(vizconnect.PRIORITY_ANIMATOR+1, onUpdate)
	return None
Attached Thumbnails
Click image for larger version

Name:	vizconnect scene graph2.png
Views:	100
Size:	136.7 KB
ID:	993  
Reply With Quote
Reply

Tags
combining trackers, motion sickness, mouse & keyboard walking, oculus dk2

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

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 Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Walking is reversed in X and Z axes with motion capture. amir Vizard 2 07-31-2018 08:18 PM
motion tracker changes Vizard timing jelly Vizard 4 06-13-2016 12:34 PM
how to reduce motion sickness with Oculus rift+logitech driving force hzhao Vizard 2 09-23-2015 07:34 AM
Oculus runtime disrupts clustering to mirror DK2 display performlabrit Vizard 1 01-23-2015 08:00 AM
Intermittent orthographic stereo projection problems AySz88 Vizard 10 02-17-2012 01:50 PM


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


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