WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 03-19-2011, 01:07 PM
Salvar Salvar is offline
Member
 
Join Date: Nov 2010
Posts: 20
How can I link MainView with HMD and a 3d node?

Hi all,

I've hit a technical snag in the research project I'm currently working on.

I have a virtual environment, containing a 3d node (car). The car is controlled by a custom action class I wrote for it.

To keep the viewpoint in tandem with the car, I have viz.MainView linked with the car. Everything works well and good. I move the car, mainview moves with it.

Now, I want to add HMD head-tracking into the mix. And that seems to be tricky. If I link the mainview with the HMD tracker after linking to the car, the car link breaks and it doesn't move with the car anymore. And vice versa.

How can I get these two things to work together?
Reply With Quote
  #2  
Old 03-21-2011, 09:23 AM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
Is the tracker on the HMD 6DOF or 3DOF orientation? Either way, to integrate HMD tracking you should just need to use the <link>.preMultLinkable command. After you have setup the link between the car and the viewpoint, just add the following code:
Code:
view_link.preMultLinkable(tracker)
The HMD tracker data should now be applied relative to the car orientation.
Reply With Quote
  #3  
Old 03-22-2011, 12:13 PM
Salvar Salvar is offline
Member
 
Join Date: Nov 2010
Posts: 20
Quote:
Originally Posted by farshizzo View Post
Is the tracker on the HMD 6DOF or 3DOF orientation? Either way, to integrate HMD tracking you should just need to use the <link>.preMultLinkable command. After you have setup the link between the car and the viewpoint, just add the following code:
Code:
view_link.preMultLinkable(tracker)
The HMD tracker data should now be applied relative to the car orientation.
Thanks for the response.

I was hoping for the solution to be something simple as this, but it gives me an error saying that the tracker object (added with the command "polhemus = viz.add('polhemus.dle')") is not a linkable.

Is there any way to make it linkable?
Reply With Quote
  #4  
Old 03-22-2011, 12:20 PM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
That is because the polhemus object is not linkable, it is an extension. Have a look at the documentation for the polhemus plugin on how to connect to a polhemus tracker. You never mentioned which tracker you are using, but the documentation page should describe how to connect to all supported polhemus trackers.
Reply With Quote
  #5  
Old 03-22-2011, 12:31 PM
Salvar Salvar is offline
Member
 
Join Date: Nov 2010
Posts: 20
Oh, wait. I was trying to link to the extension, not the liberty tracker itself. Awkward.

I don't have access to the tracker to test this now, but it runs without the linking error now. Here's hoping.

Thanks for the help.
Reply With Quote
  #6  
Old 03-22-2011, 08:14 PM
Salvar Salvar is offline
Member
 
Join Date: Nov 2010
Posts: 20
Just to close this thread, I tried the preMultLinkable call you suggested and it worked perfectly. I had to apply a preEuler command to the link first, but after that it was gravy.

Thanks!
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 02:59 PM.


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