WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rating: Thread Rating: 2 votes, 5.00 average. Display Modes
  #1  
Old 01-29-2004, 07:12 PM
Plasma Plasma is offline
Member
 
Join Date: Jan 2004
Posts: 22
Upward Drift with HMD

I'm using a Virtual Research HMD and InterSense tracker.

I want the user to be able to look up and down without drifting in that direction as they move forward. Is this possible?
Reply With Quote
  #2  
Old 01-30-2004, 10:08 AM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
Hi,

Is this question related to the post about joystick navigation? I'm not exactly sure what you are asking. If you are wanting the joystick navigation to only move the user in the x-z plane then this is very simple to do. Simply replace the following code of your joystick navigation:
Code:
if abs(y) > 0.2:
	viz.move(0,0,-y*0.1)
if abs(x) > 0.2:
	viz.move(x*0.1,0,0)
to:
Code:
if abs(y) > 0.2:
	viz.move(0,0,-y*0.1,viz.BODY_ORI)
if abs(x) > 0.2:
	viz.move(x*0.1,0,0,viz.BODY_ORI)
This just makes you move relative to your body orientation, which is always level with the x-z plane, unless you manually added a pitch to the body orientation. Hope this helps!
Reply With Quote
  #3  
Old 01-30-2004, 11:36 AM
Plasma Plasma is offline
Member
 
Join Date: Jan 2004
Posts: 22
I'll try to be more specific. As it is, when the user is wearing the HMD and is moving forward, Vizard automatically propels the user in the direction they're looking. This is fine, except that when they look up or down they drift up or down.

I want the simulation to simulate walking rather than flying through the environment.

I have set up the joystick to only move forward and back and control speed, not rotation and not strafing.

I still want the user to move where they are looking, unless they are looking up or down. How do I restrict this?

Thanks!
Reply With Quote
  #4  
Old 01-30-2004, 11:53 AM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
Hi,

Okay, in that case you need to turn off automatic head tracking and manually apply the rotations. You want to apply the yaw rotation of the intersense to the body orientation and the pitch,roll to the head orientation. Here's some code to help you:
Code:
import viz
import sid

viz.go()

isense = viz.add('intersense.dls')

#Get the main viewpoint object
viewpoint = viz.get(viz.MAIN_VIEWPOINT)

def mytimer(num):
	y = sid.get()[1]
	x = sid.get()[0]
	#Get the data from the intersense
	data = isense.get()
	#Apply the yaw to the body orientation
	viewpoint.rotate(data[3],0,0,'',viz.BODY_ORI)
	#Apply pitch and roll to the head orientation
	viewpoint.rotate(0,data[4],data[5],'',viz.HEAD_ORI)
	#Navigate relative to body orientation
	if abs(y) > 0.2:
		viz.move(0,0,-y*0.1,viz.BODY_ORI)
	if abs(x) > 0.2:
		viz.move(x*0.1,0,0,viz.BODY_ORI)

viz.callback(viz.TIMER_EVENT,mytimer)
viz.starttimer(0,0.001,viz.FOREVER)
This will restrict navigation to the x-z plane but still let the user look up and down.

Hope this helps!
Reply With Quote
  #5  
Old 01-31-2004, 07:41 AM
Plasma Plasma is offline
Member
 
Join Date: Jan 2004
Posts: 22
Thanks for the help, but I had trouble implementing your code. I am a very novice programmer and get confused easily, so it's not your fault, it's entirely my inexperience.

I managed to solve the problem by placing the viz.eyeheight command within my joystick timer loop.

Thanks again!
Reply With Quote
  #6  
Old 04-06-2004, 07:50 AM
eugcc eugcc is offline
Member
 
Join Date: Apr 2004
Location: United Kingdom
Posts: 9
HMD and Intersense Tracker?

Hi, are you using the Intertrax2 tracker then? Just one question, though not related to your topic. I'm using win2000 and winXP machines with I-Visor HMD and Intertrax2 tracker with Vizard which worked after installation, but the moment I rebooted the machines and logged back in, they just wouldn't track anymore. The demo I used with Vizard was the gallery.py

The intertrax I used is USB and the error I get on all my 3 machines (2 XP 1 Win2k) is:

Failed to connect to COM1
Failed to connect to COM2
Failed to connect to COM3
Failed to connect to COM4
**ERROR: Failed to connect to PPT
** ERROR: Failed to connect to intersense
FFB device create failed

Any ideas?

Thanks
__________________
Eugene
United Kingdom
Reply With Quote
  #7  
Old 04-06-2004, 09:10 AM
mspusch mspusch is offline
WorldViz Team Member
 
Join Date: Feb 2003
Posts: 223
Hi Eugene,

There are three possibilities about what could cause the problems you see. Please do the following:

A) Use a new Intersense driver provided at http://www.worldviz.com/download/fil...rsense_215.zip and attached to this post. Replace the driver intersense.dls in the Vizard20/plugins folder with the new driver. This driver lets you specify the port the Intersense is connected to. For example, if the intersense is plugged into COM2 you would do the following:

PORT_INTERSENSE = 2
Isense = viz.add('intersense.dls')

B) You might have installed the Intersense Server on your computer, which runs automatically after restart and is known to conflict with other Intersense drivers. Please make sure the IServer is not running when you run the Vizard applications.

C) It sounds like you are only using an Intersense cube, not the PPT (WorldViz Precision Position Tracker for walking around in the simulation). For this, please get rid of the lines

pos = viz.add('vizppt.dls')
pos.command(4.002)
pos.command(13)

and lower down (where the reset button is defined) the line

pos.reset()

Hope that helps.

Matthias
Attached Files
File Type: zip intersense_215.zip (29.1 KB, 1264 views)
Reply With Quote
  #8  
Old 04-07-2004, 01:01 AM
eugcc eugcc is offline
Member
 
Join Date: Apr 2004
Location: United Kingdom
Posts: 9
Thumbs up Its working now!

Dear Support, what would we do without you???!!!

Its working now after closing the intersense server! The other SkyDiver Demo from Maelstrom also worked. The intersense server is at fault.

Thank you
__________________
Eugene
United Kingdom
Reply With Quote
Reply

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


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


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