WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 06-22-2007, 11:04 AM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
Hi,

Vizard 3.0 has an entirely new interface for linking trackers to views and nodes. To link the tracker to the viewpoint with the specified offset you would do something like the following:
Code:
viewLink = viz.link(tracker,viz.MainView)
viewLink.preTrans(LED_CAMERA_OFFSET)
Reply With Quote
  #2  
Old 06-22-2007, 12:02 PM
Andrey Andrey is offline
Member
 
Join Date: Apr 2007
Posts: 21
Please take a look at the code:

view = viz.get(viz.MAIN_VIEWPOINT)
led1 = viz.add('vizppt.dls')
PORT_INTERSENSE = 2
gyro = viz.add('intersense.dls')
LED_CAMERA_OFFSET = [0,-0.15,0.25]
viewLink = viz.link(gyro,viz.MainView)
viewLink.preTrans(LED_CAMERA_OFFSET)
viz.tracker()

What is wrong?
Reply With Quote
  #3  
Old 06-22-2007, 12:11 PM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
Hi,

Try the following code:
Code:
led1 = viz.add('vizppt.dls')
PORT_INTERSENSE = 2
gyro = viz.add('intersense.dls')
LED_CAMERA_OFFSET = [0,-0.15,0.25]
viewLink = viz.link(viz.mergeLinkable(led1,gyro),viz.MainView)
viewLink.preTrans(LED_CAMERA_OFFSET)
You do not need to use viz.tracker() when using links. Also, you need to combine the ppt and intersense tracker into a single 6DOF object. This is what the viz.mergeLinkable command does.
Reply With Quote
  #4  
Old 06-22-2007, 12:27 PM
Andrey Andrey is offline
Member
 
Join Date: Apr 2007
Posts: 21
Thank you, the offset works. But how to "incline" viewvector (cameras orientation differs from InertiaCube orientaion)?
Reply With Quote
  #5  
Old 06-22-2007, 12:32 PM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
Hi,

You can apply a offset rotation to the intersense by adding the following code:
Code:
viewLink.preEuler([0,-5,0],target=viz.LINK_ORI_OP) #Tilt intersense 5 degrees up
Reply With Quote
  #6  
Old 06-22-2007, 01:01 PM
Andrey Andrey is offline
Member
 
Join Date: Apr 2007
Posts: 21
Thanks a lot. Problem is solved.
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


All times are GMT -7. The time now is 09:21 PM.


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