DK2 position tracking and Freepie?

Official forum for open source FreePIE discussion and development.
NeoTokyo_Nori
Cross Eyed!
Posts: 144
Joined: Wed Jul 16, 2014 10:29 am
Location: Tokyo, Japan

DK2 position tracking and Freepie?

Post by NeoTokyo_Nori »

So my precious arrived today :!: :twisted: :D

Still just getting setup, but boy does higher resolution make a difference !
And of course the additional features open up a new world of possibilities.

Now obviously the question burning in our minds is,
will freepie be supporting position tracking :?: ;) ;)

I dont have experience with the previous sdk versions, so forgive me,
but will it be a lot of work to get ovrPoseStatef data out?
I know you are a busy man CyberVilllan, and I dont want to pressure you,
but who else is out there that can make it happen :!: :!: :D
CyberVillain
Petrif-Eyed
Posts: 2166
Joined: Mon Jun 22, 2009 8:36 am
Location: Stockholm, Sweden

Re: DK2 position tracking and Freepie?

Post by CyberVillain »

I do not have the DK2 only the first so wont be able to test it, but can have a look. Does the current SDK in freepie work at all?
NeoTokyo_Nori
Cross Eyed!
Posts: 144
Joined: Wed Jul 16, 2014 10:29 am
Location: Tokyo, Japan

Re: DK2 position tracking and Freepie?

Post by NeoTokyo_Nori »

Hi CV!

So far I just have the Runtime installed, and the DK2 connected.
and tried some things with virtual desktop, which is working ok.

I tried running this code, with "sensor predictor 0"

Code: Select all

def update():
   mouse.deltaX = -filters.delta(filters.continuousRotation(oculusVR.yaw)) * ratio
   mouse.deltaY = -filters.delta(filters.continuousRotation(oculusVR.pitch)) * ratio
   diagnostics.watch(-filters.delta(filters.continuousRotation(oculusVR.yaw)))

if starting:
   ratio = 100
   oculusVR.update += update
It runs without error, but no data shows in the watch window.
Thats what I have so far...!
CyberVillain
Petrif-Eyed
Posts: 2166
Joined: Mon Jun 22, 2009 8:36 am
Location: Stockholm, Sweden

Re: DK2 position tracking and Freepie?

Post by CyberVillain »

Let me see if I can built against the new SDK
NeoTokyo_Nori
Cross Eyed!
Posts: 144
Joined: Wed Jul 16, 2014 10:29 am
Location: Tokyo, Japan

Re: DK2 position tracking and Freepie?

Post by NeoTokyo_Nori »

Great!, thanks for looking into it :D

Just let me know when there is anything I can do to help.
reexe
One Eyed Hopeful
Posts: 3
Joined: Sun Aug 03, 2014 10:12 am

Re: DK2 position tracking and Freepie?

Post by reexe »

CyberVillain wrote:Let me see if I can built against the new SDK
Cool!
It would be nice to get xyz of the camera tracking the oculus.
I am trying to emulate a hydra so i can get positional tracking to work fully for DK2 even in the old Minecrift that has support for DK2 without positional tracking but where u can get positional tracking if u have a hydra on your head, except i don't have a hydra ;)
CyberVillain
Petrif-Eyed
Posts: 2166
Joined: Mon Jun 22, 2009 8:36 am
Location: Stockholm, Sweden

Re: DK2 position tracking and Freepie?

Post by CyberVillain »

I have tried the new SDK but I do not get it to work, and have problems getting help at the forum


https://developer.oculusvr.com/forums/v ... 20&t=12607

If anyone knows what I am doing wrong please respond here or at the OVR forum
NeoTokyo_Nori
Cross Eyed!
Posts: 144
Joined: Wed Jul 16, 2014 10:29 am
Location: Tokyo, Japan

Re: DK2 position tracking and Freepie?

Post by NeoTokyo_Nori »

Hi CV :!:
Its great to hear you are working on it :D

