FreePie mouse emulator not working despite data feed
-
- One Eyed Hopeful
- Posts: 7
- Joined: Sat Jan 24, 2015 9:52 am
FreePie mouse emulator not working despite data feed
Hello,
I'm really new to all of this and am having trouble with getting my Android Smartphone working as a VR head tracking/mouse emulating device in conjunction with FreePie.
What i did was to first start the FreePie desktop app, then load up the mouse emulator script in it (in fact i already tried out a bunch of these since i'm not familar with coding myself, but none of them seem to work), then turn on the android FreePie IMU app afterwards - And then nothing happens.
I double-checked with Opentrack too to see if anything's wrong with the sensor feed, but the octupus animation there indicates that the android data is being received with no problems - Though as soon as i attempt to emulate the mouse and press "Run Script" in FreePie it stops moving again at the same time.
The odd thing is that according to the OpenTrack animation mentioned above all the data from the gyro/sensors seems to be getting received but for some reason it's not getting translated into mouse movements as it should. Not even an error report by FreePie or something along those lines, it's just that nothing happens at all when i run the FreePie mouse script and the FreePie IMU application at the same time.
Can anyone point out what i'm doing wrong or what's interfering with the mouse emulation process? I'd be very glad for any and all advice here... Should i opt for completely re-installing FreePie?
-Thanks in advance
I'm really new to all of this and am having trouble with getting my Android Smartphone working as a VR head tracking/mouse emulating device in conjunction with FreePie.
What i did was to first start the FreePie desktop app, then load up the mouse emulator script in it (in fact i already tried out a bunch of these since i'm not familar with coding myself, but none of them seem to work), then turn on the android FreePie IMU app afterwards - And then nothing happens.
I double-checked with Opentrack too to see if anything's wrong with the sensor feed, but the octupus animation there indicates that the android data is being received with no problems - Though as soon as i attempt to emulate the mouse and press "Run Script" in FreePie it stops moving again at the same time.
The odd thing is that according to the OpenTrack animation mentioned above all the data from the gyro/sensors seems to be getting received but for some reason it's not getting translated into mouse movements as it should. Not even an error report by FreePie or something along those lines, it's just that nothing happens at all when i run the FreePie mouse script and the FreePie IMU application at the same time.
Can anyone point out what i'm doing wrong or what's interfering with the mouse emulation process? I'd be very glad for any and all advice here... Should i opt for completely re-installing FreePie?
-Thanks in advance
-
- Petrif-Eyed
- Posts: 2166
- Joined: Mon Jun 22, 2009 8:36 am
- Location: Stockholm, Sweden
Re: FreePie mouse emulator not working despite data feed
You are trying to use Opentrack and FreePIE at the same time?
Opentrack and FreePIE are two different programs that try to solve the same problem.
Anyway, start simple, is this showing any data in watch window?
If you enable debug on the phone app do you see it receive data there?
Opentrack and FreePIE are two different programs that try to solve the same problem.
Anyway, start simple, is this showing any data in watch window?
Code: Select all
diagnostics.watch(android[0].googleYaw)
-
- One Eyed Hopeful
- Posts: 7
- Joined: Sat Jan 24, 2015 9:52 am
Re: FreePie mouse emulator not working despite data feed
Hello, and thanks for your reply! Oh i see, i didn't know those two programs would conflict with each other...CyberVillain wrote: If you enable debug on the phone app do you see it receive data there?
The debug option on the phone does indeed show all of the data being received from the phone sensors by the IMU application, but when i run the script from your post in Win7 the FreePie watch window there just says "android[0].googleYaw 0" and nothing besides that, it doesn't look like there's any data coming in? Does this indicate a faulty connection between the smartphone and the PC itself, e.g. a wrong port or target ip number?
-
- Petrif-Eyed
- Posts: 2166
- Joined: Mon Jun 22, 2009 8:36 am
- Location: Stockholm, Sweden
Re: FreePie mouse emulator not working despite data feed
Could be, have you ticked the checkbox saying "Send orientation"? Its required for googleYaw etc
-
- One Eyed Hopeful
- Posts: 7
- Joined: Sat Jan 24, 2015 9:52 am
Re: FreePie mouse emulator not working despite data feed
Thanks, i got it to work now. The problem seems to have been that i attempted to connect the smartphone via USB. I tried it over my wlan network only and now it's working after i changed the firewall rules.
The mouse movement is incredibly jittery though and jumps all over the place as if someone was wildly shaking the mouse, and i haven't found a way of lowering the sensitivity for it yet in either of the freepie clients... Is there such an option hidden somewhere? Or could the sensitivity be lowered via a python script too?
The mouse movement is incredibly jittery though and jumps all over the place as if someone was wildly shaking the mouse, and i haven't found a way of lowering the sensitivity for it yet in either of the freepie clients... Is there such an option hidden somewhere? Or could the sensitivity be lowered via a python script too?
-
- Petrif-Eyed
- Posts: 2166
- Joined: Mon Jun 22, 2009 8:36 am
- Location: Stockholm, Sweden
-
- One Eyed Hopeful
- Posts: 7
- Joined: Sat Jan 24, 2015 9:52 am
Re: FreePie mouse emulator not working despite data feed
This is the script i chose to use, i'm not sure if it's configured correctly though:CyberVillain wrote:Post your script please
Code: Select all
def update():
global yaw
global roll
global pitch
yaw = -android[0].googleYaw
roll = -android[0].googleRoll
pitch = android[0].googlePitch
if starting:
yaw = 0
roll = 0
pitch = 0
enabled = False
android[0].update += update
diagnostics.watch(yaw)
diagnostics.watch(roll)
diagnostics.watch(pitch)
deltaYaw = filters.delta(yaw)
deltaPitch = filters.delta(pitch)
deltaRoll = filters.delta(roll)
if (enabled):
mouse.deltaX = -deltaYaw*600
mouse.deltaY = -deltaRoll*1000
toggle = keyboard.getPressed(Key.M)
if toggle:
enabled = not enabled
-
- Petrif-Eyed
- Posts: 2166
- Joined: Mon Jun 22, 2009 8:36 am
- Location: Stockholm, Sweden
Re: FreePie mouse emulator not working despite data feed
Code: Select all
mouse.deltaX = -deltaYaw*600
mouse.deltaY = -deltaRoll*1000
-
- One Eyed Hopeful
- Posts: 7
- Joined: Sat Jan 24, 2015 9:52 am
Re: FreePie mouse emulator not working despite data feed
Welp, i went down all the way to 20*60 and it still made the weird movements afterwards, though not as massive/noticeable as they were before.
I think there might be something wrong with my smartphone's sensors, or maybe they're not precise enough. Is there an option somewhere to configure FreePie to run and send sensor data via USB tethered mode too? Maybe that would yield some better results...
I think there might be something wrong with my smartphone's sensors, or maybe they're not precise enough. Is there an option somewhere to configure FreePie to run and send sensor data via USB tethered mode too? Maybe that would yield some better results...
-
- Petrif-Eyed
- Posts: 2166
- Joined: Mon Jun 22, 2009 8:36 am
- Location: Stockholm, Sweden
Re: FreePie mouse emulator not working despite data feed
The idea is that the phone and computed shares network when tethered and you use FreePIE like normal but over cable.