WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 08-15-2007, 04:07 PM
v-clizzin v-clizzin is offline
Member
 
Join Date: Sep 2006
Posts: 15
euler problems in Vizard 3.0

Hi, I am running the following code in Vizard, and setting an avatar's head to follow the tracked euler does not work.

Code:
import viz
viz.go(viz.HMD + viz.STEREO + viz.TRACKER)

PORT_INTERSENSE = 3

# set up tracking
if viz.get(viz.TRACKER):
	headIsense = viz.add('intersense.dls')
	ppt = viz.add('vizppt.dls')
	ppt.command(5,'',5)	#Average over 5 samples
	#Automatically track head position and orientation
	viz.tracker()

avatar = viz.addAvatar('Male.cfg')
head = avatar.getBone('skel_Head')
head.lock()

def mytimer(num):
	#Rotate head
	euler = viz.get(viz.HEAD_EULER)
	head.setEuler(euler[2],euler[0],euler[1])	# works correctly, despite moving euler element indices!
	#head.setEuler(euler[0],euler[1],euler[2])	# does not work correctly!

viz.callback(viz.TIMER_EVENT, mytimer)
viz.starttimer(1,0.01,viz.FOREVER)
As you can see above, I have to move the indices of the euler elements one over to the right in order to get the avatar's head to rotate correctly. This is confusing, because the Vizard documentation says that both viz.get(viz.HEAD_EULER) and node3d.setEuler() order euler elements as [yaw, pitch, roll]. I'd appreciate advice on whether there's been some upgrade of Vizard I need to download. I'm currently running version 3.00.2051.

Thank you!
Christopher Lin
Reply With Quote
 

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 02:42 AM.


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