Is it possible to get just the orientation tracking working first in DK2,
and worry about the position tracking afterwards?
Since it would be good to have some tracking with DK2, rather than no tracking at all... :P

btw, I have mostly just been ironing out issues with the DK2,
so I have not made any progress with the software coding side this week.. :roll:
NeoTokyo_Nori
Cross Eyed!
Posts: 144
Joined: Wed Jul 16, 2014 10:29 am
Location: Tokyo, Japan

Re: DK2 position tracking and Freepie?

Post by NeoTokyo_Nori »

Hi, just a thought.

"Direct to HMD" seems to be rather unstable in the current SDK,
and it appears to be tricky to get to work for everyone,
so maybe it is best to stick to "Extended Desktop" display mode...
CyberVillain
Petrif-Eyed
Posts: 2166
Joined: Mon Jun 22, 2009 8:36 am
Location: Stockholm, Sweden

Re: DK2 position tracking and Freepie?

Post by CyberVillain »

I get cant get it to init so I cant get anything from it

Code: Select all

Debug: Performance timer Vista flag = 1
Display Found MONITOR\OVR0001\{4d36e96e-e325-11ce-bfc1-08002be10318}\0009 - \\.\
DISPLAY1\Monitor1
Debug: [NetClient] Connected to a server running version 1.0.0 (my version=1.0.0)
Uninitialized Hmd
Maybe you guys with DK2 can test?

See attachment, needs VC++ 2013 runtime
You do not have the required permissions to view the files attached to this post.
NeoTokyo_Nori
Cross Eyed!
Posts: 144
Joined: Wed Jul 16, 2014 10:29 am
Location: Tokyo, Japan

Re: DK2 position tracking and Freepie?

Post by NeoTokyo_Nori »

Ok , please give me a few hours to try.

Do all the files go into here?
\FreePIE\plugins
CyberVillain
Petrif-Eyed
Posts: 2166
Joined: Mon Jun 22, 2009 8:36 am
Location: Stockholm, Sweden

Re: DK2 position tracking and Freepie?

Post by CyberVillain »

NeoTokyo_Nori wrote:Ok , please give me a few hours to try.

Do all the files go into here?
\FreePIE\plugins

Its a stand alone exe for test purpose
NeoTokyo_Nori
Cross Eyed!
Posts: 144
Joined: Wed Jul 16, 2014 10:29 am
Location: Tokyo, Japan

Re: DK2 position tracking and Freepie?

Post by NeoTokyo_Nori »

HI,

I am not sure what to expect, but so far
after a brief flash of the windows command line window.
there is nothing new on the screen...

OVR in extended desktop mode
DK1 legacy app supoort on
Win8, 16gb
Visual C++ 2013 Redistributable x86
Visual C++ 2013 Redistributable x64

let me know if there a log file, or something I can send.
:)
CyberVillain
Petrif-Eyed
Posts: 2166
Joined: Mon Jun 22, 2009 8:36 am
Location: Stockholm, Sweden

Re: DK2 position tracking and Freepie?

Post by CyberVillain »

You need to run it from the command line so that you can see the output
NeoTokyo_Nori
Cross Eyed!
Posts: 144
Joined: Wed Jul 16, 2014 10:29 am
Location: Tokyo, Japan

Re: DK2 position tracking and Freepie?

Post by NeoTokyo_Nori »

Ok,
I tried it in Extended desktop, and Direct to HMD
Both times I get this so far:

Debug: Performance timer Vista flag = 1
Uninitialized Hmd
Failed to init


Virtual desktop is working, so I dont know whey
it says "Uninitialized Hmd" ...

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

Re: DK2 position tracking and Freepie?

Post by CyberVillain »

Without changing anything it started to work for me, try this compile please
You do not have the required permissions to view the files attached to this post.
NeoTokyo_Nori
Cross Eyed!
Posts: 144
Joined: Wed Jul 16, 2014 10:29 am
Location: Tokyo, Japan

