Author Topic: Making use of 6DOF headtracking, among other things  (Read 1202 times)

passerBy

  • Full Member
  • ***
  • Posts: 164
    • View Profile
Re: Making use of 6DOF headtracking, among other things
« Reply #15 on: April 06, 2017, 09:30:12 PM »
I can configur vjoy+Joystickgremlin all fine: the virtual joystick behaves well in Windows but somehow weirdly in GPB. The strange thing is that my plugin sees the virtual joystick just fine.
There's a GPB bug somewhere.
Speaking of which, during today's experiments something forced my G27 into 180 degrees rotation span even though I explicitly told it to keep it at the minimum. Not sure if this is GPB's or vJoy's doing.

HornetMaX

  • Hero Member
  • *****
  • Posts: 5535
    • View Profile
Re: Making use of 6DOF headtracking, among other things
« Reply #16 on: April 06, 2017, 09:40:54 PM »
I can configur vjoy+Joystickgremlin all fine: the virtual joystick behaves well in Windows but somehow weirdly in GPB. The strange thing is that my plugin sees the virtual joystick just fine.
There's a GPB bug somewhere.
Nevermind, no bug, just something unexpected: if you go to GPB calibration page and you don't calibrate all the devices, then things go very wrong :)
Once all devices are calibrated (even ones you don't use in GPB), then everything seems to go OK.

Will do some testing with the EdTracker used for rider lean.

passerBy

  • Full Member
  • ***
  • Posts: 164
    • View Profile
Re: Making use of 6DOF headtracking, among other things
« Reply #17 on: April 06, 2017, 10:07:30 PM »
Nevermind, no bug, just something unexpected: if you go to GPB calibration page and you don't calibrate all the devices, then things go very wrong :)
Once all devices are calibrated (even ones you don't use in GPB), then everything seems to go OK.
Also noticed that :) It can be really inconvenient. But thanks to my wheel not really wanting to share the PC with many other joystick type devices, I tend to only leave it the only one plugged :)
By the way, do you happen to know, by any chance, if there is a way to change the order of game controllers in the joy.cpl Windows applet? It's like almost everything else tries to get to the top in front of the wheel, and I need it the other way around :)

Quote
Will do some testing with the EdTracker used for rider lean.
Looking forward to that.

What's the point behind the freelooking option "Joystick" if I can't configure it in any way? Thought I'd simply redirect all the headtracking output into a 6-axes vJoy device, but what else can I do with that "Joystick" option other than choosing it?

HornetMaX

  • Hero Member
  • *****
  • Posts: 5535
    • View Profile
Re: Making use of 6DOF headtracking, among other things
« Reply #18 on: April 06, 2017, 10:32:09 PM »
By the way, do you happen to know, by any chance, if there is a way to change the order of game controllers in the joy.cpl Windows applet? It's like almost everything else tries to get to the top in front of the wheel, and I need it the other way around :)
No idea. Not sure why the order would make any difference though.

What's the point behind the freelooking option "Joystick" if I can't configure it in any way? Thought I'd simply redirect all the headtracking output into a 6-axes vJoy device, but what else can I do with that "Joystick" option other than choosing it?
Don't know. PiBoSo implemented it for EdTracker, but it has never worked for me and, anyway, you will need some serious curve mapping so you will need opentrack (or something similar) anyway.
To me, it could be removed straight away.

