Board index FlightGear Support Hardware

TrackIR, EDTracker, vJoy, FreePIE, OpenTrack - headtracking

Joysticks, pedals, monitors.

TrackIR, EDTracker, vJoy, FreePIE, OpenTrack - headtracking

Postby flug » Tue Feb 28, 2017 9:37 am

I couldn't get any of the existing head tracking setups to work the way I liked. So, here is my solution just in case it helps anyone else:

https://github.com/bhugh/LinuxTrackFG/a ... ase1.0.zip

Below is the README file from the release that explains more about the system and various options for getting it to work.

FYI this was inspired by and based on ideas in this thread: viewtopic.php?f=24&t=28718&p=306069#p275280

LinuxTrackFG - README

LinuxTrackFG is a script that allows just about any headtracking type device to
be used in Flightgear.

Specifically, it allows any headtracking type device that can output position
and rotation as a virtual joystick, to be used in FlightGear. However, below
techniques are described that allow most any common headtracker (TrackIR,
EDTracker, etc etc etc) to translate its output to a virtual joystick device.

LinuxTrackFG may or may not be the BEST way to accomplish this task, but it is
A way, and it works.

LinuxTrackFG is a fork of the portions of the LinuxTrack software related to
FlightGear. Note the the files from LinuxTrack included and modified here are
just a very, very small portion of the overall LinuxTrack progrect. The only
files included here are those related directly to the FlightGear interface.

LinuxTrack by uglyDwarf can be found here:

https://github.com/uglyDwarf/linuxtrack

The headtracking devices and software that could work with this type of setup
include:

EDTracker - appears as a joystick device, making it very easy to work with
OpenTrack - used with many different types of headtracking systems
FreePIE + vJoy - can taken a variety of different input from Headtrackers,
keyboard, joystick, whatever, and turn it all into joystick output giving
head position)
Probably lots more

Ideas about how to set up various specific systems below.

BASIC SETUP

1. Copy directories Input, Nasal, and Protocol to your FGDATA directory
(similar directories should already exist in FGDATA).

2. Add these lines to your Flightgear command line (most of us now do
this in 'Start Flightgear' application, tab "Settings" and section
"Additional Options"):

--prop:/sim/linuxtrack/enabled=1
--prop:/sim/linuxtrack/track-all=1

3. In the Input\Joysticks\LinuxTrack directory find the file
uinput-LinuxTrack.xml and edit it with a text editor. You will see
lines like this:

<name>vJoy Device</name>
<name>EDTracker Pro</name>

Edit this section so that you have just one name, and it is the name of the
joystick device that carries your headtracking data. For instance I use
EDTracker but then I massage the data in various ways in FreePIE, which outputs
it to vJoy. So my <name> section looks like this:

<name>vJoy Device</name>

4. WARNING: Flightgear now auto-creates its own joystick config files and saves
them in a place like this:
C:\Users\YOURCOMPUTERNAME\AppData\Roaming\flightgear.org\Input\Joysticks

(Under Linux & Mac it is in a different specific location, but is a similar
type app data directory.)

This joystick config file, if it exists, will take precedence over the file
you just installed in <FGdata>\Input\Joysticks\LinuxTrack. So you may need
to delete or remove the relevant auto-created joystick file in
C:\Users\YOURCOMPUTERNAME\AppData\Roaming\flightgear.org\Input\Joysticks
in order to get the FGData version to work correctly.

Note that simply renaming the file won't help--move it to another directory
or delete it altogether.

As I was setting up my system, files of this type kept getting re-created by
FlightGear--presumably when I went into the Joystick menu and accidentally
clicked something. Just be aware of this and check/remove these files if there
is interference.


BASIC EDTRACKER SETUP

Set up as above, except that joystick name in uinput-LinuxTrack.xml will be:

<name>EDTracker Pro</name>

This will allow only pitch/roll/yaw movements with your EDTracker--no x/y/z
movements. However, it is very simple and it works.


ADVANCED EDTRACKER SETUP

1. Set up as Basic Setup above, including "<name>vJoy Device</name>".

2. Set up vJoy. See info here: viewtopic.php?f=24&t=28718

3A. Set up OpenTrack. Input = joystick (EDTracker Pro). Output=vjoystick.
Then you'll need to edit the <name> line above to be "<name>vjoystick</name>"
or whatever the exact name of that device is in windows joystick setup.

