I'm trying to set up my Nexus 5 as a head track device.
I used to launch facetracknoir with the faceapi but the response is really low and it doesn't work in the dark. Anyway, it was working with both freetrack and trackIR protocols.
Now, I want to check if the sensors are ready for this kind of things so i've installed Wireless IMU and FreePIE IMU on the Nexus, and picked up here and there some parts of scripts :
As Wireless IMU doesn't seem to send readable data by FreePIE, I use FreePIE IMU.
Here both scripts for freetrack and trackir protocols.
Code: Select all
def update():
global yaw
yaw = android[0].yaw
global pitch
pitch = -android[0].roll
global roll
roll = android[0].pitch
if starting:
centerYaw = 0
centerPitch = 0
centerRoll = 0
yaw = 0
pitch = 0
roll = 0
android[0].update += update
freeTrack.yaw = yaw - centerYaw
freeTrack.pitch = pitch - centerPitch
freeTrack.roll = roll - centerRoll
if keyboard.getKeyDown(Key.LeftControl) and keyboard.getPressed(Key.C):
centerYaw = yaw
centerPitch = pitch
centerRoll = roll
diagnostics.watch(freeTrack.yaw)
diagnostics.watch(freeTrack.pitch)
diagnostics.watch(freeTrack.roll)
Code: Select all
def update():
global yaw
yaw = filters.deadband(math.degrees(filters.continuousRotation(android[0].googleYaw)), deadband)
global pitch
pitch = filters.deadband(math.degrees(-android[0].googlePitch), deadband)
global roll
roll = filters.deadband(math.degrees(-android[0].googleRoll), deadband)
if starting:
deadband = 0.01
centerYaw = 0
centerPitch = 0
centerRoll = 0
yaw = 0
pitch = 0
roll = 0
android[0].update += update
trackIR.yaw = yaw - centerYaw
trackIR.pitch = pitch - centerPitch
trackIR.roll = roll - centerRoll
if keyboard.getKeyDown(Key.LeftControl) and keyboard.getPressed(Key.C):
centerYaw = yaw
centerPitch = pitch
centerRoll = roll
diagnostics.watch(trackIR.yaw)
diagnostics.watch(trackIR.pitch)
diagnostics.watch(trackIR.roll)
The problem is that Elite doesn't recognize any of those..
May I have to use opentrack/facetracknoir in an "android>Freepie>opentrack>Elite" thing ?
Thanks for your future answers