I just did some testing with the EdTracked strapped under my joypad: first I used the two EdTracker axes for rider lean f/b and l/r. You need to tune the curves in Joystick Gremlin (you don't want to turn your pas 180deg to lean fully forward or fully left) and GPB's deadzones and linearity (they could be included in JG's curves, but it's easier to play with GPB's settings once the curves in JG have been set). Once done, it works reasonably well. One would definitely need time to get accustomed to tilting the pad l/r or f/b to make the rider lean at the same time you're using the pad sticks and triggers: at the beginning it's not really natural. Overall I'd tend to think it will not make you faster in any way, on the contrary it will make your life a tad harder.

For fun I tried to use on EdTracker axis for bike lean: tilt the pad left/right to make the bike lean left/right. It works better than I expected. I'm constantly amazed by how much EdTracker is precise.
The JG curves I used are some sort of S curve (sigmoid) but instead of going from (-1,-1) --> (0,0) --> (+1,+1) (in X,Y coords) they go (-1,-1) --> (-0.1, -1) --> (0,0) --> (+0.1,+1) --> (+1,+1).This means that I'm using only 1/10th of the overall EdTracker range (so 36deg) to go from full lean left to full lean right. On top, in GPB I introduced a 15% deadzone and 200% linearity.

With all that, the leaning is butter smooth and very controllable (and with the absolute minimum filtering in EdTracker). This little thingy is just amazing for its price.

You can of course have 2 EdTrackers: one for head tracking (via opentrack) and one for rider lean (or bike lean) via Joystick Gremlin.
The thingy is so bloody precise you could probably use it for throttle, brakes, clutch and all ... well, that would make quite a lot of EdTrackers :)

passerBy

  • Full Member
  • ***
  • Posts: 164
    • View Profile
Re: Making use of 6DOF headtracking, among other things
« Reply #19 on: April 06, 2017, 11:13:43 PM »
No idea. Not sure why the order would make any difference though.
Because there are sims that still resort to IDing the controllers by their "Windows order", rather than by their GUIDs. GPB, for that matter, does exactly that :)

Quote
Don't know. PiBoSo implemented it for EdTracker, but it has never worked for me and, anyway, you will need some serious curve mapping so you will need opentrack (or something similar) anyway.
To me, it could be removed straight away.
Since I already use OpenTrack, that wouldn't be a problem :)

Quote
I just did some testing with the EdTracked strapped under my joypad
Hmm... I didn't think of that possibility. When it comes to rider lean and EDTracker, it definitely makes more sense to put it there.

Quote
first I used the two EdTracker axes for rider lean f/b and l/r. You need to tune the curves in Joystick Gremlin (you don't want to turn your pas 180deg to lean fully forward or fully left) and GPB's deadzones and linearity (they could be included in JG's curves, but it's easier to play with GPB's settings once the curves in JG have been set). Once done, it works reasonably well. One would definitely need time to get accustomed to tilting the pad l/r or f/b to make the rider lean at the same time you're using the pad sticks and triggers: at the beginning it's not really natural. Overall I'd tend to think it will not make you faster in any way, on the contrary it will make your life a tad harder.
As expected of a purely rotational device.

Quote
For fun I tried to use on EdTracker axis for bike lean: tilt the pad left/right to make the bike lean left/right. It works better than I expected. I'm constantly amazed by how much EdTracker is precise.
The JG curves I used are some sort of S curve (sigmoid) but instead of going from (-1,-1) --> (0,0) --> (+1,+1) (in X,Y coords) they go (-1,-1) --> (-0.1, -1) --> (0,0) --> (+0.1,+1) --> (+1,+1).This means that I'm using only 1/10th of the overall EdTracker range (so 36deg) to go from full lean left to full lean right. On top, in GPB I introduced a 15% deadzone and 200% linearity.

With all that, the leaning is butter smooth and very controllable (and with the absolute minimum filtering in EdTracker). This little thingy is just amazing for its price.

You can of course have 2 EdTrackers: one for head tracking (via opentrack) and one for rider lean (or bike lean) via Joystick Gremlin.
The thingy is so bloody precise you could probably use it for throttle, brakes, clutch and all ... well, that would make quite a lot of EdTrackers :)
After reading that, now I'm even more sure I need to get myself one of these :) Two of these would be more on the expensive side, though. And besides, I already found the perfect way to control the rider lean :) It's basically the same thing as motion capture: the upper part of the virtual rider's body gets in sync with the same part on mine :) After all, it's not about the angle the body assumes, but rather about the rider's body CG, which shifts linearly.

Either way, I need EDTracker to be able to actually see where I'm going in a turn. That's where the gyros coupled with low latency will shine.

HornetMaX

  • Hero Member
  • *****
  • Posts: 5535
    • View Profile
Re: Making use of 6DOF headtracking, among other things
« Reply #20 on: April 06, 2017, 11:35:52 PM »
No idea. Not sure why the order would make any difference though.
Because there are sims that still resort to IDing the controllers by their "Windows order", rather than by their GUIDs. GPB, for that matter, does exactly that :)
But even if your device is #2, when you assign an input to a function GPB will detect which device you're using no matter its ID.

