PDA

View Full Version : sensor linking question


smith11235
07-17-2008, 11:33 AM
Hey,
I've found some other posts/examples that seem to take a complicated approach to what I am trying to do and was hoping if someone could tell me if the following simple approach was possible:

I have an emagine 3d visor and also a polhemus motion tracker.

I have successfully linked the main view to both of these devices separately as follows:

polhemus = viz.add('polhemus.dle);
patriot = polhemus.addPatriot();
link = viz.link(patriot,viz.MainView);

And also in another script:
emagin = viz.add('emagin.dls');
viz.link(emagin, viz.MainView);


However, what I would like to do is control the 'head view' of the world with the emagine sensors, and the movement with the Patriot sensor ideally with something similar to the following:

emagin = viz.add('emagin.dls');
viz.link(emagin, viz.HeadView);#attach users 'eyes' to visor

polhemus = viz.add('polhemus.dle);
patriot = polhemus.addPatriot();
link = viz.link(patriot,viz.Body);#let user move independently of where they are looking

I am hoping that this is just a matter of linking the correct objects which have so far eluded me to the sensors.

Any pointers would be greatly appreciated.

Thank you in advance

farshizzo
07-17-2008, 11:37 AM
To be clear, you want the orientation of the viewpoint to come from the emagin and the position to come from the patriot?

smith11235
07-17-2008, 11:38 AM
yes, that would be correct.

farshizzo
07-17-2008, 11:41 AM
Then the simplest solution would be to use the viz.mergeLinkable command. Have a look in the docs for an explanation. Here is some simple code showing how to use it:#Combine position of patriot and ori of emagin into one sensor
tracker = viz.mergeLinkable(patriot,emagin)

#Link tracker to main viewpoint
headLink = viz.link(tracker,viz.MainView)

smith11235
07-24-2008, 09:28 AM
Thanks for your help. That worked great, I had missed that function while looking through the help files.

francesco.alett
05-30-2011, 04:57 AM
hi! i have a an emagin z800 3d visor and a polhemus tracker too; both are working (can see the desktop in the eye-screen an so on...) i'm trying to run the script as you suggested, but i read this error message in the output box when launching:

polhemus.dle Polhemus Extension
** ERROR: Failed to connect to a Patriot/Liberty: Device not found
** ERROR: Failed to create extension sensor with polhemus.dle
** ERROR: Link failed (source linkable is invalid)
emagin.dls eMagin v2.0
** ERROR: Could not connect to eMagin device. Error: 80000017
** ERROR: Link failed (source linkable is invalid)

could you help me please? thank you very much

Jeff
05-31-2011, 04:58 PM
Vizard is not able to connect to either the Polhemus or Emagin sensors.

Polhemus - Test with the following script:
import viz
viz.go()

polhemus = viz.add('polhemus.dle')
patriot = polhemus.addPatriot()
viz.link(patriot,viz.MainView)

If you get errors verify that you can connect to the Polhemus device in PiMgr. When running Vizard, PiMgr should be closed.

Emagin - Try the following:
import viz
viz.go()

emagin = viz.add('emagin.dls')
viz.link(emagin,viz.MainView)

Do you get errors? Have you installed the USB drivers for the Emagin sensor?