Help with a project for New Plugin for FreePIE

Official forum for open source FreePIE discussion and development.
Post Reply
lmaceleighton
One Eyed Hopeful
Posts: 20
Joined: Thu Jun 05, 2014 6:55 pm

Help with a project for New Plugin for FreePIE

Post by lmaceleighton »

So I have been developing this game controller. In the end I wouldn't mind having console support but I really want to get it up in running in a more meaningful way. The controller is meant to be for

playing FPS mostly, as it has the Razor IMU in a the shell of of plastic assault rifle. I am using a arduino based MC's with the MEGA32U4, so I have access to mouse, keyboard and joystick lib's. I have

the tracker code cleaned up, the IMU 'properly' calibrated, and it is centered on the rotation point of the firearm, and so far works great!(dont worry I am getting to the part where I need help, I just

wanted to leave a bit of background) I have 'Relative' mouse movement going GREAT, and to all degree of sensitivity, it is actually darn accurate if you get used to it. I just don't like having to hold at

a center point. I HAVE gotten 'absolute' mouse to work with it too, only it doesn't move as expected really. While the motion is correct, even when I remap the values to the pixels Horz and Vert it still

jumps and misses pixels, sorta moving at small sharp right angle on its way across the screen, moves horz and Vert but just misses some beats along the way...hope that makes sense. So after trying

to get the mouse movement working in a more absolute way I learned that you needed to be able to get information from the winapi like, screen size, and mouse deltas and things like that, and trying

the HID files is a nightmare. So then I tried Python, which was EASY as heck to get values, and while it is a great language I thought in the end it might be a pain for others to use with my product. I

want to produce a game controller that is 'reasonably' priced. While the Delta Six is cool, it WAY overpriced in my opinion, and for the community at large I plan to make a product that anyone should

be able to afford, and if you really can't pay for the gun we'll sell a kit, or just the plans to make you own.

So here is where I need help from all of you! This is the point where I need to make a decision about programming. While I mentioned that I would like to have console support my big aim was to

make this 100% Rift compatible, infact it was designed JUST for the rift, it just so happens to work with all PC games, having mouse support. I will sacrifice this for now just so that major testing can

get underway, I feel that once I get the source and movement worked out I should be able to to translate into C and get this HID thing licked? I just don't know where to go from here really, and I

spend a lot of time trying so many things, I really need some advice on how to progress from here. Would FREEPIE work well for this? I have not been able to get freePIE to recognize that I am using

the Razor Stick, so I was going to write my own plug but I didn't want to waste my time if there was a better way. Right now I have it spitting Yaw Pitch and Roll out the serial COM....

I would love to have one or two highly motivated people to help with this project. I think it might be good for kickstarter at some point, but I would be willing to pay for help at this point. I have

been working at this day, and night for over 6 months(mostly crafting the plastic gun, and soldering and such getting all the hardware 100%). There are a LOT of upcoming products that looks

awesome for controlling VR, but we NEED something that doesn't necessarily cost hundreds of dollars, as It does not need to.

Feel free to ask any and all questions, and I LOVE 'constructive criticism'.


~Bobby

Also there is a pic here at the Oculus Dev Forums;O)
https://developer.oculusvr.com/forums/v ... =25&t=8204
:3D
CyberVillain
Petrif-Eyed
Posts: 2166
Joined: Mon Jun 22, 2009 8:36 am
Location: Stockholm, Sweden

Re: Help with a project for New Plugin for FreePIE

Post by CyberVillain »

Hi, sounds like a neat product! If you only need help with setting up a plugin for FreePIE I can help for free.
lmaceleighton
One Eyed Hopeful
Posts: 20
Joined: Thu Jun 05, 2014 6:55 pm

Re: Help with a project for New Plugin for FreePIE

Post by lmaceleighton »

I would appreciate ANY help. I just wanted to make sure that i was barking up the right tree. Let me know what you need. Like I said it IS the sparkfun IMU https://www.sparkfun.com/products/10724 I know that there is already a plugin for it, but I have re-written the firmware so that it just endlessly sends data, as I thought this would be easier for me trying so many differnt languages.
CyberVillain
Petrif-Eyed
Posts: 2166
Joined: Mon Jun 22, 2009 8:36 am
Location: Stockholm, Sweden

Re: Help with a project for New Plugin for FreePIE

Post by CyberVillain »

I think this would fit best as a stand alone plugin. I could help you set up a solution and create the needed classes etc
lmaceleighton
One Eyed Hopeful
Posts: 20
Joined: Thu Jun 05, 2014 6:55 pm

Re: Help with a project for New Plugin for FreePIE

Post by lmaceleighton »

Thats sound great! See thats what I need, someone to say: Do this...lol Ill start looking at the wiki and over the source to familiarize myself with it, please let me anything you need me to do, lots of time here;O)
CyberVillain
Petrif-Eyed
Posts: 2166
Joined: Mon Jun 22, 2009 8:36 am
Location: Stockholm, Sweden

Re: Help with a project for New Plugin for FreePIE

Post by CyberVillain »

What name do you want for the plugin?
lmaceleighton
One Eyed Hopeful
Posts: 20
Joined: Thu Jun 05, 2014 6:55 pm

Re: Help with a project for New Plugin for FreePIE

Post by lmaceleighton »

I have been calling it the P90 Motion Controller, so how ever you do your naming convention from there is good with me! ;O)
lmaceleighton
One Eyed Hopeful
Posts: 20
Joined: Thu Jun 05, 2014 6:55 pm

Re: Help with a project for New Plugin for FreePIE

Post by lmaceleighton »

BTW how would you like me to output values to the serial? Here is what I am doing in the Arduino IDE for output, please let me know if you would like to format differently.

Serial.print(ypr[0]);
Serial.print(",");
Serial.print(ypr[1]);
Serial.print(",");
Serial.print(ypr[2]);
Serial.println("");

Also what is the Difference between IronPython and regular Python, well I could look that up, but I would rather hear it from you so I know how it relates to freepie specifically.
lmaceleighton
One Eyed Hopeful
Posts: 20
Joined: Thu Jun 05, 2014 6:55 pm

Re: Help with a project for New Plugin for FreePIE

Post by lmaceleighton »

Serial.flush();
Serial.print(ypr[0]);
Serial.print(",");
Serial.print(ypr[1]);
Serial.print(",");
Serial.print(ypr[2]);
Serial.println();


This might be better, I think its cleaner :OD
CyberVillain
Petrif-Eyed
Posts: 2166
Joined: Mon Jun 22, 2009 8:36 am
Location: Stockholm, Sweden

Re: Help with a project for New Plugin for FreePIE

Post by CyberVillain »

Iron python is just a .NET implementation of Python
lmaceleighton
One Eyed Hopeful
Posts: 20
Joined: Thu Jun 05, 2014 6:55 pm

Re: Help with a project for New Plugin for FreePIE

Post by lmaceleighton »

Oh lol....sounded scarey at first
CyberVillain
Petrif-Eyed
Posts: 2166
Joined: Mon Jun 22, 2009 8:36 am
Location: Stockholm, Sweden

Re: Help with a project for New Plugin for FreePIE

Post by CyberVillain »

Here is a good start for your plugin
You do not have the required permissions to view the files attached to this post.
lmaceleighton
One Eyed Hopeful
Posts: 20
Joined: Thu Jun 05, 2014 6:55 pm

Re: Help with a project for New Plugin for FreePIE

Post by lmaceleighton »

Sweet! I am all over this, Ill let you know how it goes:O)
lmaceleighton
One Eyed Hopeful
Posts: 20
Joined: Thu Jun 05, 2014 6:55 pm

Re: Help with a project for New Plugin for FreePIE

Post by lmaceleighton »

Dude you are awesome, I was just thumbing through FreePie source noticing really awesome C# sensor fusion....that is really great that you include this. Anyway I am not quite to the point where I try to figure out how to compile it with freepie yet, but I did see you have a compiler in the build tools folder, another great thing...this application is way more than it appears.....I guess I mean great job with this...alright back to work:O)

:3D
lmaceleighton
One Eyed Hopeful
Posts: 20
Joined: Thu Jun 05, 2014 6:55 pm

Re: Help with a project for New Plugin for FreePIE

Post by lmaceleighton »

Alright, I need help :D if you have a moment or two. How do I go about compiling this with freepie? It seemed to build fine by itself just by running the included batch file. i thought there might be a

file somewhere where I can include my plugins file, or will I actually have to use VS? I have done a fair amount of coding but not like this, so I guess a bit of a noob here ;) when it comes to all these

'New' languages...so I wont feel offended if you explain things plainly :) Thank you for all you help BTW, getting over this serial communication is crazy, and all the while doing this I am trying to somthing

similar in unity...infact I think this actually might help me understand my unity problem a bit better after dealing with freepie.

~Bobby
CyberVillain
Petrif-Eyed
Posts: 2166
Joined: Mon Jun 22, 2009 8:36 am
Location: Stockholm, Sweden

Re: Help with a project for New Plugin for FreePIE

Post by CyberVillain »

Thanks :D

Sadly the debug settings are not possible to transfer from one machine to the next (Its been like this since VS2003 i cant belive they havent fixed it yet). You can read here how you can debug the plugin with FreePIE (You need the FreePIE source for this).

Scroll down to the last section Debug external plugin

https://github.com/AndersMalmgren/FreeP ... evelopment
lmaceleighton
One Eyed Hopeful
Posts: 20
Joined: Thu Jun 05, 2014 6:55 pm

Re: Help with a project for New Plugin for FreePIE

Post by lmaceleighton »

Ouch! Wait til old Bill get gets an email from me! lol, I'll figure this out...I think I have spent too long using the Torque Game Engine, seems anytime I try to code and compile anything that isn't my usual DirectX setup I am lost, Ill post some progress here, and what ever I am doing, ill see about some screenshots too. Hopefully in the end there might be something here someone else can follow.

~Bobby
lmaceleighton
One Eyed Hopeful
Posts: 20
Joined: Thu Jun 05, 2014 6:55 pm

Re: Help with a project for New Plugin for FreePIE

Post by lmaceleighton »

Are you using VS 12? I have 2010 express and pro, and I downloaded 2012 express, I've notice little

difference in them, which do you recommend with this? Did I mention I've never made a plugin...for

anything...ever. My job has always been just scripting, and making very small C++ changes to very

large builds that I never am responsible for compiling myself, so while I have been working with

algorithms and making logical code work, the ins and out of visual studio I know very little about.

Although I have successfully compiled things, separate from work, like Torque game engine. So in that

process I would open the solution file, turn off linking, and then show VS where I put the Directx

Libs, and the platform SDK Libs, and then 'build' and away you go....thought you should know the

noob you workin with here;O)

~Bobby
CyberVillain
Petrif-Eyed
Posts: 2166
Joined: Mon Jun 22, 2009 8:36 am
Location: Stockholm, Sweden

Re: Help with a project for New Plugin for FreePIE

Post by CyberVillain »

Havent tried FreePIE with 2010 in a long time, but should work. I use 2012 and started to use 2013 recently.
Start with cloning the FreePIE repostiry, open the FreePIE.sln in VS and build. If it complaints about a missing VersionINfo.cs build again.
lmaceleighton
One Eyed Hopeful
Posts: 20
Joined: Thu Jun 05, 2014 6:55 pm

Re: Help with a project for New Plugin for FreePIE

Post by lmaceleighton »

Error 1 The command "cd L:\Work\FreePIE_Source_P90_MC\FreePIE-master\FreePIE-master\BuildTools
C:\Program Files (x86)\MSBuild\12.0\bin\msbuild write_VersionInfo.xml" exited with code 9009. FreePIE.Core
Error 2 Metadata file 'L:\Work\FreePIE_Source_P90_MC\FreePIE-master\FreePIE-master\FreePIE.Core\bin\Debug\FreePIE.Core.dll' could not be found L:\Work\FreePIE_Source_P90_MC\FreePIE-master\FreePIE-master\FreePIE.Tests.Test\CSC FreePIE.Tests.Test
Warning 3 Field 'FreePIE.Core.Plugins.Hydra.EmulatedData.IsDocked' is never assigned to, and will always have its default value 0 L:\Work\FreePIE_Source_P90_MC\FreePIE-master\FreePIE-master\FreePIE.Core.Plugins\Hydra\EmulatedData.cs 18 21 FreePIE.Core.Plugins
Warning 4 Assignment made to same variable; did you mean to assign something else? L:\Work\FreePIE_Source_P90_MC\FreePIE-master\FreePIE-master\FreePIE.Core.Plugins\SensorFusion\Quaternion.cs 25 17 FreePIE.Core.Plugins
Error 5 Metadata file 'L:\Work\FreePIE_Source_P90_MC\FreePIE-master\FreePIE-master\FreePIE.Core\bin\Debug\FreePIE.Core.dll' could not be found L:\Work\FreePIE_Source_P90_MC\FreePIE-master\FreePIE-master\FreePIE.Console\CSC FreePIE.Console
Warning 6 There was a mismatch between the processor architecture of the project being built "MSIL" and the processor architecture of the reference "L:\Work\FreePIE_Source_P90_MC\FreePIE-master\FreePIE-master\FreePIE.GUI\bin\Debug\plugins\FreePIE.Core.Plugins.dll", "x86". This mismatch may cause runtime failures. Please consider changing the targeted processor architecture of your project through the Configuration Manager so as to align the processor architectures between your project and references, or take a dependency on references with a processor architecture that matches the targeted processor architecture of your project. FreePIE.Tests.Core.Plugins
Warning 7 There was a mismatch between the processor architecture of the project being built "MSIL" and the processor architecture of the reference "SlimDX, Version=4.0.11.43, Culture=neutral, PublicKeyToken=b1b0c32fd1ffe4f9, processorArchitecture=x86", "x86". This mismatch may cause runtime failures. Please consider changing the targeted processor architecture of your project through the Configuration Manager so as to align the processor architectures between your project and references, or take a dependency on references with a processor architecture that matches the targeted processor architecture of your project. FreePIE.Tests.Core.Plugins
Error 8 Metadata file 'L:\Work\FreePIE_Source_P90_MC\FreePIE-master\FreePIE-master\FreePIE.Tests.Test\bin\Debug\FreePIE.Tests.Test.dll' could not be found L:\Work\FreePIE_Source_P90_MC\FreePIE-master\FreePIE-master\FreePIE.Tests.Core.Plugins\CSC FreePIE.Tests.Core.Plugins
Warning 9 Could not resolve this reference. Could not locate the assembly "Rhino.Mocks, Version=3.6.0.0, Culture=neutral, PublicKeyToken=0b3305902db7183f, processorArchitecture=MSIL". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. FreePIE.Tests.Core
Warning 10 There was a mismatch between the processor architecture of the project being built "MSIL" and the processor architecture of the reference "L:\Work\FreePIE_Source_P90_MC\FreePIE-master\FreePIE-master\FreePIE.GUI\bin\Debug\plugins\FreePIE.Core.Plugins.dll", "x86". This mismatch may cause runtime failures. Please consider changing the targeted processor architecture of your project through the Configuration Manager so as to align the processor architectures between your project and references, or take a dependency on references with a processor architecture that matches the targeted processor architecture of your project. FreePIE.Tests.Core
Error 11 Metadata file 'L:\Work\FreePIE_Source_P90_MC\FreePIE-master\FreePIE-master\FreePIE.Core\bin\Debug\FreePIE.Core.dll' could not be found L:\Work\FreePIE_Source_P90_MC\FreePIE-master\FreePIE-master\FreePIE.Tests.Core\CSC FreePIE.Tests.Core
Error 12 Metadata file 'L:\Work\FreePIE_Source_P90_MC\FreePIE-master\FreePIE-master\FreePIE.Tests.Test\bin\Debug\FreePIE.Tests.Test.dll' could not be found L:\Work\FreePIE_Source_P90_MC\FreePIE-master\FreePIE-master\FreePIE.Tests.Core\CSC FreePIE.Tests.Core
Error 13 Metadata file 'L:\Work\FreePIE_Source_P90_MC\FreePIE-master\FreePIE-master\FreePIE.Core\bin\Debug\FreePIE.Core.dll' could not be found L:\Work\FreePIE_Source_P90_MC\FreePIE-master\FreePIE-master\FreePIE.GUI\CSC FreePIE.GUI
Warning 14 The referenced component 'Microsoft.Dynamic' could not be found. FreePIE.Core
Warning 15 The referenced component 'Microsoft.Scripting' could not be found. FreePIE.Core
Warning 16 The referenced component 'Rhino.Mocks' could not be found. FreePIE.Tests.Core