Only problem I can see is if you are remapping devices (e.g. a device to a virtual device with vjoy). For that, have a lok at Joystick Gremlin "Input repeater function", it should solve the problem.


passerBy

  • Full Member
  • ***
  • Posts: 164
    • View Profile
Re: Making use of 6DOF headtracking, among other things
« Reply #21 on: April 07, 2017, 01:22:12 AM »
But even if your device is #2, when you assign an input to a function GPB will detect which device you're using no matter its ID.
The problem is, I use a whole lot of sims... And if it's something rFactor-based, for example, you are bound to have problems with joysticks/wheels in a different order.
Apart from car sims, I'm happy DCS World has finally had this problem solved, but there's another one: with enough joysticks and not enough screen estate, the rest of them tends to get lost outside the screen (to the right), making it a bother to reach for the appropriate column to check what your assignments for particular controller are (and those you want to see first usually end up being the rightmost).

Quote
Only problem I can see is if you are remapping devices (e.g. a device to a virtual device with vjoy). For that, have a lok at Joystick Gremlin "Input repeater function", it should solve the problem.
Still have to make the damn thing work. Is yours a 64 bit OS? Also, do you have the latest vJoy installed?

Grooveski

  • Sr. Member
  • ****
  • Posts: 409
    • View Profile
Re: Making use of 6DOF headtracking, among other things
« Reply #22 on: April 07, 2017, 01:57:48 AM »
By the way, do you happen to know, by any chance, if there is a way to change the order of game controllers in the joy.cpl Windows applet? It's like almost everything else tries to get to the top in front of the wheel, and I need it the other way around :)

JoyIDs
https://www.dropbox.com/s/eoldwadlsjz13r2/JoyIDsInstall.rar?dl=0

passerBy

  • Full Member
  • ***
  • Posts: 164
    • View Profile
Re: Making use of 6DOF headtracking, among other things
« Reply #23 on: April 07, 2017, 04:11:46 AM »
FreePIE to save the day :)
Modified the PPJoy example, and it seems to work just fine:
Code: [Select]
def update():
    x = math.degrees(freeTrack.x) * ratio
    y = math.degrees(freeTrack.z) * ratio
   
    vJoy[0].x = x
    vJoy[0].y = y
   
if starting:
    maxAngle = 180
    axisRange = 1000
    ratio = axisRange / maxAngle
    freeTrack.update += update

JoyIDs
https://www.dropbox.com/s/eoldwadlsjz13r2/JoyIDsInstall.rar?dl=0
Thanks! Looks like exactly what I had in mind.

HornetMaX

  • Hero Member
  • *****
  • Posts: 5535
    • View Profile
Re: Making use of 6DOF headtracking, among other things
« Reply #24 on: April 07, 2017, 06:45:25 AM »
Quote
Only problem I can see is if you are remapping devices (e.g. a device to a virtual device with vjoy). For that, have a lok at Joystick Gremlin "Input repeater function", it should solve the problem.
Still have to make the damn thing work. Is yours a 64 bit OS? Also, do you have the latest vJoy installed?
Win7 x64 here, latest Joystick Gremlin (7.1) with the recommended vJoy (2.1.8, https://sourceforge.net/projects/vjoystick/files/Beta%202.x/2.1.8.31-291116/vJoySetup.exe/download, it's not the very latest but apparently there are only minor changes).

What's not working for you ?

P.S.
Didn't try too hard but I got a crash when trying to use OpenTrack with vJoy as output (no biggie for me as I don't need that).

passerBy

  • Full Member
  • ***
  • Posts: 164
    • View Profile