Re: DK2 position tracking and Freepie?

Post by NeoTokyo_Nori »

Yeah, there does seem to be a lot of voodoo magic involved in getting DK2 to work :!:

What were you able to get to work??

I will to try it asap,
But windows did a forced update, and when it re-booted,
my GPU is not working! and DK2 is not turning on either :!: :evil:

Why is it that, if one thing gets fixed, then something else new breaks :!:
So mad right now.
CyberVillain
Petrif-Eyed
Posts: 2166
Joined: Mon Jun 22, 2009 8:36 am
Location: Stockholm, Sweden

Re: DK2 position tracking and Freepie?

Post by CyberVillain »

Sounds like its not your day :/

If above works, please try this verison of FreePIE
You do not have the required permissions to view the files attached to this post.
NeoTokyo_Nori
Cross Eyed!
Posts: 144
Joined: Wed Jul 16, 2014 10:29 am
Location: Tokyo, Japan

Re: DK2 position tracking and Freepie?

Post by NeoTokyo_Nori »

CyberVillain wrote:Sounds like its not your day :/
If above works, please try this verison of FreePIE
Yeah, I guess so :/
I usually have to sleep it off, then somehow stuff will start working again by itself :roll:

Anyway, where you able to get DK1 working with this new code :?:
If so I suppose the new SDK is backward compatible with DK1 then...

Cant wait to try it out ! :)
CyberVillain
Petrif-Eyed
Posts: 2166
Joined: Mon Jun 22, 2009 8:36 am
Location: Stockholm, Sweden

Re: DK2 position tracking and Freepie?

Post by CyberVillain »

NeoTokyo_Nori wrote:
CyberVillain wrote:Sounds like its not your day :/
If above works, please try this verison of FreePIE
Yeah, I guess so :/
I usually have to sleep it off, then somehow stuff will start working again by itself :roll:

Anyway, where you able to get DK1 working with this new code :?:
If so I suppose the new SDK is backward compatible with DK1 then...

Cant wait to try it out ! :)
Yupp the SDK support both
NeoTokyo_Nori
Cross Eyed!
Posts: 144
Joined: Wed Jul 16, 2014 10:29 am
Location: Tokyo, Japan

Re: DK2 position tracking and Freepie?

Post by NeoTokyo_Nori »

After having to un-install everything related to the GPU,
do countless system restores, and messing around with the registry,
My precious has finally returned :!: :!: :woot

I can finally do some testing again,
So I will report back to you :!:
NeoTokyo_Nori
Cross Eyed!
Posts: 144
Joined: Wed Jul 16, 2014 10:29 am
Location: Tokyo, Japan

Re: DK2 position tracking and Freepie?

Post by NeoTokyo_Nori »

Hi CV,

Do you have any sample freepie code for testing with the DK2??
NeoTokyo_Nori
Cross Eyed!
Posts: 144
Joined: Wed Jul 16, 2014 10:29 am
Location: Tokyo, Japan

Re: DK2 position tracking and Freepie?

Post by NeoTokyo_Nori »

There is lots of calibration and tweaking work that has to be done,
but I can confirm that orientation tracking is working with DK2 :!:
I have not tested the position tracking yet,
but I think you have done it CyberV :!:
http://i.imgur.com/s1yBRVA.jpg

:woot :woot :D
NeoTokyo_Nori
Cross Eyed!
Posts: 144
Joined: Wed Jul 16, 2014 10:29 am
Location: Tokyo, Japan

Re: DK2 position tracking and Freepie?

Post by NeoTokyo_Nori »

Hi, the new code is definitely providing the XYZ position data.

I am just looking at the values in the watch window,
and do not have a demo/game to check it in.
So I THINK it is accurate, but it is hard to tell from looking at
lots of numbers that are changing all the time...

If there is any way to visualize the data on a graph or something,
plus log the data values, I could be more certain... :)
CyberVillain
Petrif-Eyed
Posts: 2166
Joined: Mon Jun 22, 2009 8:36 am
Location: Stockholm, Sweden

