Head tracking with Opentrack/Freetrack

A quieter space for design discussion of long-term projects
Post Reply
Talkless
Posts: 3
Joined: Sat Sep 09, 2017 8:19 am

Head tracking with Opentrack/Freetrack

Post by Talkless » Sat Sep 09, 2017 8:58 am

It would be nice to have head tracking for Pioneer.

Open source Opentrack project support multiple inputs, from simple paper tracker Aruco, (I use it with Flightgear and it works great!) to Pointracker DIY hat clip with LEDs.

What Pioneer needs is a UDP socket to receive pitch, yaw, roll, and x-y-z offsets. Here's example from Flightgear protocol:
https://github.com/opentrack/opentrack/ ... fg.cpp#L25

Or some sort of generic (I guess) UDP protocol:
https://github.com/opentrack/opentrack/ ... tn.cpp#L26

So, simply six doubles...

I believe these values should be added on top of these changed by mouse/numpad, so that you can switch to rear camera and then take a look around freely using head tracker.

I see there is Early Oculus Rift support project, not sure how this would conflict.

Anyway, I guess this would need:
  • Networking library (if Pioneer does not use something already) as a dependency.
    I would suggest boost::asio as Networking TS what is based on asio is coming into C++ standard already.
  • Some sort of ExternalTrackingSource infrastructure.
    So that cockpit view could access rotations and translations from whatever external source currently active. No need to "marry" Opentrack, there could be other implementations, although Opentrack is flexible enough by supporting multiple input sources itself.
So, any comments? If I would find time on this task myself, what Pioneer-specific guidance and tips could you give for this issue?

impaktor
Posts: 635
Joined: Fri Dec 20, 2013 9:54 am
Location: Tellus
Contact:

Re: Head tracking with Opentrack/Freetrack

Post by impaktor » Sat Sep 09, 2017 12:17 pm

I could only help with git, github, opening PRs and such, if you're not comfortable with that. Fluffyfreak knows the C++ code, and has an oculus rift branch, which sounds like it's a bit in the same domain.

Talkless
Posts: 3
Joined: Sat Sep 09, 2017 8:19 am

Re: Head tracking with Opentrack/Freetrack

Post by Talkless » Sat Sep 09, 2017 2:25 pm

I am about design decidions, not git/github, but I guess concrete questions will come in time if I ever start this.

Now that Oculus repository seems is inactive since 2014...

nozmajner
Posts: 846
Joined: Mon Jul 01, 2013 3:25 pm
Location: Budapest HU

Re: Head tracking with Opentrack/Freetrack

Post by nozmajner » Sat Sep 09, 2017 3:02 pm

I suspect most of us don't have much experience with head tracking thingies. At least I'm in the dark regarding it. Only tried it once in E:D without much success, but that was more down to my crappy camera and poor lighting.

This might be interesting anyhow: Server agent

FluffyFreak
Posts: 1152
Joined: Tue Jul 02, 2013 1:49 pm
Location: Beeston, Nottinghamshire, GB
Contact:

Re: Head tracking with Opentrack/Freetrack

Post by FluffyFreak » Sun Sep 10, 2017 5:07 pm

I've used one a couple of times, I don't get on with them personally but there's good/interesting use cases for them at least as a more practical alternative to VR.

@Talkless I also wrote the LibOVR branch :) It was an interesting experiment but always a low priority one for. It really was an experiment, lots of hacking and trying ideas out. It would never have been merged as it was hacked into just barely working as a way of seeing what might be needed to be done. The other reason I stopped was that back in 2014 the Occulus API was frequently going through breaking changes and I didn't want to have to keep rewriting everything until it had settled down.
Now however it is much more stable, however I might prefer to support something like OpenVR instead to get access to a wider range of VR devices.

As for code hints, I guess that you'd want to adapt the `MoveableCameraController` so you could start looking at how the mouse look works in `PlayerShipController::StaticUpdate` which will lead you to `InternalCameraController::RotateLeft` and go from there.
Any kind of head tracking is going to want to disable the mouse look of course so it will need to override that when it is active.

Talkless
Posts: 3
Joined: Sat Sep 09, 2017 8:19 am

Re: Head tracking with Opentrack/Freetrack

Post by Talkless » Sun Sep 10, 2017 6:56 pm

Thanks @FluffyFreak for hits!

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest