Full (yeah, well) Wiimote Support in FreePIE

Official forum for open source FreePIE discussion and development.
konstantin_lozev
Cross Eyed!
Posts: 192
Joined: Fri Jul 04, 2014 1:43 am

Re: Full (yeah, well) Wiimote Support in FreePIE

Post by konstantin_lozev »

CyberRascal wrote:konstantin_lozev:

Thanks for being enthusiastic! Always more fun to work with something that someone wants to use :)

Right now I calculate deadband and scale values according to the deadband cutoff, this seems to make the motionplus a lot calmer without actually being sluggish / unresponsive, so it might be the way to go. Maybe I will rewrite the wiimote API so that we have motionplus.pitch etc and also motionplus.raw.pitch or similar. I will just have to choose the appropriate "rawness" of the raw values... Wiimote motionplus gives away values in the 4000-16000 unsigned integer range, and I calculate the zero-point offset when wiimote is stable. The gain is fixed, however.

Tell me what type of values you want and I will make sure you have them available. Logging should be easy enough using diagnostics.debug(value) for example.

Have a nice vacation!

NeoTokyo_Nori:

I looked through the topic but couldn't find any questions at first glance, but maybe I am blind! Could you post them again?

Regarding the quote you aksed about: When keeping the wiimote still, there is not that much drift. I am not sure what to do about drift when in motion however. I'm not sure how good tracking we can get with the gyro sensor only. I am not an expert on IMUs or AHRS so I'm not sure if we can use the IR sensor or acc sensor to recalibrate automatically.
Hi, CyberRascal and thanks for the follow-up! I think there are not that many alternatives to the wiimote, so there is great potential for it now that VR is picking up, I hope. I am personally not willing to invest into Oculus hardware unless there is a capable gun with it.
On the exposure of raw gyro and accelerometer data, I think it might be extremely useful in these early stages of FreePIE development. As I wrote, the pitch readings can be approximated with the aSin of the gravity exerted on the front of the wiimote, measured by the accelerometer, so in theory we have two independent readings and the one can be used as control for the other. For that, however, we would need exposure of raw values, and not pre-çorrected of one vs the other.
Maybe I am too optimistic, but I think with some effort we can do it.
Btw, here is the one-liner in GlovePIE, I tried to convert it to FreePIE, maybe even without the smooth function initially but I got an error:
Mouse.DirectInputY -= smooth(Delta(aSin(wiimote.gz) in radians)*500,5)
NeoTokyo_Nori
Cross Eyed!
Posts: 144
Joined: Wed Jul 16, 2014 10:29 am
Location: Tokyo, Japan

Re: Full (yeah, well) Wiimote Support in FreePIE

Post by NeoTokyo_Nori »

CyberRascal wrote:konstantin_lozev:
I looked through the topic but couldn't find any questions at first glance, but maybe I am blind! Could you post them again?

Regarding the quote you aksed about: When keeping the wiimote still, there is not that much drift. I am not sure what to do about drift when in motion however. I'm not sure how good tracking we can get with the gyro sensor only. I am not an expert on IMUs or AHRS so I'm not sure if we can use the IR sensor or acc sensor to recalibrate automatically.
Hi CR!
Sorry, about that, my main problem a while back was I could not get
wiimotionplus and nunchuck to work at the same time.
Only one or the other would work. Is that a known issue, or just me?

BTW I just got DK2 working with the new code that your brother wrote,
and am happy to say, drift is not a problem there :D

There are still other issues I need to sort out, like poor frame rate, so all is not perfect quite yet,
but will be working on the gun controller side soon too.

But the thing is, I am now trying to do it with an arduino IMU (Sparkfun Razor) solution,
because there are limitations to the wiimote (such as size) that makes
it not possible for me to use in the way that I want to.

The AHRS code that is used for the Razor seems like it has a lot of potential,
so I am keeping my fingers crossed :!:
Do take a look when you can.
https://github.com/ptrbrtz/razor-9dof-a ... i/Tutorial
CyberVillain
Petrif-Eyed
Posts: 2166
Joined: Mon Jun 22, 2009 8:36 am
Location: Stockholm, Sweden

Re: Full (yeah, well) Wiimote Support in FreePIE

Post by CyberVillain »