3B. OR Set up OpenTrack. Input = joystick (EDTracker Pro). Output = FlightGear.
Follow the directions in the OpenTrack program directory contrib\FlightGear
(and actually this doesn't even require or use LinuxTrack at all . . . )

3C. OR Set up OpenTrack Input = joystick (EDTracker Pro). Output = freetrack 2.0
Enhanced. Set up FreePIE (info here: viewtopic.php?f=24&t=28718 ).
Run FreePIE with the trackIR2vJoy.py script included in the FreePIE directory.

I have successfully gotten 3C to work, but not 3A or 3B.


TRACKIR SETUP

First, do Basic Setup as described above.

Then you can install FreePIE and vJoy, as described here:

viewtopic.php?f=24&t=28718

This setup is similar to the one described in that forum article, except that in
place of FGCamera, we use LinuxTrackFG. (I tried to use FGCamera but couldn't
get it to work. LinuxTrackFG is my replacement solution.)

In the FreePIE folder, you will find a FreePIE script, trackIR2vJoy.py, that
will translate TrackIR to vJoy. So your setup is:

1. TrackIR
2. FreePIE running ClodPIE11-generic.py
3. vJoy
4. LinuxTrack - set up as above, joystick name in uinput-LinuxTrack.xml will be:

<name>vJoy Device</name>


REALLY ADVANCED SETUP

I personally use a combo of these items and utilities:

1. EDTracker Pro

2. FreePIE - reads EDTracker Pro plus keyboard commands and outputs nice,
useful head movements in 6 degrees of freedom, using script ClodPIE11-flugs-personal.py
(included in FreePIE folder)

3. vJoy - accepts FreePIE output & makes it available as as Windows standard joystick device

4. OpenTrack - Joystick input set to vJoy, output set to freetrack 2.0 Enhanced;
the freetrack output feeds back to FreePIE, allowing use of OpenTrack's very nice
mapping & filtering options while also allowing some really nice movement tweaks
and keyboard-controlled movement by FreePIE that OpenTrack can't do.

5. LinuxTrack - set up as above under Basic Settings, joystick name in uinput-LinuxTrack.xml will be:

<name>vJoy Device</name>

This seems complicated, but I use the same setup in IL2 Cliffs of Dover, DCS,
Flightgear, and other similar games. It adds really useful 6-degrees-of-
freedom capability to the 3-degrees-of-freedom EDTracker naturally has, and
makes flying a lot more fun and less frustrating because you can move your head
a bit to look around posts and other obstacles in the cockpit. You can use
keys 1,2,a,s etc to move your head, but the system also does 'auto-movements'.
For example, if you look left, it auto-moves your head left. Look right,
auto-move to the right, etc. So 99% of the time you can see what you need to
just by moving your head--no keys required.

The whole system and associated programs needed to run it (aside from LinuxTrackFG)
are described here:

http://theairtacticalassaultgroup.com/f ... hp?t=23974

If you want to try a similar setup but don't necessarily like my specific keyboard
setup, you can try the included FreePIE script ClodPIE11-generic.py
flug
 
Posts: 219
Joined: Wed Jun 17, 2009 2:06 am

Re: TrackIR, EDTracker, vJoy, FreePIE, OpenTrack - headtrack

Postby Johan G » Tue Feb 28, 2017 11:28 am

Hmm, this is a very good base for a wiki article. Hint, hint, wink, wink... ;)
Low-level flying — It's all fun and games till someone looses an engine. (Paraphrased from a YouTube video)
Improving the Dassault Mirage F1 (Wiki, Forum, GitLab. Work in slow progress)
Some YouTube videos
Johan G
Moderator
 
Posts: 6629
Joined: Fri Aug 06, 2010 6:33 pm
Location: Sweden
Callsign: SE-JG
IRC name: Johan_G
Version: 2020.3.4
OS: Windows 10, 64 bit

Re: TrackIR, EDTracker, vJoy, FreePIE, OpenTrack - headtrack

Postby Wingnutt270 » Wed Mar 08, 2017 3:10 am

I'm new to FG and struggling a bit with the directions due to my unfamiliarity.

Ive got step 1 done, that was simple enough.

But im stuck at 2.

2. Add these lines to your Flightgear command line (most of us now do
this in 'Start Flightgear' application, tab "Settings" and section
"Additional Options"):

--prop:/sim/linuxtrack/enabled=1
--prop:/sim/linuxtrack/track-all=1