Re: Making use of 6DOF headtracking, among other things
« Reply #25 on: April 07, 2017, 09:19:37 AM »
Win7 x64 here, latest Joystick Gremlin (7.1) with the recommended vJoy (2.1.8, https://sourceforge.net/projects/vjoystick/files/Beta%202.x/2.1.8.31-291116/vJoySetup.exe/download, it's not the very latest but apparently there are only minor changes).

What's not working for you ?

P.S.
Didn't try too hard but I got a crash when trying to use OpenTrack with vJoy as output (no biggie for me as I don't need that).
I'm getting the "failed to execute script joystick_gremlin" or something like that half the time while starting the app. Also, I can't add anything besides response curves.
The only problem I have with the OT plus vJoy combo is that it tries to send me download vJoy if I press the vJoy settings button. Other than that it works fine.

tchemi

  • Sr. Member
  • ****
  • Posts: 433
    • View Profile
Re: Making use of 6DOF headtracking, among other things
« Reply #26 on: April 07, 2017, 09:59:15 AM »
You need to tune the curves in Joystick Gremlin (you don't want to turn your pas 180deg to lean fully forward or fully left) [....]

For fun I tried to use on EdTracker axis for bike lean: It works better than I expected. I'm constantly amazed by how much EdTracker is precise.

Yep, As I said, even begginers where quite good with that on the PS3 pad. The problem I had was that I had to bank the pad 180... I didn't knew about joystickGremlin :/ :/

But yes, use gyros or accelerometers might be a good path. It is very natural and immersive

HornetMaX

  • Hero Member
  • *****
  • Posts: 5535
    • View Profile
Re: Making use of 6DOF headtracking, among other things
« Reply #27 on: April 07, 2017, 10:59:02 AM »
I'm getting the "failed to execute script joystick_gremlin" or something like that half the time while starting the app.
Happened to me a couple of times, just reset your JG profile, recreate it from start properly (and be sure not to run two instances at the same time).

Also, I can't add anything besides response curves.
Oh, that's weird (I added just a mapping and a curve, for each axis).

The only problem I have with the OT plus vJoy combo is that it tries to send me download vJoy if I press the vJoy settings button. Other than that it works fine.
Well that's OK, you need to install vJoy before you can use it in OT.
But for me, once this done, it crashes when i press the "hammer" to configure the vJoy output.

passerBy

  • Full Member
  • ***
  • Posts: 164
    • View Profile
Re: Making use of 6DOF headtracking, among other things
« Reply #28 on: April 07, 2017, 05:06:06 PM »
Happened to me a couple of times, just reset your JG profile, recreate it from start properly (and be sure not to run two instances at the same time).
I don't even have a profile to begin with. Probably need to wait a bit till the thing updates. Without EDTracker I can't come up with a use for it just yet, so it's nothing pressing.

Quote
Also, I can't add anything besides response curves.
Oh, that's weird (I added just a mapping and a curve, for each axis).
It might be about the C++ redistributables, but I don't want to replace the files I already have with older ones just for this.

Quote
The only problem I have with the OT plus vJoy combo is that it tries to send me download vJoy if I press the vJoy settings button. Other than that it works fine.
Well that's OK, you need to install vJoy before you can use it in OT.
But for me, once this done, it crashes when i press the "hammer" to configure the vJoy output.
No, that's not ok, because as I already mentioned, I got vJoy installed already. Otherwise, I wouldn't be able to use FreePIE with it ;)
We seem to have a similar problem, except for me after the "hammer" it shows the dialog urging me to "download vJoy". As long as everything else works, I don't care either.

HornetMaX

  • Hero Member
  • *****
  • Posts: 5535
    • View Profile
Re: Making use of 6DOF headtracking, among other things
« Reply #29 on: April 07, 2017, 08:00:54 PM »
It might be about the C++ redistributables, but I don't want to replace the files I already have with older ones just for this.
Replace what ?! If you have the 2015 redist installed, installing the 2010 ones will not replace anything: all the redist versions live in parallel ...
You should have all of the installed (from 2010 on, maybe even from 2008 on).

No, that's not ok, because as I already mentioned, I got vJoy installed already. Otherwise, I wouldn't be able to use FreePIE with it ;)
We seem to have a similar problem, except for me after the "hammer" it shows the dialog urging me to "download vJoy". As long as everything else works, I don't care either.
Hmm does the same for me now ... it's like it isn't recognizing vjoy is there. Weird.
I'll ask on OT github.