NeoTokyo_Nori wrote: The AHRS code that is used for the Razor seems like it has a lot of potential,
so I am keeping my fingers crossed :!:
Do take a look when you can.
https://github.com/ptrbrtz/razor-9dof-a ... i/Tutorial
I started a port of their fusion a while back, but never got it to work, the code can be fund here if anyone want to have a go at it

https://github.com/AndersMalmgren/FreeP ... orAhrsPort
NeoTokyo_Nori
Cross Eyed!
Posts: 144
Joined: Wed Jul 16, 2014 10:29 am
Location: Tokyo, Japan

Re: Full (yeah, well) Wiimote Support in FreePIE

Post by NeoTokyo_Nori »

CyberVillain wrote: I started a port of their fusion a while back, but never got it to work,
Hi CV !

You made me confused. I thought I got some readings from this code a while ago.

Code: Select all

def update():
   diagnostics.watch(ahrsImu.yaw)
   diagnostics.watch(ahrsImu.pitch)
   diagnostics.watch(ahrsImu.roll)

if starting:
   ahrsImu.update += update
or am I mistaken?
I have not checked it again today yet.
CyberVillain
Petrif-Eyed
Posts: 2166
Joined: Mon Jun 22, 2009 8:36 am
Location: Stockholm, Sweden

Re: Full (yeah, well) Wiimote Support in FreePIE

Post by CyberVillain »

NeoTokyo_Nori wrote:
CyberVillain wrote: I started a port of their fusion a while back, but never got it to work,
Hi CV !

You made me confused. I thought I got some readings from this code a while ago.

Code: Select all

def update():
   diagnostics.watch(ahrsImu.yaw)
   diagnostics.watch(ahrsImu.pitch)
   diagnostics.watch(ahrsImu.roll)

if starting:
   ahrsImu.update += update
or am I mistaken?
I have not checked it again today yet.
I tried to port the fusion from the Razor firmware so that it couldm be used for Android or Wiimote. But never got it to work.
NeoTokyo_Nori
Cross Eyed!
Posts: 144
Joined: Wed Jul 16, 2014 10:29 am
Location: Tokyo, Japan

Re: Full (yeah, well) Wiimote Support in FreePIE

Post by NeoTokyo_Nori »

Oh, ok I forgot that AHRS code is running on the arduino :lol:

Anyway, I am very excited that you got the DK2 code to work :!: :D
Does the position data show up too ?

Very tired now, so I will do more tomorrow !
NeoTokyo_Nori
Cross Eyed!
Posts: 144
Joined: Wed Jul 16, 2014 10:29 am
Location: Tokyo, Japan

Re: Full (yeah, well) Wiimote Support in FreePIE

Post by NeoTokyo_Nori »

Hi,

I just need to check if it is safe to put CRs new code
FreePIE-2014-08-16.MotionPlusCalibrationFix.V1.rar
into the pylib folder of CVs new DK2 code?

I pulled my wiimotes out of the closet,
and finally got them working again, so I will try out CRs new code with it.

btw I have given up on using the nunchuck.
instead I will be using 2 wiimotes together, which seems to be working ok so far :) .
CyberVillain
Petrif-Eyed
Posts: 2166
Joined: Mon Jun 22, 2009 8:36 am
Location: Stockholm, Sweden

Re: Full (yeah, well) Wiimote Support in FreePIE

Post by CyberVillain »

That won't work, they both have changes to the plugin dll. But once you guys have confirmed that DK2 translation is working and that CRs fixes are an improvement I will merge the code and release a new version of FreePIE
konstantin_lozev
Cross Eyed!
Posts: 192
Joined: Fri Jul 04, 2014 1:43 am

Re: Full (yeah, well) Wiimote Support in FreePIE

Post by konstantin_lozev »

CyberVillain wrote:That won't work, they both have changes to the plugin dll. But once you guys have confirmed that DK2 translation is working and that CRs fixes are an improvement I will merge the code and release a new version of FreePIE
hi, CyberVillain, I am not sure whether I understood what you mean for the new release. Do you mean that the new deadband approach will always be there regardless whether you have it in your script or not? Or will it be implemented as a new fusion? I think there would be times where people would prefer not to have it, if they wanted to implement their own deadband, for whatever reason...
As we discussed, I think it would be good to have access to the raw values too.
GameDevKev
One Eyed Hopeful
Posts: 7
Joined: Wed Aug 20, 2014 8:51 pm

Re: Full (yeah, well) Wiimote Support in FreePIE

Post by GameDevKev »

Hi guys, newb here, just got my wiimote in the mail today after reading about freepie last week.