Where exactly is this located (command line)


I'm sure this is obvious to experienced users, but it is for sure tripping me up.

I've tried searching but am having difficulty due to the amount of changes that have been done to the game, ill find what I think is my answer, only to realize what I am looking at is NOTHING like what the directions describe, because they are from 2013...

Thanks for the help.
Last edited by Wingnutt270 on Wed Mar 08, 2017 4:09 am, edited 2 times in total.
Wingnutt270
 
Posts: 5
Joined: Wed Mar 08, 2017 3:03 am
OS: Windows 10 64

Re: TrackIR, EDTracker, vJoy, FreePIE, OpenTrack - headtrack

Postby Johan G » Wed Mar 08, 2017 4:05 am

What operating system are you using?

Oh, and Welcome to the forum! :D
Low-level flying — It's all fun and games till someone looses an engine. (Paraphrased from a YouTube video)
Improving the Dassault Mirage F1 (Wiki, Forum, GitLab. Work in slow progress)
Some YouTube videos
Johan G
Moderator
 
Posts: 6629
Joined: Fri Aug 06, 2010 6:33 pm
Location: Sweden
Callsign: SE-JG
IRC name: Johan_G
Version: 2020.3.4
OS: Windows 10, 64 bit

Re: TrackIR, EDTracker, vJoy, FreePIE, OpenTrack - headtrack

Postby Wingnutt270 » Wed Mar 08, 2017 4:07 am

Win10, sorry I should have specified that to begin with.
Wingnutt270
 
Posts: 5
Joined: Wed Mar 08, 2017 3:03 am
OS: Windows 10 64

Re: TrackIR, EDTracker, vJoy, FreePIE, OpenTrack - headtrack

Postby Parnikkapore » Wed Mar 08, 2017 5:31 am

Just paste those two lines into the "Additional Options" box.

P.S. If you're interested, the command line is the Command Prompt. Some of us use it to start FlightGear. You don't have to.
There are free alternatives to (almost) every program you encounter. You just have to find them.
Parnikkapore
 
Posts: 929
Joined: Thu Oct 29, 2015 11:16 am
Callsign: HS-FGS
Version: next
OS: Kubuntu

Re: TrackIR, EDTracker, vJoy, FreePIE, OpenTrack - headtrack

Postby Wingnutt270 » Thu Mar 09, 2017 5:41 am

I give up, Vjoy wont install, no reason given just "vjoy failed to install"

This is absurd. THE most well known and widely supported head tracker for flight sims, ever... and this convoluted mess of garbage, extra programs and files is what it takes to even make a hacked ass attempt at using it in this game?

I've spent two days worth of my limited free time trying to get this to work.

its not worth it.
Wingnutt270
 
Posts: 5
Joined: Wed Mar 08, 2017 3:03 am
OS: Windows 10 64

Re: TrackIR, EDTracker, vJoy, FreePIE, OpenTrack - headtrack

Postby hamzaalloush » Thu Mar 09, 2017 7:28 am

You're not being helpful, It's not our fault or the OP that you can't figure out how to install vJoy, providing you fix that, i can show you how to literally have it running from start to finish less than 2 minutes including starting Flightgear :P .


edit: with respect to flug, i'll post this simple method here which works for 3 degrees of freedom without any Nasal or Protocols, just simply load the provided FreePIE script from the file archive at the top of the page, and make sure to have this Joystick input file anywhere in $FGDATA\Input\Joysticks\ or C:\Users\<user>\AppData\Roaming\flightgear.org\Input\Joysticks\

then start Flightgear, no options needed unless you want tricky stuff and 6 degrees of freedom.

hamzaalloush
 
Posts: 631
Joined: Sat Oct 26, 2013 10:31 am
OS: Windows 10

Re: TrackIR, EDTracker, vJoy, FreePIE, OpenTrack - headtrack

Postby vanosten » Sat Apr 21, 2018 9:31 am

Flug: Thanks so very much for the description. The files provided in you zip works very well on my Windows 10 with the newest version of FG, the newest versions of vJoy and FreePI, TrackIR5 (I use TrackClipPro).

I just needed to do the following changes to uinput-LinuxTrack.xml:
  • Heading has a factor -100.0 instead of -1600.0
  • Pitch has a factor 100 instead of 1600
  • Roll has a factor 200 instead of -200
