WorldViz User Forum  

Go Back   WorldViz User Forum > Precision Position Tracker (PPT)

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 11-29-2011, 03:37 AM
nihohit nihohit is offline
Member
 
Join Date: Nov 2011
Posts: 16
Vizard-PPT conversion

Hi, three questions which are basically the same:
a. is there a way to adjust the movement speed inside the vizard simulation, when the input is from a ppt-tracker? if so, how?
b. same for adjusting eye-height.
c. Is there a way to convert from the point-system in the ppt to the scene in the vizard, and vice-versa?

Basically, I'm replacing the former VR lab programmer which more or less disappeared, and there's a problem with the simulation he left, that the movement speed is very slow. I tried scaling the scene down, but this seemed to have just scaled the POV and movement speed of the PPT with it, as far as I can see - movement is very slow.
Reply With Quote
  #2  
Old 11-29-2011, 05:37 PM
Jeff Jeff is offline
WorldViz Team Member
 
Join Date: Aug 2008
Posts: 2,445
a. You can scale movement using the <link>.postScale command:
Code:
tracker = vrpn.addTracker('PPT0@hostname',0)  
link = viz.link(tracker,viz.MainView)

#Scale X and Z movement by a factor of 2
link.postScale([2,1,2])
b. If you want to scale the Y data use the command above. If you want to add some value to the Y data use:
Code:
link.postTrans([0,2,0])
c. The position in both PPT and Vizard are in meters so there is no conversion necessary. If this does not answer your question please explain it some more.
Reply With Quote
  #3  
Old 11-30-2011, 03:44 AM
nihohit nihohit is offline
Member
 
Join Date: Nov 2011
Posts: 16
Thanks!
I used this method, which solves the problems (although it needs extreme measures - I had to scale by [90,30,90]), but now I have odd jumps - on some fixed points, when I turn my head the view just jumps about 30-40 degrees to the left.

about c: I meant that I could work with the PPT's coordinate system directly in the vizard. would make setting up scenes a whole lot simpler.
Reply With Quote
  #4  
Old 11-30-2011, 06:28 PM
Jeff Jeff is offline
WorldViz Team Member
 
Join Date: Aug 2008
Posts: 2,445
It sounds like your model is still too large if you have to scale the movement by that amount.

The coordinate systems in Vizard and PPT are the same. If you're not scaling the movement in Vizard and you move one meter in PPT that will move the viewpoint one meter in Vizard.
Reply With Quote
  #5  
Old 11-30-2011, 11:12 PM
nihohit nihohit is offline
Member
 
Join Date: Nov 2011
Posts: 16
Could it be that the PPT is scaling the movement? I tried using the "tune" function, but it didn't seem to change much.

My model is scaled to factory defaults, 1:1 - but even simple added white picket fences appear as too high without scaling.
Reply With Quote
  #6  
Old 12-01-2011, 06:09 PM
Jeff Jeff is offline
WorldViz Team Member
 
Join Date: Aug 2008
Posts: 2,445
No, PPT would not scale the movement. If you're using Vizard 4, try loading your model in Inspector to view it's dimensions and make sure the size is correct. If the model was not exported with meters as the unit of measurement it will not be scaled correctly once it's loaded in Vizard.
Reply With Quote
  #7  
Old 12-02-2011, 12:09 AM
vizstan vizstan is offline
WorldViz Team Member
 
Join Date: Feb 2011
Posts: 4
Hi, nihohit,

Could you try to recalibrate your PPT system with the cal-rig again?
Also, I want to verify the size of your calibration rig. The corner LEDs should be close to 57cm apart (not in diagonal direction). You can verify it one more time after the re-calibration process by checking the coordinate system of the light showing in PPT Studio.
Reply With Quote
  #8  
Old 12-04-2011, 02:04 AM
nihohit nihohit is offline
Member
 
Join Date: Nov 2011
Posts: 16
Hey,
I'm using Vizard 3, and when using the 3d screem to check the stage, or when using the program in debug mode, where the input isn't from the PPT, everything is ok - the eye height is correct and so's the movement speed.