I've been using the standard buttons flawlessly, works great! Other than this thread is there anywhere that people are swapping scripts for specific games? I would like to take a look at what people are using for fps's and Skyrim, gta, etc.

I am working on making my wii remote execute a button click when swung like a sword. (thought this would be uber fun in skyrim after seeing someone else doing it on youtube). I thought I could use the accelerometer script to accomplish this, but after testing the script, all the accelerometer does is measure the tilt of the remote forward/back left/right? Should this not be part of the motion plus gyro? I was under the impression that an accelerometer measures acceleration. Is it just an emulated accelerometer? Am I missing something?

Thanks for not flaming me for asking what might seem like obvious questions to most of you, keep up the great work!
-Kev
NeoTokyo_Nori
Cross Eyed!
Posts: 144
Joined: Wed Jul 16, 2014 10:29 am
Location: Tokyo, Japan

Re: Full (yeah, well) Wiimote Support in FreePIE

Post by NeoTokyo_Nori »

GameDevKev wrote: I am working on making my wii remote execute a button click when swung like a sword. (thought this would be uber fun in skyrim after seeing someone else doing it on youtube). I thought I could use the accelerometer script to accomplish this, but after testing the script, all the accelerometer does is measure the tilt of the remote forward/back left/right? Should this not be part of the motion plus gyro? I was under the impression that an accelerometer measures acceleration. Is it just an emulated accelerometer? Am I missing something?
Hello GameDevKev,
Here is something to get you started
http://www.mtbs3d.com/phpBB/viewtopic.php?f=139&t=19453

I dont know if there is something for a sword yet, but that is something I am interested in
doing, after I get my gun controller sorted out.

btw, do you have any experience using glovepie?
just need to know as a point of reference.
konstantin_lozev
Cross Eyed!
Posts: 192
Joined: Fri Jul 04, 2014 1:43 am

Re: Full (yeah, well) Wiimote Support in FreePIE

Post by konstantin_lozev »

yeah, GlovePIE has built-in gesture recognition, it even had some generic gesture recording. I have a few ideas how those have been implemented, but have not tried to replicate them in a script. A gesture recording may be a good feature for FreePIE
CyberVillain
Petrif-Eyed
Posts: 2166
Joined: Mon Jun 22, 2009 8:36 am
Location: Stockholm, Sweden

Re: Full (yeah, well) Wiimote Support in FreePIE

Post by CyberVillain »

konstantin_lozev wrote: hi, CyberVillain, I am not sure whether I understood what you mean for the new release.

All the relevant code both for DK2 and the wiimote fusion stuff is in the plugin dll so you cant merge them two without merging the two in code and then recompile. But I need to know that all is workign first before I do that. So it would be great if you guys that have the DK2 can test positional tracking and you that have the wiimote can test the new calibration and report back here so that I can bring in CR's changes into the master repository
NeoTokyo_Nori
Cross Eyed!
Posts: 144
Joined: Wed Jul 16, 2014 10:29 am
Location: Tokyo, Japan

Re: Full (yeah, well) Wiimote Support in FreePIE

Post by NeoTokyo_Nori »

