WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 10-26-2022, 03:39 PM
apenngrace apenngrace is offline
Member
 
Join Date: May 2015
Posts: 13
Modify tracker position before next frame

Is there a way to set the position of the "head" when vizconnect is running? If glasses are out of range, and the tracker value is 0,0,0, the frustrums of our CAVE displays are kind of off. I have to walk into the CAVE space and wave glasses around so that vizconnect gets a more reasonable tracker value.

When the glasses are out of range, I'd like to set a default head position value.
I'd like to be able to test for the tracker being near 0,0,0, and then provide a default head position higher up like (0.208, 1.682, -0.339). When I access the tracker with vizconnect.getTracker(), I see that there is a getPosition() method but no setPosition() method.

Is there some way to register a call-back or something to be able to review and modify the tracker position value before the next frame gets displayed?
Reply With Quote
  #2  
Old 05-12-2023, 03:02 PM
sado_rabaudi sado_rabaudi is offline
WorldViz Team Member
 
Join Date: Jul 2016
Posts: 40
The head is usually parented to the transport, so you may try transportNode = vizconnect.getTransport('main_transport').getNode3 d()
then transportNode.setPosition (where "main_transport" is the name of your transport).

Best,
Sado

Last edited by sado_rabaudi; 05-12-2023 at 04:14 PM.
Reply With Quote
  #3  
Old 08-22-2023, 07:37 AM
apenngrace apenngrace is offline
Member
 
Join Date: May 2015
Posts: 13
Thanks for the reply. I tried that. It seems that vizconnect calls the transport "wandmagiccarpet". So I am able to get at the node with thisTransport = vizconnect.getTransport("wandmagiccarpet").getNode ().

However, when I do something like thisTransport.setPosition(0,10,0), I see the scene translate, but it does not affect the frustums in the CAVE. What ends up happening is that because the tracker values are out of range, the floor screens do not display any of the scene. They only display the clear color on the floor screens. I am guessing that it is an edge case when the frustum has zero volume (only on the floor screens).

I am wondering how I could test for the tracker to be out of range, provide default values if it is, or otherwise use real-time tracker values if they are in range.
Reply With Quote
  #4  
Old 09-08-2023, 08:32 AM
apenngrace apenngrace is offline
Member
 
Join Date: May 2015
Posts: 13
Surprise! I finally figured out how to solve my issue! Our issue was that every time that we tried to test something in our CAVE, only a few screens would display an image and our floors would just show the clear color only. We would have to get up and wave the 3D glasses around every time we wanted to restart our program and see results.

We use Dtrack for our tracking system and VRPN to serve the data. I observed that when the glasses are out of range, it outputs [0,0,0] for the head position. I suspected that perhaps if the frustum top and bottom are on top of each other, the volume is 0 and not rendered.

I tried many things, such as digging through the cave objects, window objects, trying to mess with cave.update(), trying to look at getMatrix().getFrustum(). Nothing worked, especially since I could not get data from vizconnect regarding the windows on the remote system connecting over network with cluster master. I could not even get data when using maskedcontext and asking the client nodes to save data to disk.

Solution:
The thing that finally worked was messing with the tracker. The solution is to create a fake tracker, replace the "wrapped" tracker's reference to "raw" tracker to the fake tracker.

Code:
myGroup = viz.addGroup()
myGroup.setPosition([0,1,0])
wrapped = vizconnect.getTracker("dtrack_head")
raw_vrpn = wrapped.getRaw() # holding onto this to test if it changes from 0,0,0
wrapped.setRaw(myGroup)
I later wrote a class that starts a timer that watches if the VRPN value ever changes from [0,0,0] to other values. When that finally happens, it swaps the fake tracker and the raw vrpn tracker back.


Side Note:
I still do not quite know what the difference in terminology between the wrapped object and the raw object. They both seem like wrapped objects to me, so I was confused by this.

So apparently, there is a more generic "wrapped" tracker object, and the "raw" object is an object with characteristics specific to the particular hardware. It is VRPN and Dtrack in our case.
Reply With Quote
Reply


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
help with mouse as tracker position bbb Vizard 4 11-16-2015 04:32 PM
Intermittent orthographic stereo projection problems AySz88 Vizard 10 02-17-2012 01:50 PM
get tracker position and euler chris_user Vizard 2 07-01-2011 02:31 AM
Can you link the position of a tracker to the orientation of an object? michaelrepucci Vizard 1 09-19-2008 11:23 AM
Linking avatar 'bones' to a position tracker. zachhendershot Vizard 3 11-19-2003 10:26 PM


All times are GMT -7. The time now is 02:21 AM.


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