• Welcome to PiBoSo Official Forum. Please login or sign up.
 
August 28, 2025, 04:11:43 PM

News:

GP Bikes beta21c available! :)


GPB and OpenTrack/FreeTrack

Started by HornetMaX, May 26, 2015, 10:00:08 PM

Previous topic - Next topic

HornetMaX

Quote from: ptrshpt on May 27, 2015, 07:31:22 AM
Some time ago i tested facetracknoir with an webcam and it worked in GPB.
Will give it a try, but OpenTrack and FreeTrackNoIR are made essentially by the same people and my understanding (could be wrong) is that OpenTrack is somehow what replaces FreeTrackNoIR.

MaX.

HornetMaX

So, at least the mouse emulation problem is a known problem of OpenTrack: https://github.com/opentrack/opentrack/issues/157

The rest still puzzles me.

MaX.

teeds

Trying to fully understand the potential of this device but am I right in thinking it could be used as input controls? 

HornetMaX

Quote from: teeds on May 27, 2015, 10:02:35 AM
Trying to fully understand the potential of this device but am I right in thinking it could be used as input controls?
Yes, as it is sen by Windows as an HID device (i.e. a joystick/joypad essentially) with 3 analog axis.

For that you don't even need OpenTrack, just the EDTracker software running and you're good to go: you will see a new "joystick" in GPB and you can associate it to inputs.
That's why I thought about strapping the device to the joypad: you lean the joypad (not its stick) and the rider leans (or the bike leans, or the throttle goes up, ...).

MaX.

Napalm Nick

Joypad leaning is indeed a very interesting potential use.  8) Good luck.


"The post you are writing has been written at least ten times already in the last 15ish years. Its already been reported, suggested, discussed, ignored or archived (but mostly ignored). Why are you doing it again?"

teeds

My friend Jester plays GPB and MXB using the built-in tilt of a PS4 controller and he seems happy with it but he had to use a programmable adaptor to get it working as he wanted.
I'm trying to get analogue rider lean in MXB and it sounds like this might do it. I want to strap something to my chest and have the virtual rider lean when I do. I've played with this on my phone which works ok but I need my phone for other stuff and it's a bit much to strap it horizontally to my chest, this little device looks ideal though  :)


HornetMaX

Holy shite, now hear this ...

I tried at office on my office laptop (it runs GPB fine).

As son as I run opentrack 2.2 (latest stable), GPB no longer starts. Not even if I close OpenTrack.
I have to physically remove the directory in which I have unzipped the opentrack zip (there's no installation): after that GPB starts again.
There must be some dll mess going on with 2.2. Glad that was not something more serious causing this.

BTW, doesn't happen with opentrack 2.3 rc10 (latest release candidate), but it still doesn't work in GPB.

MaX.

HornetMaX

Update: I've contacted the people at EDTracker but they can't help much on the problem, their software works fine.
I've also contacted the author of OpenTrack (waiting reply).

In the while I've verified that GPB works fine with FreeTrack in demo mode, so the issue is somewhere between GPB and OpenTrack.

FaceTrackNoIR: can't start the camera thingy :(

Would probably be way easier if GPB could support assigning axes to free look.

BTW, that's why I like coding better: at least I know who to blame when my software doesn't work :)

MaX.

h106frp

May 27, 2015, 07:42:42 PM #23 Last Edit: May 27, 2015, 07:48:12 PM by h106frp
If it seems like a good affordable controller after testing then maybe native edtrack support could be added at some point.

Its a shame the GPB control setup cannot be edited at the moment as far as i can see :( although the dialogue box 'unassigned' when you click on a control suggests it might have been considered at some point - anyone know if its possible?

Other option might be something like vJoy and map it to the 'heading' keys (,.) for testing purposes.

Good detective work so far Max! Having dug out my XBox controller i can see how easy it would be to velcro the tracker underneath for a simple functional expansion of a basic controller   8)

edit: Does the input plugin offer a solution? Does anybody have some demo code to build a plugin with it?

HornetMaX

Quote from: h106frp on May 27, 2015, 07:42:42 PM
If it seems like a good affordable controller after testing then maybe native edtrack support could be added at some point.
My understanding is that EDTracker only interface is HID, so there's no native suport possible.

Quote from: h106frp on May 27, 2015, 07:42:42 PM
Other option might be something like vJoy and map it to the 'heading' keys (,.) for testing purposes.
Hmm that would be bad, as it will only move like a button (fully left/rigt).
BTW GPB freelook seems to be 2 axis only: it shouldn't be a big problem to make it 3 axis (even if probably it's not very important).

Quote from: h106frp on May 27, 2015, 07:42:42 PM
edit: Does the input plugin offer a solution? Does anybody have some demo code to build a plugin with it?
No it's not a solution, unless GPB allows to assign 2 axes to the free look.
But in that case, you no longer need the plugin anyway :)

Let's see what the OpenTrack guy says: it should just work with FreeTrack output (given that GPB works with FreeTrack and that OpenTrack works with many FreeTrack games).
Also, if OpenTrack fixes the mouse emulation, it could also work via that (for free look I mean).

MaX.

HornetMaX

Quote from: ptrshpt on May 27, 2015, 07:31:22 AM
Some time ago i tested facetracknoir with an webcam and it worked in GPB.
Yep, FaceTrackNoIR works with GPB.

Have to say that face-tracking in OpenTrack seems to have better performance. If only it worked with GPB, it would be already interesting to test: it doesn't seem to eat up too much CPU (i5-2500K @ 4.5GHz), so maybe it is already a valid no-hardware solution for people using rider pov and wanting to have free look.

MaX.

h106frp

After a bit of research (idle browsing  ;))...
The processor used in edtrack has native HID mouse (and joystick) support libraries so it is possible that the opensource code could be modified to output a mouse stream directly, it might be that if a case for free look (mouse look) could be made the edtrack developers (or some other Arduino developer) would implement it.

The other option might be FreePIE, it promises that you can write scripts (python based) that translate between any input devices.
http://andersmalmgren.github.io/FreePIE/

Getting emails telling me my hardware bits are in the post  :). Quite looking forward to wielding the soldering iron on this.
I went for the developers circuit board and box as it makes life easier, the device smaller and its a bit of support for a worthy opensource project. This brings the cost for a magnetometer unit to about £28 homemade so you save about a tenner over buying a pre-assembled unit.

HornetMaX

Quote from: h106frp on May 28, 2015, 08:19:23 AM
After a bit of research (idle browsing  ;))...
The processor used in edtrack has native HID mouse (and joystick) support libraries so it is possible that the opensource code could be modified to output a mouse stream directly, it might be that if a case for free look (mouse look) could be made the edtrack developers (or some other Arduino developer) would implement it.
I'll ask it to Dan (the EDTracker guy that replied to my questions): that would be likely ideal as no other software would be required. Not sure it's trivial though.
Still OpenTrack probably provides more flexibility in terms of filtering and axis manipulations (scale, mapping, curves etc).

I've filed an issue report on OpenTrack GitHub (https://github.com/opentrack/opentrack/issues/165) and it seems other games are currently affected (IL-2 Sturmovik: Battle of Stalingrad), so maybe the dev will have a look.

I'm a tenacious bugger (as you all know) and this thing should just work.

MaX.

h106frp

Having native mouse look would open up edtrack to most first person games and 3D modelling apps, seems a worthwhile update to the code if they want a wider user base.

HornetMaX

Quote from: h106frp on May 28, 2015, 11:48:30 AM
Having native mouse look would open up edtrack to most first person games and 3D modelling apps, seems a worthwhile update to the code if they want a wider user base.
Dan replied that they already have it in their to-do list. Sort of low=priority at the moment: they are working on "productizing" the current model (make it retail sellable) and on a wireless version.

I do believe that having native mouse interface would be a plus for them, but to be honest, having GPB allowing to assign joystick axes to free look (head movements) would probably be even simpler.

MaX.