Hi,
For some reason, I am not able to get any data from my wiimote IMUs. :(
2 wiimotes are conneted and the buttons on both wiimotes are working ok.
I had this issue from a couple of months ago too, when I was trying things.

http://i.imgur.com/GG4XfKH.jpg

I need to determine if I damaged the hardware,
or if is on the software side...

But as you can see, there is no IMU data from the second wiimote either,
so it seems less likely that both are damaged..

Any ideas would help. :idea:
NeoTokyo_Nori
Cross Eyed!
Posts: 144
Joined: Wed Jul 16, 2014 10:29 am
Location: Tokyo, Japan

Re: Full (yeah, well) Wiimote Support in FreePIE

Post by NeoTokyo_Nori »

Hmm,
So I just thought of trying commenting out the enable motionplus code,
which was really counter-intuitive, since I really want to use it

Code: Select all

#   wiimote[0].enable(WiimoteCapabilities.MotionPlus)
then the acceleration data started to come through :!:
http://i.imgur.com/pK6Dcbw.jpg

So made some progress..
But it does look like the enable motionplus and extension part of the code causes problems for me.
:roll:
GameDevKev
One Eyed Hopeful
Posts: 7
Joined: Wed Aug 20, 2014 8:51 pm

Re: Full (yeah, well) Wiimote Support in FreePIE

Post by GameDevKev »

Here is something to get you started
http://www.mtbs3d.com/phpBB/viewtopic.php?f=139&t=19453

I dont know if there is something for a sword yet, but that is something I am interested in
doing, after I get my gun controller sorted out.

btw, do you have any experience using glovepie?
just need to know as a point of reference.

Thanks, I skippped GlovePie thinking that it is so old that FreePie must be the way to go. But I took your advice, tried Glovepie, and read some documentation about the accelerometer, and I am much less confused now. Thanks!
NeoTokyo_Nori
Cross Eyed!
Posts: 144
Joined: Wed Jul 16, 2014 10:29 am
Location: Tokyo, Japan

Re: Full (yeah, well) Wiimote Support in FreePIE

Post by NeoTokyo_Nori »

konstantin_lozev wrote:yeah, GlovePIE has built-in gesture recognition, it even had some generic gesture recording.
I have a few ideas how those have been implemented, but have not tried to replicate them in a script.
A gesture recording may be a good feature for FreePIE
Yeah, gesture recording/recognition would be very good to have for Freepie.
Things like "swing up" "swing down" are much easier to make use of.

We could also apply this to detecting jumping using Oculus, which is something I want to do,
as well as possibly walking, running motions etc.

Lots to do, lots to do. :)
GameDevKev
One Eyed Hopeful
Posts: 7
Joined: Wed Aug 20, 2014 8:51 pm

Re: Full (yeah, well) Wiimote Support in FreePIE

Post by GameDevKev »

konstantin_lozev wrote:yeah, GlovePIE has built-in gesture recognition, it even had some generic gesture recording. I have a few ideas how those have been implemented, but have not tried to replicate them in a script. A gesture recording may be a good feature for FreePIE
Or if someone were to make some gesture functions and share them.

I wish I could be of more help, or maybe I can? I am a web developer, noticed that freePIE is kinda all over the place. I am going to be developing with the oculus rift, and I would love to see this project make some leaps. I could build the official website for you's guys, and get it in the SERPs. I think that if there was a more evident "home" of FreePIE, you might get more members active in development. When googling freepie, a pie festival comes up 3rd results. I would like to see the top 10 results all being related to this program. CyberVillain or CyberRascal, send me an email [ kevingulling A7 h0tmai1 ] if you are interested and we can talk more about it.

"If you build it, they will come"
NeoTokyo_Nori
Cross Eyed!
Posts: 144
Joined: Wed Jul 16, 2014 10:29 am
Location: Tokyo, Japan

Re: Full (yeah, well) Wiimote Support in FreePIE

Post by NeoTokyo_Nori »

GameDevKev wrote: Thanks, I skippped GlovePie thinking that it is so old that FreePie must be the way to go. But I took your advice, tried Glovepie, and read some documentation about the accelerometer, and I am much less confused now. Thanks!
Yeah, glovepie has a lot of good features, and is a good starting point for this stuff,
but for whatever reason, it seems to be pretty dead now.
So thats why I came to freepie too.
So we need to make freepie more alive !
(Dk2 support is pretty cool, eh?) 8-)
CyberVillain
Petrif-Eyed
Posts: 2166
Joined: Mon Jun 22, 2009 8:36 am
Location: Stockholm, Sweden

Re: Full (yeah, well) Wiimote Support in FreePIE

Post by CyberVillain »

Thanks for the offer GameDevKev, we have a Homepage that works pretty well. If you really wanna help we could need it with the FreePIE program itself. If you know C++ and C# that would be awsome
GameDevKev
One Eyed Hopeful
Posts: 7
Joined: Wed Aug 20, 2014 8:51 pm

Re: Full (yeah, well) Wiimote Support in FreePIE

Post by GameDevKev »

CyberVillain wrote:Thanks for the offer GameDevKev, we have a Homepage that works pretty well. If you really wanna help we could need it with the FreePIE program itself. If you know C++ and C# that would be awsome
Where is the homepage? You mean github?

I do not know C++ or C# :( I'll keep an eye on the development though, and if I can contribute anywhere in the testing I'm happy to.
CyberVillain
Petrif-Eyed
Posts: 2166
Joined: Mon Jun 22, 2009 8:36 am
Location: Stockholm, Sweden

Re: Full (yeah, well) Wiimote Support in FreePIE

Post by CyberVillain »

I just tried to Google freepie with a us proxy and incognito tab and the first hit is the homepage.

Same thing if I do it from Swedish Google.

The homepage is here, we get 3500 hits each month and about 1500 downloads
http://andersmalmgren.github.io/FreePIE


You are welcome to see if you can do any search engine optimization or other improvements
konstantin_lozev
Cross Eyed!
Posts: 192
Joined: Fri Jul 04, 2014 1:43 am

Re: Full (yeah, well) Wiimote Support in FreePIE

Post by konstantin_lozev »

CyberVillain wrote:
konstantin_lozev wrote: hi, CyberVillain, I am not sure whether I understood what you mean for the new release.

All the relevant code both for DK2 and the wiimote fusion stuff is in the plugin dll so you cant merge them two without merging the two in code and then recompile. But I need to know that all is workign first before I do that. So it would be great if you guys that have the DK2 can test positional tracking and you that have the wiimote can test the new calibration and report back here so that I can bring in CR's changes into the master repository
Hi, sorry for the noob question again, I have zero experience how the testing and development of freePIE works. I can't understand what I should be testing,i.e. shall I load the mouse script with the built-in deadband? Would there not be two deadband implementations then - one in the script and (if I understood correctly) another one in the build itself. My intuition would be to have deadband implemented only in a script, since then everyone can tweak it to his own liking...
I am sure my confusion comes from my ignorance, but I will be very grateful if you could explain.
konstantin_lozev
Cross Eyed!
Posts: 192
Joined: Fri Jul 04, 2014 1:43 am

Re: Full (yeah, well) Wiimote Support in FreePIE

Post by konstantin_lozev »

NeoTokyo_Nori wrote:
konstantin_lozev wrote:yeah, GlovePIE has built-in gesture recognition, it even had some generic gesture recording.
I have a few ideas how those have been implemented, but have not tried to replicate them in a script.
A gesture recording may be a good feature for FreePIE
Yeah, gesture recording/recognition would be very good to have for Freepie.
Things like "swing up" "swing down" are much easier to make use of.

We could also apply this to detecting jumping using Oculus, which is something I want to do,
as well as possibly walking, running motions etc.

Lots to do, lots to do. :)
Yeah, fully agree with that. My idea of on-the-fly switching between Rift/Dive and wiimote-gun when you have iron sights on/off can be implemented to detect the button press that is bound to the iron sights button of the game (usually nunchuk.z), but it will be even cooler to bind that button to bringing the wiimote up to your cheek.
But as you say, we are a long way from that yet, having to solve drift issues first.
konstantin_lozev
Cross Eyed!
Posts: 192
Joined: Fri Jul 04, 2014 1:43 am

Re: Full (yeah, well) Wiimote Support in FreePIE

Post by konstantin_lozev »

GameDevKev wrote: Or if someone were to make some gesture functions and share them.
As I said, I have a few ideas how this could be done, but this is only a hobby for me and I am not even IT as a profession. I think a gesture is basically a data series of the readings of the IMU for a fixed (large) number of frames. Every data series has statistical properties that describe it, so it's a matter of detecting those properties within a margin that allows for some variation.
That's only an idea though...
NeoTokyo_Nori
Cross Eyed!
Posts: 144
Joined: Wed Jul 16, 2014 10:29 am
Location: Tokyo, Japan

Re: Full (yeah, well) Wiimote Support in FreePIE

Post by NeoTokyo_Nori »

konstantin_lozev wrote: My idea of on-the-fly switching between Rift/Dive and wiimote-gun when you have iron sights on/off can be implemented to detect the button press that is bound to the iron sights button of the game (usually nunchuk.z), but it will be even cooler to bind that button to bringing the wiimote up to your cheek.
yeah, this is actually an obvious "must have" feature for anyone into fps gaming,
since you do not want to be "aiming with your face" for the entire time, when you should be
aiming with your GUN ! ;)

I already have a solution for that, and have been working on implementing it for a while.
Hopefully will be done soon. :)
konstantin_lozev
Cross Eyed!
Posts: 192
Joined: Fri Jul 04, 2014 1:43 am

Re: Full (yeah, well) Wiimote Support in FreePIE

Post by konstantin_lozev »