Maintaining osm2city. Contributing with ground attack stuff to the OPRF FlightGear military-simulation community.
vanosten
 
Posts: 540
Joined: Sat Sep 25, 2010 6:38 pm
Location: Denmark - but I am Swiss
Pronouns: he/his
Callsign: HB-VANO
Version: latest
OS: Win 10 and Ubuntu

Re: TrackIR, EDTracker, vJoy, FreePIE, OpenTrack - headtrack

Postby GinGin » Sat May 26, 2018 11:48 am

Thanks for that guys, it works like a charm with Track Ir 5 :)
GinGin
 
Posts: 1580
Joined: Wed Jul 05, 2017 11:41 am
Location: Paris
Callsign: Gingin

Re: TrackIR, EDTracker, vJoy, FreePIE, OpenTrack - headtrack

Postby StuartC » Sat May 26, 2018 2:54 pm

Works for me too, except in external views when it slowly rotates to 90 deg Up. Good for star gazing though.
StuartC
 
Posts: 3175
Joined: Fri Jun 18, 2010 9:18 pm
Location: Arse end of the Universe
Callsign: WF01
Version: 2019.1
OS: W10 64 bit

Re: TrackIR, EDTracker, vJoy, FreePIE, OpenTrack - headtrack

Postby vanosten » Sat May 26, 2018 9:04 pm

Well, i actually have the same problem. I just have some joystick code, which checks the view number when changing the view - and if not in the cockpit I disable the dynamic view through the property.

Something like:
Code: Select all
               if (getprop("/sim/current-view/view-number") > 0) {
                  setprop("/sim/linuxtrack/enabled", 0);
                  setprop("/sim/linuxtrack/track-all", 0);
               } else {
                  setprop("/sim/linuxtrack/enabled", 1);
                  setprop("/sim/linuxtrack/track-all", 1);
               }

Maintaining osm2city. Contributing with ground attack stuff to the OPRF FlightGear military-simulation community.
vanosten
 
Posts: 540
Joined: Sat Sep 25, 2010 6:38 pm
Location: Denmark - but I am Swiss
Pronouns: he/his
Callsign: HB-VANO
Version: latest
OS: Win 10 and Ubuntu

Re: TrackIR, EDTracker, vJoy, FreePIE, OpenTrack - headtrack

Postby massima » Wed Aug 15, 2018 11:28 am

After i've built my IR headtrack and compiled last code from opentrack (my binaries are here), i installed your script and it worked!!!
Opentrack needs some improvements i can't calibrate it correctly, but it is alpha.

EDIT, 05/01/19: Now the headtracking software "opentrack" works perfectly under windows and Linux, a critical bug has been corrected. On github there are binaries for windows and Debian, i compiled source code for Debian without the aruco, oculus plugins but there is the FTNoIR PointTracker plugin which i use.
User avatar
massima
 
Posts: 264
Joined: Sat Jan 03, 2015 7:48 pm
Location: Italy
Callsign: M-AXX
Version: 2020.4.0
OS: debian testing

Re: TrackIR, EDTracker, vJoy, FreePIE, OpenTrack - headtrack

Postby Robertfm » Tue Jul 02, 2019 8:41 am

Edtracker Pro Wireless now works either with Opentrack for 6 degrees of freedom (sort of) and directly with 3 degrees. Simply calibrate it. Then in FG calibrate Axis.
Robertfm
 
Posts: 1721
Joined: Thu Apr 25, 2019 5:56 pm
Callsign: RFM1
Version: 2020.3.11
OS: W10 v 19041.746

Re: TrackIR, EDTracker, vJoy, FreePIE, OpenTrack - headtrack

Postby massima » Wed Jul 03, 2019 7:30 pm

Robertfm wrote in Tue Jul 02, 2019 8:41 am:Edtracker Pro Wireless now works either with Opentrack for 6 degrees of freedom (sort of) and directly with 3 degrees. Simply calibrate it. Then in FG calibrate Axis.


i'm writing a simple code for my MPU9250 i can connect it but i have a "drift" issue. It doens't keep the current position it turns back at the normal position. I know you are using a "ready to go" product, just typing here to find a solution :mrgreen:
User avatar
massima
 
Posts: 264
Joined: Sat Jan 03, 2015 7:48 pm
Location: Italy
Callsign: M-AXX
Version: 2020.4.0
OS: debian testing

Next

Return to Hardware

Who is online

Users browsing this forum: No registered users and 8 guests