Using RazorIMU in Rift Demos?

Official forum for open source FreePIE discussion and development.
Post Reply
Croccy22
Cross Eyed!
Posts: 140
Joined: Wed Feb 04, 2009 7:51 am

Using RazorIMU in Rift Demos?

Post by Croccy22 »

Hi,

I have just got a Sparkfun 9DOF delivered today which I have flashed with the ahrs firmware etc. It is all working with Freepie and have tested it with mouse emulation etc.

What I want to do now though is run up some of the occulus demos available for download and use my 9dof as the headtracker.

I am new to freepie but it look like I should just be abale to do something like this:

freespace.yaw = ahrsImu.yaw

But when I do that and run the script, freepie just crashes straight away. Is there something different with this plugin? Is what I am trying to do actually possible. What else do I need to setup?

Thanks, Matt.
CyberVillain
Petrif-Eyed
Posts: 2166
Joined: Mon Jun 22, 2009 8:36 am
Location: Stockholm, Sweden

Re: Using RazorIMU in Rift Demos?

Post by CyberVillain »

Hi Matt.
Freespace is a read only plugin, it uses a unmanaged C library, piefreespace.dll to integrate with the tracker.
My guess is that it ungracefully crashes when it does not detect a Freespace tracker and takes FreePIE with it.

Even if it could spoof the piefreespace.dll it wouldn't work since the rift has its own library (I think the rift as even changed the tracker hardware and not using Freespace?).
Croccy22
Cross Eyed!
Posts: 140
Joined: Wed Feb 04, 2009 7:51 am

Re: Using RazorIMU in Rift Demos?

Post by Croccy22 »

Hi,

Thanks for the reply.

Do you think there will ever be a way of emulating the rift? It seems that most of the demos being created for the rift at the moment would all work fine on DIY Rifts apart from the head tracking!

My main goal would be to get Minecrift working fully on my DIY Rift. I haven't built my DIY Rift yet but looking at Minecrift the 3d should work fine, we could also use mouse emulation to look left/right and up/down. But it's just the roll element that we need. I have posted in the minecrift thread to see if they could also implememnt TrackIR support or something that is supported by freepie since this would then enable all headtrackers to work with it.

I guess this is the problem with VR headsets, The software is all over the place. It's great that the oculus seems to be taking off but without a consumer version for at least another year it would be nice if people would make their software support a more generic interface so DIY rifts can use the same software. I guess oculus needs to protect it's software from other companies.

Thanks, Matt.
CyberVillain
Petrif-Eyed
Posts: 2166
Joined: Mon Jun 22, 2009 8:36 am
Location: Stockholm, Sweden

Re: Using RazorIMU in Rift Demos?

Post by CyberVillain »

Had it been a C library we could just spoof the dll (Like we do with TrackIR)
But the SDK is written in Cpp so that wont work, all the unity demos out there uses a another version of the SDK thats specific for unity.

The only way I can see todo this is to fake the HID device and send the raw data to the real driver, not an easy task

In the next version of FreePIE we will have a generic tracker plugin, I really hope software devs stat to support this because thats a generic way of supporting all trackers supporteed by FreePIE
Croccy22
Cross Eyed!
Posts: 140
Joined: Wed Feb 04, 2009 7:51 am

Re: Using RazorIMU in Rift Demos?

Post by Croccy22 »

That sounds like a brilliant idea. Would the generic plugin have a Java API to go with it?

I was speaking to one of the guys in the Minecrift thread about adding support for headtracking with DIY Rifts and he said he was thinking about writing a complete new SDK that would work with the official Rift and the DIY ones (Along the lines of what the Vireio Perception team have done).

It may well be worth having a chat with him because if he could use your generic plugin for headtracking then the DIY community would have a way forward for writing multi device software. Which has got to be a good thing!!

Thanks, Matt.
CyberVillain
Petrif-Eyed
Posts: 2166
Joined: Mon Jun 22, 2009 8:36 am
Location: Stockholm, Sweden

Re: Using RazorIMU in Rift Demos?

Post by CyberVillain »

It will come with a C library, but under the hood it uses windows shared memory. Java is cross platform so its probably not as straightforward in java as in C# or C

http://www.codeproject.com/Articles/246 ... municate-b
mabrowning
Binocular Vision CONFIRMED!
Posts: 289
Joined: Wed May 15, 2013 12:48 pm
Location: Texas, USA
Contact:

Re: Using RazorIMU in Rift Demos?

Post by mabrowning »

I'm "one of the guys" on the minecrift dev team (just the two of us for now). I wasn't quite planning on developing a whole SDK. If anything, I was just going to abstract out the interface between the Rift and the minecraft code, allowing "pluggable" interfaces to provide the various VR inputs needed. It would be in java, obviously, but if it flourishes into something that is usable by other folks, that's great too.

Basically, it boils down to a VR plugin interface for minecrift; alternative implementations could be provided. The last time I did C# development was 4 years ago on .NET 1.1, but I'd willing to work with people to write a FreePIE backed implementation. That way, Minecrift could be controlled with whatever inputs you can feed into FreePIE. My first fear is latency when going through the FreePIE interpreter, but maybe you guys have worked that and are doing JIT or something on the scripts. What is the official/recommended way to "consume" FreePIE computed inputs/results? I see you mentioned JNI integration, but I think that was for freespace.... it seems something jni4net would be more appropriate.

Edit: Ok, I read a bit more about FreePIE, and I guess we'd write some kind of output plugin or implement the generic plugin. Is there any way that a plugin can "pull" data from FreePIE? I'm still worried about latency, and if the data has to go from input plugin --pull--> FreePIE --push--> output plugin -> Java wrapper --pull--> Game engine, I can envision there being some "buffer" latency. Does the FreePIE gui need to be running all the time, or is there some way the game can request FreePIE engine start up and start feeding data?
CyberVillain
Petrif-Eyed
Posts: 2166
Joined: Mon Jun 22, 2009 8:36 am
Location: Stockholm, Sweden

Re: Using RazorIMU in Rift Demos?

Post by CyberVillain »

Hi there mabrowning, welcome to the forum!

FreePIE needs to yield the script thread otherwise it would eat up an entire CPU core, there for the frequencey is 64 hz (Default for Windows system clock).
About latency the generic plugin uses Shared memory which has very little latency, some latency will probably be introduced when switching over from Windows land to JVM land?

You can implement your own plugin, but I think that the Generic plugin would fit your needs as good?

The FreePIE installer is not shipped with anything but the GUI, the source on github does have a Console version, maybe I should include this for next release.

edit: Still you cant just request FreePIE to start, you need to have a correct script that fits your need load that up and run it. I guess you could create some kind of Windows service that utilizes FreePIE core, but its not something I currently have on the road map.
Post Reply

Return to “FreePIE”