NeoTokyo_Nori wrote:
konstantin_lozev wrote: My idea of on-the-fly switching between Rift/Dive and wiimote-gun when you have iron sights on/off can be implemented to detect the button press that is bound to the iron sights button of the game (usually nunchuk.z), but it will be even cooler to bind that button to bringing the wiimote up to your cheek.
yeah, this is actually an obvious "must have" feature for anyone into fps gaming,
since you do not want to be "aiming with your face" for the entire time, when you should be
aiming with your GUN ! ;)

I already have a solution for that, and have been working on implementing it for a while.
Hopefully will be done soon. :)
True, but most Rift youtubers I have seen do aim with their face :-)
Actually, the switch can simply shift the relative weight from Rift to Wiigun, leaving some residual control to the "secondary" controller, but that's window dressing. First we need driftless wiigun.
konstantin_lozev
Cross Eyed!
Posts: 192
Joined: Fri Jul 04, 2014 1:43 am

Re: Full (yeah, well) Wiimote Support in FreePIE

Post by konstantin_lozev »

NeoTokyo_Nori wrote:Hmm,
So I just thought of trying commenting out the enable motionplus code,
which was really counter-intuitive, since I really want to use it

Code: Select all

#   wiimote[0].enable(WiimoteCapabilities.MotionPlus)
then the acceleration data started to come through :!:
http://i.imgur.com/pK6Dcbw.jpg

So made some progress..
But it does look like the enable motionplus and extension part of the code causes problems for me.
:roll:
FreePIE not detecting your motionplus correctly? What about GlovePIE?
CyberVillain
Petrif-Eyed
Posts: 2166
Joined: Mon Jun 22, 2009 8:36 am
Location: Stockholm, Sweden

Re: Full (yeah, well) Wiimote Support in FreePIE

Post by CyberVillain »

NeoTokyo_Nori wrote:Hmm,
So I just thought of trying commenting out the enable motionplus code,
which was really counter-intuitive, since I really want to use it

Code: Select all

#   wiimote[0].enable(WiimoteCapabilities.MotionPlus)
then the acceleration data started to come through :!:
http://i.imgur.com/pK6Dcbw.jpg

So made some progress..
But it does look like the enable motionplus and extension part of the code causes problems for me.
:roll:
its Rascal thats the expert on the wiimote codebase, but I think you need both Extension and Mplus for Acc and mplus

Code: Select all

wiimote[0].enable(WiimoteCapabilities.Extension | WiimoteCapabilities.MotionPlus)
CyberVillain
Petrif-Eyed
Posts: 2166
Joined: Mon Jun 22, 2009 8:36 am
Location: Stockholm, Sweden

Re: Full (yeah, well) Wiimote Support in FreePIE

Post by CyberVillain »

konstantin_lozev wrote:
CyberVillain wrote:
konstantin_lozev wrote: hi, CyberVillain, I am not sure whether I understood what you mean for the new release.

All the relevant code both for DK2 and the wiimote fusion stuff is in the plugin dll so you cant merge them two without merging the two in code and then recompile. But I need to know that all is workign first before I do that. So it would be great if you guys that have the DK2 can test positional tracking and you that have the wiimote can test the new calibration and report back here so that I can bring in CR's changes into the master repository
Hi, sorry for the noob question again, I have zero experience how the testing and development of freePIE works. I can't understand what I should be testing,i.e. shall I load the mouse script with the built-in deadband? Would there not be two deadband implementations then - one in the script and (if I understood correctly) another one in the build itself. My intuition would be to have deadband implemented only in a script, since then everyone can tweak it to his own liking...
I am sure my confusion comes from my ignorance, but I will be very grateful if you could explain.
The deadband in script has nothing todo with Rascals fix. What he does is to capture the drift during the calibration phase. And then uses that as a deadband internally in the wiimote code. So you can remove the deadband from script.
NeoTokyo_Nori
Cross Eyed!
Posts: 144
Joined: Wed Jul 16, 2014 10:29 am
Location: Tokyo, Japan

Re: Full (yeah, well) Wiimote Support in FreePIE

Post by NeoTokyo_Nori »

CyberVillain wrote: its Rascal thats the expert on the wiimote codebase, but I think you need both Extension and Mplus for Acc and mplus

Code: Select all

wiimote[0].enable(WiimoteCapabilities.Extension | WiimoteCapabilities.MotionPlus)
Hmm, I just tried it, but so far no cigar :(

Either way, it does appear to be a strictly motionplus related issue...
I could test things on glovepie, but that would be very un-faithful of me wouldnt it ;)