Re: DK2 position tracking and Freepie?

Post by CyberVillain »

I have been thinking of a CSV export so that you can import it in Excel and vizualize it there.

Anyway, cant you just do it with the mouse?

Code: Select all

mouse.deltaX = filters.delta(oculusVR.x) * mult
mouse.deltaY = filters.delta(oculusVR.y) * mult
#mouse.deltaY = filters.delta(oculusVR.z) * mult

if starting:
	mult = 10
NeoTokyo_Nori
Cross Eyed!
Posts: 144
Joined: Wed Jul 16, 2014 10:29 am
Location: Tokyo, Japan

Re: DK2 position tracking and Freepie?

Post by NeoTokyo_Nori »

Vert good idea :!: I will try it.
NeoTokyo_Nori
Cross Eyed!
Posts: 144
Joined: Wed Jul 16, 2014 10:29 am
Location: Tokyo, Japan

Re: DK2 position tracking and Freepie?

Post by NeoTokyo_Nori »

I can confirm that this code, shows the DK2 XYZ position
reflected on the screen like a mirror :!:

Code: Select all

def update():
	mouse.deltaX = filters.delta(oculusVR.x) * multiply
	mouse.deltaY = -1 * filters.delta(oculusVR.y) * multiply
	#mouse.deltaY = -1 * filters.delta(oculusVR.z) * multiply

if starting:
   multiply = 1500
:D :woot

I got worried at first because multiply = 10, meant that there was NO mouse movement!
CyberVillain
Petrif-Eyed
Posts: 2166
Joined: Mon Jun 22, 2009 8:36 am
Location: Stockholm, Sweden

Re: DK2 position tracking and Freepie?

Post by CyberVillain »

Nice, then I can consider DK2 development complete! (For now)

Yeah, optical tracking has one big advantage, its very accurate, specially if you only use it for translation tracking like the Rift
Adm.Darkfire
One Eyed Hopeful
Posts: 6
Joined: Sat Dec 22, 2007 3:38 am

Re: DK2 position tracking and Freepie?

Post by Adm.Darkfire »

If we could emulate the DK1 tracker using the DK2 that would essentially enable us to play most old DK1 Demos on the DK2, as rendering them works just fine, most just miss positional tracking.

Would this be possible with FreePie at the moment?
CyberVillain
Petrif-Eyed
Posts: 2166
Joined: Mon Jun 22, 2009 8:36 am
Location: Stockholm, Sweden

Re: DK2 position tracking and Freepie?

Post by CyberVillain »

Only way would be to use a Virtual HID device driver and emulate the data of the Rift. I had a look and there are som libraries for emulating HID devices. But frankly I do not have the time to start a project of that scale.

I was hoping more devs would join the project, but it hasnt really happen :/

edit: its so sad that Oculus didnt use a c dll instead, then it would had been super easy to inject fake data
CyberVillain
Petrif-Eyed
Posts: 2166
Joined: Mon Jun 22, 2009 8:36 am
Location: Stockholm, Sweden

Re: DK2 position tracking and Freepie?

Post by CyberVillain »

I have updated to 0.4.2 of the sdk, can you guys test that I didnt break anything for you DK2 owners?

edit: Do not forget to update the OVR Runtime!
You do not have the required permissions to view the files attached to this post.
NeoTokyo_Nori
Cross Eyed!
Posts: 144
Joined: Wed Jul 16, 2014 10:29 am
Location: Tokyo, Japan

Re: DK2 position tracking and Freepie?

Post by NeoTokyo_Nori »

Hi CV,
Thanks for the update. 8-)
I will check as soon as I can.

I am only aware of these changes for 0.4.2, so wondering if there something that affects FreePIE :?:

Added OVRServiceLauncher Windows service, resolving the issue with the service not launching automatically on some systems.
Added a new chroma setting for minimum eye relief, improving chromatic aberration correction when configured through the Oculus Configuration Utility.
Added “Riftsaver” mode, which turns off Rift display in direct mode if the headset is not in use.
CyberVillain
Petrif-Eyed
Posts: 2166
Joined: Mon Jun 22, 2009 8:36 am
Location: Stockholm, Sweden

Re: DK2 position tracking and Freepie?

Post by CyberVillain »

I just think its good to build against latest version
NeoTokyo_Nori
Cross Eyed!
Posts: 144
Joined: Wed Jul 16, 2014 10:29 am
Location: Tokyo, Japan

Re: DK2 position tracking and Freepie?

Post by NeoTokyo_Nori »

Hi CV,
Ive been having a rough week with work this week,
so I finally just got around to testing it,
but glad to announce that it seems to be working fine.
I just ran my basic testing script, and it ran without errors, and it updates all tracking data.
You are a wizzard CV 8-)

So I guess this mean a new version update is coming soon?
Im still working through all the many things that have to work together
for my guns and foot controller (having some major latency issues).
But looking forward to being able to use multiple com ports soon too I hope ;)
(it really will make a difference, trust me! 8-) )

Just a thought. it maybe nice to have a simple road map for freePIE so people know
which features are being worked on, which ones are a priority or not etc. :)
CyberVillain
Petrif-Eyed
Posts: 2166
Joined: Mon Jun 22, 2009 8:36 am
Location: Stockholm, Sweden

Re: DK2 position tracking and Freepie?

Post by CyberVillain »

Yeah, i will release a version soon we have soo many small unreleased fixes.
Sadly the multiple com port feature wont make it to this version :/
NeoTokyo_Nori
Cross Eyed!
Posts: 144
Joined: Wed Jul 16, 2014 10:29 am
Location: Tokyo, Japan

Re: DK2 position tracking and Freepie?

Post by NeoTokyo_Nori »

CyberVillain wrote:Yeah, i will release a version soon we have soo many small unreleased fixes.
Sadly the multiple com port feature wont make it to this version :/
Im happy to know its in the pipeline :D
Cant wait ! :woot
Adm.Darkfire
One Eyed Hopeful
Posts: 6
Joined: Sat Dec 22, 2007 3:38 am

Re: DK2 position tracking and Freepie?

Post by Adm.Darkfire »

The FreePIE version above from Output.rar doesn't start for me.

If i try to use the updated OVRFreePie.dll with the latest version form the FreePie website Pitch yaw roll work, but xyz are unknown

I am using Windows 8.1
CyberVillain
Petrif-Eyed
Posts: 2166
Joined: Mon Jun 22, 2009 8:36 am
Location: Stockholm, Sweden

Re: DK2 position tracking and Freepie?

Post by CyberVillain »

Are you copying the files to the program folder? Uac does not like that. Also check if you need to unblock the files

I will releae a new version pretty soon with DK2 support
Adm.Darkfire
One Eyed Hopeful
Posts: 6
Joined: Sat Dec 22, 2007 3:38 am

Re: DK2 position tracking and Freepie?

Post by Adm.Darkfire »

You were right the files were blocked.

If any one encounters the same problem run the following in the Power-Shell:

Code: Select all

Get-ChildItem -recurse c:\Output | Unblock-File
(You have to replace c:\Output with the location where you unziped the files)
NeoTokyo_Nori
Cross Eyed!
Posts: 144
Joined: Wed Jul 16, 2014 10:29 am
Location: Tokyo, Japan

Re: DK2 position tracking and Freepie?

Post by NeoTokyo_Nori »

CyberVillain wrote: I will releae a new version pretty soon with DK2 support
It looks like your king will be pleased to hear about your work CyberVillan :!: :D
http://www.reddit.com/r/oculus/comments ... ulus_rift/

Isn"t it amazing the even royalty is now interested in the things that we are working on ?
Fun times :lol:
Post Reply

Return to “FreePIE”