Hydra emulation through PSMove + navigation controllers

Official forum for open source FreePIE discussion and development.
Post Reply
NoxWings
One Eyed Hopeful
Posts: 44
Joined: Thu May 15, 2014 8:04 am

Hydra emulation through PSMove + navigation controllers

Post by NoxWings »

Hi guys!

I recently posted this idea in physical VR tools but there is no movement at all there :(

I'm planning to emulate Hydra/STEM through psmove + navigation controller setup for each hand.
I've recently seen this project idea[1] but looks like the DUALPlay project did not suceed with their campaing.

I plan to use the psmove only for the tracking orientation + position and other controller like the navigation controller attached for the joysticks and the buttons emulation. I'm looking for a way to build myself an attachment similar to the dualplay one.

Image
Image

Currently and thanks to FreePIE looks like Hydra emulation could be done and I'm working to integrate psmove api into freepie right now.

Unfortunatelly looks like the only software that supports the navigation controller/sixaxis/dualshock 3 is motion in joy so I'll have to use it to get the data from the navigation controllers (and use one extra bt dongle exclusively for this software)

Tips or other approach ideas are welcome.
CyberVillain
Petrif-Eyed
Posts: 2166
Joined: Mon Jun 22, 2009 8:36 am
Location: Stockholm, Sweden

Re: Hydra emulation through PSMove + navigation controllers

Post by CyberVillain »

Very cool! How is your plugin coming along?

We will have to update the SDK when STEM is released, I hope it wont be to hard to emulate it
NoxWings
One Eyed Hopeful
Posts: 44
Joined: Thu May 15, 2014 8:04 am

Re: Hydra emulation through PSMove + navigation controllers

Post by NoxWings »

CyberVillain wrote:Very cool! How is your plugin coming along?

We will have to update the SDK when STEM is released, I hope it wont be to hard to emulate it
I have just started looking at it. I have never used VS before so I'm a lil bit lost locating the linker properties to set the psmove libraries.

Btw unfortuately windows bt stack is a pain in the ass and I have only suceed pairing moves in win7 so I'll need to wait until I arrive home tomorrow.
CyberVillain
Petrif-Eyed
Posts: 2166
Joined: Mon Jun 22, 2009 8:36 am
Location: Stockholm, Sweden

Re: Hydra emulation through PSMove + navigation controllers

Post by CyberVillain »

C# can only load C libraries, if its in C++ you need to create a C wrapper for it.. If its a C lib, import a function using dllimport

http://msdn.microsoft.com/en-us/library ... s.71).aspx
NoxWings
One Eyed Hopeful
Posts: 44
Joined: Thu May 15, 2014 8:04 am

Re: Hydra emulation through PSMove + navigation controllers

Post by NoxWings »

CyberVillain wrote:C# can only load C libraries, if its in C++ you need to create a C wrapper for it.. If its a C lib, import a function using dllimport

http://msdn.microsoft.com/en-us/library ... s.71).aspx
It is a C library, I've already created the imports for it but, don't I need to set the psmove library path inside the IDE for the plugins project?

I have already located the commands to copy the libraries to the FreePIE.GUI release folder.
CyberVillain
Petrif-Eyed
Posts: 2166
Joined: Mon Jun 22, 2009 8:36 am
Location: Stockholm, Sweden

Re: Hydra emulation through PSMove + navigation controllers

Post by CyberVillain »

Just put the library in the Libs folder.
Under the properteis for the GUI project choose Build Events / post build event and add something like

Code: Select all

copy "$(SolutionDir)\Lib\PSMove\*.dll" "$(TargetDir)"
You also need to add it to the CopyDependecies step in the build_output.xml fle, this is so that the installer will include it
NoxWings
One Eyed Hopeful
Posts: 44
Joined: Thu May 15, 2014 8:04 am

Re: Hydra emulation through PSMove + navigation controllers

Post by NoxWings »

CyberVillain wrote:Just put the library in the Libs folder.
Under the properteis for the GUI project choose Build Events / post build event and add something like

Code: Select all

copy "$(SolutionDir)\Lib\PSMove\*.dll" "$(TargetDir)"
You also need to add it to the CopyDependecies step in the build_output.xml fle, this is so that the installer will include it
Fine, I had already added the copy post build event and now I've added the CopyDependencies to te build_output.xml too.
CyberVillain
Petrif-Eyed
Posts: 2166
Joined: Mon Jun 22, 2009 8:36 am
Location: Stockholm, Sweden

Re: Hydra emulation through PSMove + navigation controllers

Post by CyberVillain »

Just noticed that its missed spelled :D
SD456
One Eyed Hopeful
Posts: 2
Joined: Tue Jul 22, 2014 9:10 am

Re: Hydra emulation through PSMove + navigation controllers

Post by SD456 »

Hello everyone!

I would like to play Surgeon Simulator with a PS Move controller emulated as a Razer Hydra.
My question is, can I do this? If Yes, please someone explain me how.

Thank You very much in advance!
NoxWings
One Eyed Hopeful
Posts: 44
Joined: Thu May 15, 2014 8:04 am

Re: Hydra emulation through PSMove + navigation controllers

Post by NoxWings »

SD456 wrote:Hello everyone!

I would like to play Surgeon Simulator with a PS Move controller emulated as a Razer Hydra.
My question is, can I do this? If Yes, please someone explain me how.

Thank You very much in advance!
There is no way to do so yet.

I'll post a tutorial when I'm done but unfortunately psmove does not provide a joystick so you will still have to create a custom psmove+navigation controller attachment like the ones shown in the pics above :S
NoxWings
One Eyed Hopeful
Posts: 44
Joined: Thu May 15, 2014 8:04 am

Re: Hydra emulation through PSMove + navigation controllers

Post by NoxWings »

I've created a simple script today to test the navigation (no position or orientation yet) to hydra controls and it works pretty well. It took me a while to remember I have to use the custom "sixense_fake" dlls :oops:

But I've got a question. I've never used the hydra before but I've seen in some videos that some demos require you to "dock" the controllers. Can that action be replicated inside FreePIE too?
CyberVillain
Petrif-Eyed
Posts: 2166
Joined: Mon Jun 22, 2009 8:36 am
Location: Stockholm, Sweden

Re: Hydra emulation through PSMove + navigation controllers

Post by CyberVillain »

I dont think the is such functionality in the SDK. Here is the fake code

https://github.com/AndersMalmgren/FreeP ... e_fake.cpp

edit: Most demos do require you to hold the hydras infront of you and press the fire button, that can be faked in FreePIE

edit2:

Code: Select all

output->is_docked = data.is_docked;
So the answer is yes, you can fake docked state, but... We do not expose it in the FreeePIE plugin for some reason, that should be added

edit3:
I added isDocked to the plugin

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

ops, i was a little too fast on that last commit, here is the correction
https://github.com/AndersMalmgren/FreeP ... 059a02e7a1
NoxWings
One Eyed Hopeful
Posts: 44
Joined: Thu May 15, 2014 8:04 am

Re: Hydra emulation through PSMove + navigation controllers

Post by NoxWings »

CyberVillain wrote:I dont think the is such functionality in the SDK. Here is the fake code

https://github.com/AndersMalmgren/FreeP ... e_fake.cpp

edit: Most demos do require you to hold the hydras infront of you and press the fire button, that can be faked in FreePIE

edit2:

Code: Select all

output->is_docked = data.is_docked;
So the answer is yes, you can fake docked state, but... We do not expose it in the FreeePIE plugin for some reason, that should be added

edit3:
I added isDocked to the plugin

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

ops, i was a little too fast on that last commit, here is the correction
https://github.com/AndersMalmgren/FreeP ... 059a02e7a1
I'll sync my fork. Thank you.
NoxWings
One Eyed Hopeful
Posts: 44
Joined: Thu May 15, 2014 8:04 am

Re: Hydra emulation through PSMove + navigation controllers

Post by NoxWings »

My PC with win7 died today, ( I have to replace the Graphics Card ) so I'll be unable to test anything in a few days :S
I've got a laptop with win8 but unfortunately pairing a move with win8 is not possible atm due to windows bt stack.
CyberVillain
Petrif-Eyed
Posts: 2166
Joined: Mon Jun 22, 2009 8:36 am
Location: Stockholm, Sweden

Re: Hydra emulation through PSMove + navigation controllers

Post by CyberVillain »

:(

How is FreePIE side of things going? Any trouble there?
NoxWings
One Eyed Hopeful
Posts: 44
Joined: Thu May 15, 2014 8:04 am

Re: Hydra emulation through PSMove + navigation controllers

Post by NoxWings »

CyberVillain wrote::(

How is FreePIE side of things going? Any trouble there?
I haven't done that much yet, I'm looking at WiiMote and Android plugins as a reference from time to time.
I've already created all the C library imports.

I will create the actual "move manager" that uses the imports and then populate the plugin and global.

I'll only add buttons and orientation data at the beginning since I've never tested the positional tracking of the library before. That will be the last thing I'll be adding.
Post Reply

Return to “FreePIE”