PDA

View Full Version : Problems with linking Sensor to MainView


escmo
06-24-2013, 10:31 AM
Dear community,

I have problems linking a tracker to the MainView. I'm trying two approaches, none of them is working right now. I'm using a Nvisor SX 60 HMD with InertiaCube 2+ sensor.

The first approach is using a viztracker, extract from vizsetupcfg.py:

isense = viz.add('intersense.dle')
headori = isense.addTracker(port=10)
viz.link(headori, viz.MainView)

and simply a 'viztracker.go()' after importing viztracker. The sensor works as wanted, but the MainView is rooted in (0,2,0) which is not where I want it to be, and setting the position of MainView has no effect.

The second approach is updating the Euler of MainView manually without linking, in which case I can set the position of MainView as usual but the sensor keeps spinning around the z-axis without sensor movement.

Is there any solution to either of the two approaches?

Thanks very much in advance!

Jeff
06-24-2013, 11:04 AM
If you're using the viztracker method you can move the position of the user with the movable node. See the using viztracker (http://docs.worldviz.com/vizard/viztracker_usage.htm) page for more information.

Or you can link the viewpoint to the tracker and set the link mask to orientation. That will allow you to move the viewpoint position:
isense = viz.add('intersense.dle')
oriTracker = isense.addTracker()
viz.link(oriTracker,viz.MainView, mask = viz.LINK_ORI)
viz.MainView.setPosition([0,1.5,1])

escmo
06-25-2013, 01:15 AM
Thanks a lot Jeff, looks like I've missed that part of the documentation! That worked fine!