Log in

View Full Version : Position of Oculus DK2 sensor


willpower2727
02-05-2016, 12:50 PM
System: Vizard 5, Oculus DK2, runtime 0.8

Does anyone know what the default position is for the Oculus motion tracker? I am using practically the same code as the oculusExample.py except I am loading my own scene instead of the piazza. What I can't figure out is how Vizard is deciding where to place the origin of the sensor? Can I change it?

Thanks in advance for anyone who can help with this.

Jeff
02-08-2016, 11:25 AM
If the position is good in the piazza but not your own scene, it's likely an issue with the model. Your model may not be exported at the origin in the modeling software or the units may be different than Vizard and the scaling is off. You can look in Inspector to see if the model is offset from the origin and check the model size in meters.

willpower2727
02-08-2016, 12:33 PM
Thank you Jeff, I will look at the inspector to see if there is an issue with my models.

But is there a way to move the DK2 camera around within the vizard space? Is there a command analogous to:

hmdSensor.setPosition(x,y,z)
hmdSensor.setEuler(a,b,c)

Here is a link to a more detailed version of my question:

http://stackoverflow.com/questions/35271758/set-the-position-of-the-oculus-dk2-sensor-in-vizard5

Jeff
02-10-2016, 06:21 AM
You could get a handle to the link associated with the oculus tracker and apply an offset to that:

link = vizconnect.getTracker('dk2').getLink()
# clear link offsets
link.reset(viz.RESET_OPERATORS)
# apply offset
link.postTrans([0, 0, 4])