I think the brightest hope I have for clearing this wall,
is to enable Multiple Serial Com ports for the arduino IMU,
and get things working with the Razor AHRS data :ugeek:

Now, I wonder who could possibly be the person to make that happen :?: ;) ;) ;)

We would be lost in the dark without you CV :lol:
NeoTokyo_Nori
Cross Eyed!
Posts: 144
Joined: Wed Jul 16, 2014 10:29 am
Location: Tokyo, Japan

Re: Full (yeah, well) Wiimote Support in FreePIE

Post by NeoTokyo_Nori »

Hi, there is a discussion over on reddit, that I thought applies to what we were just discussing here.
This seems like the sort of thing that FreePIE could accomplish quite well, with the appropriate upgrades :) Just a thought, what do you think?

Perception Neuron's enormous input device potential for VR : oculus
http://www.reddit.com/r/oculus/comments ... ut_device/
@creator
will the Neuron be able to map actions to keystrokes? For example: playing a game in vorpx or tridef on the Virtualizer (passive, with no sensors). Can running be converted to 'W' key, .. Jumping etc... More importantly, can it be used for head tracking as well, (in Non-Rift HMDs?) Specifically, 360degree tracking? If not positional, then rotational?

@Leo Burton the system currently don't have Keyboard Emulator function but that sounds very interesting to me. Since it won't be very difficult (actually it's very simple pattern recognition) I probably will try to do it some time later.
konstantin_lozev
Cross Eyed!
Posts: 192
Joined: Fri Jul 04, 2014 1:43 am

Re: Full (yeah, well) Wiimote Support in FreePIE

Post by konstantin_lozev »

CyberRascal wrote:Hi everyone!

I've done some work on the motionplus calibration now. Basically I use the accumulated values during the calibration period to work out an appropriate deadband for the motionplus. From what I can see, there is much lower drift when wiimote is stable but I'm not sure if it will be usable anyway. Please, try the release of freepie in this post out and tell me what the result is!

Also, thanks for the tons of information in previous posts. And for the vote of confidence! :)

Hope the release works!
i tried the release and it did not start, throwing the error:
----------------------------------------------------------------------------------------
Problem signature:
Problem Event Name: CLR20r3
Problem Signature 01: freepie.exe
Problem Signature 02: 1.5.487.0
Problem Signature 03: 53ef73f0
Problem Signature 04: mscorlib
Problem Signature 05: 4.0.30319.17929
Problem Signature 06: 4ffa561c
Problem Signature 07: 2606
Problem Signature 08: 12
Problem Signature 09: System.NotSupportedException
OS Version: 6.1.7601.2.1.0.768.3
Locale ID: 1033
Additional Information 1: 0a9e
Additional Information 2: 0a9e372d3b4ad19135b953a78882e789
Additional Information 3: 0a9e
Additional Information 4: 0a9e372d3b4ad19135b953a78882e789

Read our privacy statement online:
http://go.microsoft.com/fwlink/?linkid= ... cid=0x0409

If the online privacy statement is not available, please read our privacy statement offline:
C:\Windows\system32\en-US\erofflps.txt
--------------------------------------------------------------------------------------------
Maybe the way to go would be to first implement it in a script. This is how I did it in GlovePIE (pardon my poor programming grammar, I am simply a self-taught long time scripter):
--------------------------------------------------------------------------------------------
if var.framenumberstart < 100 then {
if var.framenumberstart = 20 then var.maxdelta=0
if abs(Delta(aSin(wiimote.gz) in radians)*500)>abs(var.maxdelta) then {
var.maxdelta=Delta(aSin(wiimote.gz) in radians)*500
var.framenumbermax=var.framenumberstart
}
var.framenumberstart+=1
}
--------------------------------------------------------------------------------------------
I used it for the accelerometer data, but you get the idea...
GameDevKev
One Eyed Hopeful
Posts: 7
Joined: Wed Aug 20, 2014 8:51 pm

Re: Full (yeah, well) Wiimote Support in FreePIE

Post by GameDevKev »

It seems the new DK2 SDK crashes FreePIE. I can't get a wiimote to work with it. I uninstalled the Oculus SDK and voila, FreePIE working again. Anyone else out there using or trying to use a wiimote with the DK2?
CyberVillain
Petrif-Eyed
Posts: 2166
Joined: Mon Jun 22, 2009 8:36 am
Location: Stockholm, Sweden

Re: Full (yeah, well) Wiimote Support in FreePIE

