problem with roll (FreePie UDP)
Posted: Tue Dec 20, 2016 12:20 pm
Hi
Im having problems with the roll, the camera appears to be either slanted or it doesnt center back after moving my head, I have to roll my head to the other size to compensate and recenter the view, its very tripy...
Im using the FreePie UDP sender app with a MagicSee M1 (all In one HMD) and this is my script:
I adapted the code from a script I found on this forum, originaly the Z (roll) variable had the "y_offset" variable added just like the Y variable but I took that out because it made my camera slanted like 90ยบ!!!
Please HAlP!
Im having problems with the roll, the camera appears to be either slanted or it doesnt center back after moving my head, I have to roll my head to the other size to compensate and recenter the view, its very tripy...
Im using the FreePie UDP sender app with a MagicSee M1 (all In one HMD) and this is my script:
Code: Select all
import time
def update(): #assigned to the Android update
global t_prev_A
t_delta_A=time.time()-t_prev_A #deltatime for the android update
t_prev_A = time.time()
preX = filters.deadband(android[0].raw.gx*t_delta_A,deadbandX) #android polling with conversion to degrees and low pass filter
global x
x +=preX*multiply #results of the android polling adjusted with senstitivity
preY = android[0].googleRoll #android polling in radians - same as VireioSMT
y = -preY*multiply-y_offset #results of the android polling adjusted with senstitivity
preZ = android[0].googlePitch #android polling - same as VireioSMT
z = -preZ*multiply #results of the android polling adjusted with senstitivity
diagnostics.watch(x)
diagnostics.watch(y)
diagnostics.watch(y)
vireioSMT.yaw = -(android[0].googleYaw)
vireioSMT.pitch = y
vireioSMT.roll = z
# if keyboard.getPressed(Key.RightArrow):
# vireioSMT.x += 10
if starting:
android[0].update += update
multiply = 1
t_delta_A=time.time()
t_prev_A=time.time()
y_offset=math.pi*0.5
deadbandX = 0
x=0
Please HAlP!