I've now recalibrated the PPT, and set evey value under "tune" to 1, but the problem of movement speed & wrong eye height persist when not scaled, and when scaled by the quoted factors, there's still view-point skipping.
Also, I recreated an empty set, with just the stage and no programming code whatsoever, and the same problems persisted.
Reply With Quote
  #9  
Old 12-04-2011, 02:17 AM
nihohit nihohit is offline
Member
 
Join Date: Nov 2011
Posts: 16
I don't know if this is also related, but I just noticed that while I calibrated on the floor, and made sure (by the floor tiles) that the set will be perpendicular to the walls, models appear at some angle to what I would've expected.
Reply With Quote
  #10  
Old 12-04-2011, 02:34 AM
nihohit nihohit is offline
Member
 
Join Date: Nov 2011
Posts: 16
Checked with another stage, now - the eye-height problem didn't appear, so that must be something that is due to the stage.
Reply With Quote
  #11  
Old 12-05-2011, 11:08 AM
Gladsomebeast Gladsomebeast is offline
Member
 
Join Date: Mar 2005
Location: Isla Vizta, CA
Posts: 397
I think the code you are using is changing the PPT data before it is applied to the viewpoint. PPT always outputs in meters and is oriented in the positive z direction of the calibration square. Try running only this code only:
Code:
import viz
import vizact
viz.go()
viz.add('court.ive')

vrpn = viz.add('vrpn7.dle')
tracker = vrpn.addTracker('PPT0@hostname',0)

def updateView():
	pptPos = tracker.getPosition()
	viz.MainView.setPosition(pptPos)
	
vizact.onupdate(viz.PRIORITY_DEFAULT, updateView)
__________________
Paul Elliott
WorldViz LLC
Reply With Quote
  #12  
Old 12-07-2011, 02:50 AM
nihohit nihohit is offline
Member
 
Join Date: Nov 2011
Posts: 16
That certainly seems to help - movement still needs a bit of scaling up, but a lot less then before.
BUT with this code the program doesn't receive the helmet's tilt controls. When I add:
track = viztracker.add()

then there's tilt controls, but now the room and movement directions in the simulation are again at some degree from the room originally - forward movement is slightly skewed (and so's sidestepping), and the corners of the court are around the center of the lab's walls.
Reply With Quote
  #13  
Old 12-07-2011, 03:05 AM
nihohit nihohit is offline
Member
 
Join Date: Nov 2011
Posts: 16
BTW, it seems that what has caused the slowdown in movement was using viz.link(track,viz.MainView) as the tutorials suggest. Any reason for it?
Reply With Quote
  #14  
Old 12-07-2011, 03:16 AM
nihohit nihohit is offline
Member
 
Join Date: Nov 2011
Posts: 16
Also, I now checked the helmet, it seems its sensor is set to 30 degrees off - I used print track.getEuler() and when looking forward the average num was [60,0,0] - how do I recalibrate/reset it?
Reply With Quote
  #15  
Old 12-07-2011, 10:03 AM
Gladsomebeast Gladsomebeast is offline
Member
 
Join Date: Mar 2005
Location: Isla Vizta, CA
Posts: 397
With the viztracker module, people often code in a "reset" to aligne the orientation sensors coordinate system with PPT cooreinate system. It works by facing the orientation sensor in the postive Z direction of PPT, then pressing some key on the keyboard. Usualy this key is 'r' or alt-r.

Its easy to code a reset yourself if you want to do that. On a key press, grab the current raw yaw value of orientation sensor and subtract all subsequent yaw readings from this saved value before applying orientation to view.
__________________
Paul Elliott
WorldViz LLC
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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Realistic Light and Shadows Using Vizard and 3DS Max jde Vizard 4 07-13-2012 11:58 AM
Vizard 4 Beta Testing farshizzo Announcements 0 02-01-2011 11:46 AM
Vizard 4 Beta Testing farshizzo Vizard 0 02-01-2011 11:46 AM
.3DS importing in Vizard and 3D Studio jde Vizard 1 08-28-2009 04:14 PM
Vizard tech tip: Using the Python Imaging Library (PIL) Jeff Vizard 0 03-23-2009 12:13 PM


All times are GMT -7. The time now is 08:53 PM.


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