Board index FlightGear Development New features

linux-track and FlightGear

Discussion and requests for new features. Please note that FlightGear developers are volunteers and may or may not be able to consider these requests.

Re: linux-track and FlightGear

Postby pommesschranke » Sat Jan 11, 2014 3:04 pm

so far I had no luck with opentrack or headtrack, but
the binary package of linuxtrack-0.99.7-64.zip
did work almost out of the box on my Linux Mint 13.
The only dependency that was missing on my computer was:
libcwiid1

Code: Select all
sudo apt-get install libcwiid1


This version of linuxtrack does not require IR LED or Wiimote,
it can also do webcam face detection.
pommesschranke
 
Posts: 1117
Joined: Sat Apr 27, 2013 8:58 pm
Location: EDLM & LJCE
Callsign: d-laser
IRC name: laserman
Version: git
OS: Linux Kubuntu 22.04

Re: linux-track and FlightGear

Postby santosdumont » Thu Jan 16, 2014 12:19 am

I've now got linuxtrack-0.99.8-64 (there's another tar.gz folder inside) in Downloads (Mint15) but no idea how to install it! I tried https://code.google.com/p/linux-track/w ... kg_install but that implies it's in the repositories which it no longer is.
santosdumont
 
Posts: 168
Joined: Mon Nov 03, 2008 10:20 pm

Re: linux-track and FlightGear

Postby pommesschranke » Tue Jan 28, 2014 7:24 am

I did unpack it into the /opt folder:
Code: Select all
cd /opt
sudo tar xvfz /home/YOURUSERNAME/Downloads/linuxtrack-0.99.7-64.tar.gz
sudo ln -s linuxtrack-0.99.7 linuxtrack

cd linuxtrack/bin
./ltr_gui


if it doesent start then check dependencies:
Code: Select all
ldd ./ltr_gui
pommesschranke
 
Posts: 1117
Joined: Sat Apr 27, 2013 8:58 pm
Location: EDLM & LJCE
Callsign: d-laser
IRC name: laserman
Version: git
OS: Linux Kubuntu 22.04

Re: linux-track and FlightGear

Postby santosdumont » Thu Jan 30, 2014 3:52 pm

Linux Mint 15
FGFS 2.12.1
Linuxtrack 0.99.8

I did get it installed & gui works OK but when I fire up FGFS the default view is usually to the left, sometimes right, but never ahead. Head movement has little effect.
First I open terminal & run ltr_pipe:

Code: Select all
ltr_pipe: Initializing ltr_pipe
ltr_pipe: Initializing LinuxTrack library
Slave reader thread function entered!
Opening master comms!
Starting as master!
Sending string Default
Master comms opened => u -> 8  d -> 10
Master is responding!
Master Uplink 8, Downlink 10
Trying to register slave!
Slave @fifo 13 registered!
ltr_pipe: Working


I've added the linuxtrack options to FGo!:

Code: Select all
 --generic=file,in,200,/tmp/fifo,linuxtrack.nas
          --prop:/sim/linuxtrack/enabled=1


When I launch FGFS I get this:

Code: Select all
Starting /usr/games/fgfs with following options:
   --atlas=socket,out,5,localhost,5501,udp
   --aircraft=ask13
   --airport=KRHV
   --fg-root=/usr/share/games/flightgear/
   --fg-scenery=/home/paul/terrasync:/usr/share/games/flightgear/Scenery
   --runway=31L
   --enable-real-weather-fetch
   --enable-fullscreen
   --disable-hud-3d
   --generic=file,in,200,/tmp/fifo,linuxtrack.nas
   --prop:/sim/linuxtrack/enabled=1

--------------------------------------------------------------------------------

Enabling ATI viewport hack
environment init
Loading local weather routines...
Valid position data received. Connected successfully.
linuxtrack.nas: initialized
linuxtrack.nas: enabled heading, pitch, roll
linuxtrack.nas: registered 'Default'
linuxtrack.nas: registered 'Helicopter View'
linuxtrack.nas: registered 'Chase View'
linuxtrack.nas: registered 'Tower View'
linuxtrack.nas: registered 'Tower View Look From'
linuxtrack.nas: registered 'Chase View Without Yaw'
Nasal runtime error: insert into non-container
  at /usr/share/games/flightgear/Nasal/view.nas, line 215
  called from: /usr/share/games/flightgear/Nasal/linuxtrack.nas, line 232
Error in ground network. Failed to find first waypoint: 0 at KFAT



I've tried recentering with kill -HUP $(pidof ltr_pipe) and get ltr_pipe: Recenter in the ltr_pipe terminal but doesn't make any difference.
When I enter ldd ./ltr_gui a whole list of libs appears, not sure what I'm looking for.
I've asked Linuxtrack compiler but he admits to being unfamiliar with FGFS, does anyone know what needs tweaking?
santosdumont
 
Posts: 168
Joined: Mon Nov 03, 2008 10:20 pm

Re: linux-track and FlightGear