This is 2013 Ill try 2012 and let you know...Wait...nope wont let me open it, because it was created with a newer version.
lmaceleighton
One Eyed Hopeful
Posts: 20
Joined: Thu Jun 05, 2014 6:55 pm

Re: Help with a project for New Plugin for FreePIE

Post by lmaceleighton »

Ok I see that you have all the dependencies right in the source download, so I am going to try it in 2010, and just make my own freepie build using you files and see what happens :OD
CyberVillain
Petrif-Eyed
Posts: 2166
Joined: Mon Jun 22, 2009 8:36 am
Location: Stockholm, Sweden

Re: Help with a project for New Plugin for FreePIE

Post by CyberVillain »

I fixed that issue with this commit

https://github.com/AndersMalmgren/FreeP ... db8db012ae

Have you updated your version since then?
CyberVillain
Petrif-Eyed
Posts: 2166
Joined: Mon Jun 22, 2009 8:36 am
Location: Stockholm, Sweden

Re: Help with a project for New Plugin for FreePIE

Post by CyberVillain »

You can also debug the plugin angainst the prebuilt version of FreePIE if you want
lmaceleighton
One Eyed Hopeful
Posts: 20
Joined: Thu Jun 05, 2014 6:55 pm

Re: Help with a project for New Plugin for FreePIE

Post by lmaceleighton »

I am so sorry, it turned out to be me being a bit of a GITHUB noob! lol, I must have downloaded a different version somehow, it was labeled master(the first one), this one BUILT GREAT!, and wil just a few warnings:O), but solid build! This should be my development moving! thanks again, and Ill report back with my progress;O)....although freepie console.exe??
lmaceleighton
One Eyed Hopeful
Posts: 20
Joined: Thu Jun 05, 2014 6:55 pm

Re: Help with a project for New Plugin for FreePIE

Post by lmaceleighton »

Ok so it builds with no errors. Then I added into the project the .cs you wrote for me, then I compiled. Then I used the .bat installer compiler that is in the build tools to make an .exe but my plugin isn't listed with the rest of them, or anywhere in the drop down menu, so I have been looking where to include the file in the build, i thought it would do it automatically once I put it with the rest of them...
CyberVillain
Petrif-Eyed
Posts: 2166
Joined: Mon Jun 22, 2009 8:36 am
Location: Stockholm, Sweden

Re: Help with a project for New Plugin for FreePIE

Post by CyberVillain »

USe the project I attacht in this thread above.

THen look here how you can debug

Scroll down to the last section Debug external plugin

https://github.com/AndersMalmgren/FreeP ... evelopment
lmaceleighton
One Eyed Hopeful
Posts: 20
Joined: Thu Jun 05, 2014 6:55 pm

Re: Help with a project for New Plugin for FreePIE

Post by lmaceleighton »

Oh, wait I get it! My plugin is there, its just not in the main menu, the auto fill in the editor knows it is in the app:O) If I want it in the main app then there more work but should reciev data and work as is. Thanks! Ill let you know how it goes:O)
Post Reply

Return to “FreePIE”