Post by CyberVillain »

Its not the Wii, are you using the latest OVR driver and Runtime?

How does your script look like?
GameDevKev
One Eyed Hopeful
Posts: 7
Joined: Wed Aug 20, 2014 8:51 pm

Re: Full (yeah, well) Wiimote Support in FreePIE

Post by GameDevKev »

CyberVillain wrote:Its not the Wii, are you using the latest OVR driver and Runtime?

How does your script look like?
Im not using a wii.? If you meant the wiimote, no it is not the wiimote, I have uninstalled the Oculus and got the wiimote working again just fine.

As for the script, I can't even run a script. When I do i am just attempting to use the basic controls script.

I am using 0.4.2 - tried 0.4.3, same problem. Switched back to 0.4.2, because it seems more stable. I tried 0.4.1 with no luck as well.

edit: Actually I was able to run a script in 0.4.2, even got to the point where my wiimote had 1 led in the 1st player position, but no output coming from the wiimote.

Im having similar issues with Glovepie, and even connecting my phone via bluetooth. However my logitech mouse (which was stated to have compatibility issues with the dk2) is working fine.

What I'd really like to know is if anyone else has got their wiimote working with the dk2, or is this issue limited exclusively to my setup.
CyberVillain
Petrif-Eyed
Posts: 2166
Joined: Mon Jun 22, 2009 8:36 am
Location: Stockholm, Sweden

Re: Full (yeah, well) Wiimote Support in FreePIE

Post by CyberVillain »

So if I understand you oculus works, but the wiimote only works when oculus is not used? Correct?
Really strange, cant help ypu sadly, dont have a Wiimote right now
GameDevKev
One Eyed Hopeful
Posts: 7
Joined: Wed Aug 20, 2014 8:51 pm

Re: Full (yeah, well) Wiimote Support in FreePIE

Post by GameDevKev »

CyberVillain wrote:So if I understand you oculus works, but the wiimote only works when oculus is not used? Correct?
Really strange, cant help ypu sadly, dont have a Wiimote right now
Thanks anyway CyberVillain (you should get a wiimote, $10 on ebay). I just tested it some more, and as long as the oculus runtime 0.4.2 (same seemed to happen for 0.4.3) is installed, i get nothing from any bluetooth devices i have, except my logitech mouse which has a dongle. My devices are pairing and it seems they are receiving information. For example when I run a freepie script, the wiimote vibrates and the player 1 led lights up. It received a signal, but when I try and push a button (testing with notepad, and setting buttons to letters) there is no input [nothing types in notepad]. Seems the runtime is screwing with windows 8 bluetooth drivers or something odd. Couldn't get my android phone controller app to work either, but it works fine when I connect through wifi rather than bluetooth.

So after more testing it seems obvious to me that this is not a FreePIE problem at all, so I won't post anymore about it. But if anyone is reading and using a wiimote succesfully with the DK2 please pm me with what you are using/how you are accomplishing it. Thanks.

Hey CyberVillain, are you on the developer forums at oculusvr ever? if so same username? Mine is kevingulling
CyberVillain
Petrif-Eyed
Posts: 2166
Joined: Mon Jun 22, 2009 8:36 am
Location: Stockholm, Sweden

Re: Full (yeah, well) Wiimote Support in FreePIE

Post by CyberVillain »

Oculus dev forum? Yepp same, file a bug with oculus team
niocnioc
One Eyed Hopeful
Posts: 4
Joined: Wed Nov 12, 2014 5:15 pm

Re: Full (yeah, well) Wiimote Support in FreePIE

Post by niocnioc »

Hello

I'm quite new to freepie and i'd like it to run with vjoy, without success so far.

i'm trying to log a simple event to see if it is working

Code: Select all


if starting:
	diagnostics.watch(wiimote[0].buttons.button_down(WiimoteButtons.A))
	diagnostics.watch(wiimote[1].buttons.button_down(WiimoteButtons.A))
	diagnostics.watch(wiimote[2].buttons.button_down(WiimoteButtons.A))
	diagnostics.watch(wiimote[3].buttons.button_down(WiimoteButtons.A))
my wiimote is detected in microsoft bluetooth devices.
I use FreePie 1.6.512.

When i run the script the wiimote vibrates and the first led stays lit, all watches appear in watch tab, but nothing happens when i press A.
Obviously i'm missing something....
Post Reply

Return to “FreePIE”