Postby pommesschranke » Mon Feb 03, 2014 8:45 am

Today I tried ltr_pipe for the first time.
ltr_pipe on my laptop and Flightgear on the Game-PC:

Code: Select all
./ltr_pipe --output-net-udp --dst-host=gamepc  --format-flightgear               


I tested the Laptop internal webcam and an external OmniVision USB Webcam(05a9:4519).
Both cams work fine in ltr_gui.

The internal lenovo cam does work in Flightgear after recentering with kill -HUP :D
The external USB Cam does not work with ltr_pipe :(

Code: Select all
Parent 11254 died! (3)
Parent 11254 died! (1)
We have HUP in Master!
Shutting down tracking!
                      
pommesschranke
 
Posts: 1117
Joined: Sat Apr 27, 2013 8:58 pm
Location: EDLM & LJCE
Callsign: d-laser
IRC name: laserman
Version: git
OS: Linux Kubuntu 22.04

Re: linux-track and FlightGear

Postby santosdumont » Mon Feb 03, 2014 9:20 pm

There 3 ways of invoking ltr_pipe: fifo, udp, or tcp. I found that on my set up only tcp defaults to centre, so the answer is to try all of them & see which works best.
santosdumont
 
Posts: 168
Joined: Mon Nov 03, 2008 10:20 pm

Re: linux-track and FlightGear

Postby pommesschranke » Mon Feb 10, 2014 1:46 pm

hmm.. I guess my problem is not between LinuxTrack & FlightGear but
on the lower level between ltr_pipe and ltr_server1

Code: Select all
a@b:/opt/linuxtrack/bin$ ./ltr_pipe --format-flightgear
ltr_pipe: Initializing ltr_pipe                                                                                   
ltr_pipe: Initializing LinuxTrack library                                                                         
Slave reader thread function entered!                                                                             
Opening master comms!                                                                                             
Starting as master!                                                                                               
Sending string Default                                                                                           
Master comms opened => u -> 8  d -> 10                                                                           
Trying to register slave!                                                                                         
Master is responding!                                                                                             
Master Uplink 8, Downlink 10                                                                                     
Slave @fifo 11 registered!                                                                                       
ltr_pipe: LinuxTrack library timeout                                                                             
ltr_pipe: Exiting                                                                                                 
ltr_pipe: Bye.                                                                                                   
We have HUP in Master!                                                         
Shutting down tracking! 


that also happens with
Code: Select all
--output-stdout

or
Code: Select all
--output-file=FILENAME


without any udp or tcp
pommesschranke
 
Posts: 1117
Joined: Sat Apr 27, 2013 8:58 pm
Location: EDLM & LJCE
Callsign: d-laser
IRC name: laserman
Version: git
OS: Linux Kubuntu 22.04

Re: linux-track and FlightGear

Postby pommesschranke » Tue Feb 11, 2014 1:53 pm

I tried 4 different (old & cheap) webcams. 2 of them are working:
- the built-in webcam of my Lenovo Notebook
- and this one:
06f8:3005 Guillemot Corp. Hercules Dualpix Exchange

In ltr_gui I get 6fps
that's not good but acceptable if I move my head slowly

I have the feeling that the view always stays straight when I don't move my head, independent of the attitude of the aircraft. I like that.


In the Device Setup I have both sliders on the left:
Optimize for precision
Smoothing: None

After a plane crash or after choosing another airport FG lost the connection to ltr_pipe.
I had to restart FG.
pommesschranke
 
Posts: 1117
Joined: Sat Apr 27, 2013 8:58 pm
Location: EDLM & LJCE
Callsign: d-laser
IRC name: laserman
Version: git
OS: Linux Kubuntu 22.04

Re: linux-track and FlightGear

Postby Godspeed » Wed Feb 12, 2014 9:01 am

Anyone able to get the x, y, z movement working?

I got pitch, roll, heading working, but x, y, z has no responds, well, z originally is fov, which is OK, but I changed it to /sim/current-view/target-z-offset-m, and it has no effect just like x, and y.

Would be great if anyone has a solution, thanks!
Godspeed
 
Posts: 3
Joined: Thu Feb 28, 2013 10:10 pm

Re: linux-track and FlightGear

Postby flyingfisch » Fri Mar 14, 2014 2:56 am

ltr_gui gives me a seg fault, when run with sudo I get this:

TrackIR device was found, but you don't have permissions to access it.
Please install the file 51-TIR.rules to the udev rules directory
(consult help and your distro documentation for details).
You are going to need administrator privileges to do that.
Beechcraft A35 Bonanza
Wiki Page
GitHub Repo
Improving the 737-300
Forum Thread
All my projects
User avatar
flyingfisch
 
Posts: 306
Joined: Mon Oct 07, 2013 2:11 pm
IRC name: ffisch
Version: 3.0
OS: Ubuntu 12.04

Previous

Return to New features

Who is online

Users browsing this forum: No registered users and 9 guests