FreakTheMighty / linux-track

Automatically exported from code.google.com/p/linux-track
MIT License
0 stars 0 forks source link

Add support for TrackIR 3 Pro? #7

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I just compiled everything on Linux and then discovered that the TrackIR I've 
got is the version 3 Pro..

Any hope of adding support also for the version 3?

Congratulations on creating this project!

Best regards
Ola Røer Thorsen

Original issue reported on code.google.com by o...@silentwings.no on 22 Sep 2011 at 12:09

GoogleCodeExporter commented 9 years ago
Hello,
I was hoping to add TrackIR3 support one day, unfortunately I didn't get my 
hands on a TrackIR3 device...
So the only way to do that is to get me logs of the communication of the device 
with TrackIR software. Normally I do that using Windows virtual machine running 
inside linux and I capture the communication using usbmon program... Something 
similar could be possible under windows alone but I don't know which software 
to use for that (although I know there is some, since a guy asking for TIR5 
support first used it).
If you can get me the full log of the communication, from plugging the device 
in, starting tracking, maybe doing something else (does TIR3 have some LEDS?) 
whatever you can think of (plus some description - at 0:40 I made red LED 
glow...), than I can try and analyze that to see if I can figure out how does 
it work.
Then I'd be able to tell you if I can incorporate it in, or not...

Kind regards,

Michal

PS. I might be unavailable next week and maybe more - I'm going to hospital so 
please have patience...

Original comment by f.jo...@email.cz on 23 Sep 2011 at 9:05

GoogleCodeExporter commented 9 years ago

Original comment by f.jo...@email.cz on 23 Sep 2011 at 9:06

GoogleCodeExporter commented 9 years ago
Hi,
I'm closing it now, if you wish to participate with TrackIR3 implementation (by 
providing those dumps); please reopen this issue again...
Kind regards,

Michal

Original comment by f.jo...@email.cz on 4 Nov 2011 at 6:57

GoogleCodeExporter commented 9 years ago
Hi Michal, 

yes, sorry I haven't been able to provide you with any logs yet. I'll post them 
here once I have created them. 

Best regards,
Ola

Original comment by olaroert...@gmail.com on 4 Nov 2011 at 7:04

GoogleCodeExporter commented 9 years ago
Hi Ola,
no problem, I'm somewhat busy with moving to Beta stage, providing packages and 
so on...
Anyway, as soon as you have some logs (or if you need help obtaining them), 
just let me know; then we'll see...
Kind regards,

Michal

Original comment by f.jo...@email.cz on 4 Nov 2011 at 7:37

GoogleCodeExporter commented 9 years ago
Hi Michal, ok you triggered me to just get it done :-) 

Attached is a file with some usb dumps using the TrackIR3 pro camera. It's a 
WinXP pro session running in KVM (qemu) on Linux. Installed is the latest 
TrackIR software from their website, version 5.1. 

The TrackIR "vector expansion" was activated. This enables the full 6DOF 
tracking, and was sold as an addon including the 3-point cap "trackclip" that 
is standard in the later models. I believe this is a software limitation only 
so I didn't monitor the USB traffic while activating it (it requires entering 
device serial number and a hash key).

USB capture was done with Wireshark. 

The dump filenames indicate what I did when. If you think you can use this at 
all then I can create more specific dumps for you. 

Best regards, 
Ola 

Original comment by olaroert...@gmail.com on 4 Nov 2011 at 8:54

Attachments:

GoogleCodeExporter commented 9 years ago
Hi Ola,
wow, that was quick...
Thanks for those captures, I'll try to take a peek at then when I get home from 
work...
I'll keep you posted.
Kind regards,

Michal

Original comment by f.jo...@email.cz on 4 Nov 2011 at 10:01

GoogleCodeExporter commented 9 years ago
I didn't manage to wait ;)
One question though - does one of those captures contain dump of what happens, 
when you plug-in the device and start the TrackIR software?
The problem is, I can't find neither firmware upload sequence, nor some status 
queries, that are present in the communication with 4 and 5 models...
Also one more dump would be handy - to move marker out of sight and move it so 
it enters view from one side and exits the other, for left/right and up/down.
Thanks,

Michal

PS. Other than that, the protocol looks very familiar... So for now it looks 
good.

Original comment by f.jo...@email.cz on 4 Nov 2011 at 11:55

GoogleCodeExporter commented 9 years ago
Hi Michal,

here is an updated set of capture files. The new files are:

trackir_sw_running_plug_in_tir3_enterviewfromleft_exitright_unplug_tir3.usb
The trackIR software was started with the camera unplugged. Then I plugged it 
in, waited until it was detected, then moved the marker from left to right 
(yellow led on camera goes on and off), then unplugged the camera.

plug_in_tir3_start_trackir5software_stop_trackir5software_unplug_tir3.usb
I plugged in the camera, then started the trackir software, it detected the 
camera, stopped the software again and unplugged the camera.

enterview_from_left_exit_right.usb
enterview_from_top_exit_bottom.usb

Best regards,
Ola

Original comment by olaroert...@gmail.com on 7 Nov 2011 at 11:14

Attachments:

GoogleCodeExporter commented 9 years ago
Thank you Ola!
Looking to those dump it seems there is no firmware being uploaded to the 
device, unlike 4 and 5 models, which makes the job easier for me...
You said you compiled linuxtrack already right?
I'll make a branch for the development purposes and let you know when it is 
done, so you can test it...
One more question - can you confirm the TrackIR3 usb id is 131D:0155 ?
Thank you,

Michal

Original comment by f.jo...@email.cz on 7 Nov 2011 at 11:43

GoogleCodeExporter commented 9 years ago
That's great, yes I got it compiled so I can test the branch once it's set up. 

And yes, that's the correct USB ID too :-) 

Best regards,
Ola

Original comment by olaroert...@gmail.com on 7 Nov 2011 at 11:47

GoogleCodeExporter commented 9 years ago
Hi Ola,
I just committed update to tir3 branch; please try to compile it and see if it 
works...
The path should be http://linux-track.googlecode.com/svn/branches/tir3
Let me know what the outcome is...
Kind regards,

Michal

Original comment by f.jo...@email.cz on 9 Nov 2011 at 9:03

GoogleCodeExporter commented 9 years ago
Hi Michal,

just compiled it! Not quite working yet, but maybe the following info can help 
you:

In the GUI application, I can now select TrackIR in the Tracking Device menu. 
It says "Firmware found!" but the install button is grey (I guess there wasn't 
any firmware to upload anyway). 

On the console, it says
Object read!

In the Tracking window, the Start and Recenter buttons are active. When I press 
Start, all buttons are disabled for a quick moment, then Start gets active 
again, Recenter remains disabled. 

There is no picture shown from the camera, only a small white square. 

On the console, it says
Opening section 'Default'
loading fake usb!

Here is the contents of the logfile:

[Wed 2011-11-09 23:32:15 CET] Starting ltr_gui
[Wed 2011-11-09 23:32:15 CET] Preferences read OK!
[Wed 2011-11-09 23:32:15 CET] Custom section 'Default' found!
[Wed 2011-11-09 23:32:15 CET] Initializing axes!
[Wed 2011-11-09 23:32:15 CET] Attempted to get nonexistent key 'Pitch-limits'
[Wed 2011-11-09 23:32:15 CET] Attempted to get nonexistent key 'Yaw-limits'
[Wed 2011-11-09 23:32:15 CET] Attempted to get nonexistent key 'Roll-limits'
[Wed 2011-11-09 23:32:15 CET] Attempted to get nonexistent key 
'Xtranslation-limits'
[Wed 2011-11-09 23:32:15 CET] Attempted to get nonexistent key 
'Ytranslation-limits'
[Wed 2011-11-09 23:32:15 CET] Attempted to get nonexistent key 
'Ztranslation-limits'
[Wed 2011-11-09 23:32:15 CET] Custom section 'Default' found!
[Wed 2011-11-09 23:32:15 CET] Initializing axes!
[Wed 2011-11-09 23:32:15 CET] Attempted to get nonexistent key 'Pitch-limits'
[Wed 2011-11-09 23:32:15 CET] Attempted to get nonexistent key 'Yaw-limits'
[Wed 2011-11-09 23:32:15 CET] Attempted to get nonexistent key 'Roll-limits'
[Wed 2011-11-09 23:32:15 CET] Attempted to get nonexistent key 
'Xtranslation-limits'
[Wed 2011-11-09 23:32:15 CET] Attempted to get nonexistent key 
'Ytranslation-limits'
[Wed 2011-11-09 23:32:15 CET] Attempted to get nonexistent key 
'Ztranslation-limits'
[Wed 2011-11-09 23:32:15 CET] Opening logfile viewer.

[Wed 2011-11-09 23:32:16 CET] Setting up Clip...
[Wed 2011-11-09 23:32:16 CET] Initializing model!
[Wed 2011-11-09 23:32:16 CET] Initializing axes!
[Wed 2011-11-09 23:32:16 CET] Attempted to get nonexistent key 'Pitch-limits'
[Wed 2011-11-09 23:32:16 CET] Attempted to get nonexistent key 'Yaw-limits'
[Wed 2011-11-09 23:32:16 CET] Attempted to get nonexistent key 'Roll-limits'
[Wed 2011-11-09 23:32:16 CET] Attempted to get nonexistent key 
'Xtranslation-limits'
[Wed 2011-11-09 23:32:16 CET] Attempted to get nonexistent key 
'Ytranslation-limits'
[Wed 2011-11-09 23:32:16 CET] Attempted to get nonexistent key 
'Ztranslation-limits'
[Wed 2011-11-09 23:32:16 CET] Tracking initialized!

[Wed 2011-11-09 23:32:54 CET] Starting server in the active mode!
[Wed 2011-11-09 23:32:54 CET] Attempted to set nonexistent section 'r_server'!
[Wed 2011-11-09 23:32:54 CET] Initializing axes!
[Wed 2011-11-09 23:32:54 CET] Attempted to get nonexistent key 'Pitch-limits'
[Wed 2011-11-09 23:32:54 CET] Attempted to get nonexistent key 'Yaw-limits'
[Wed 2011-11-09 23:32:54 CET] Attempted to get nonexistent key 'Roll-limits'
[Wed 2011-11-09 23:32:54 CET] Attempted to get nonexistent key 
'Xtranslation-limits'
[Wed 2011-11-09 23:32:54 CET] Attempted to get nonexistent key 
'Ytranslation-limits'
[Wed 2011-11-09 23:32:54 CET] Attempted to get nonexistent key 
'Ztranslation-limits'
[Wed 2011-11-09 23:32:54 CET] Tracking initialized!
[Wed 2011-11-09 23:32:54 CET] Device Type: Track IR
[Wed 2011-11-09 23:32:54 CET] Changing state to INITIALIZING!
[Wed 2011-11-09 23:32:54 CET] Loading library 'libtir'
[Wed 2011-11-09 23:32:54 CET] Running!
[Wed 2011-11-09 23:32:54 CET] Changing state to INITIALIZING!
[Wed 2011-11-09 23:32:54 CET] Lib loaded, prefs read...
[Wed 2011-11-09 23:32:54 CET] Initializing TIR3 camera!
[Wed 2011-11-09 23:32:54 CET] Stopping TIR3 camera!
[Wed 2011-11-09 23:32:54 CET] Problem writing data to TIR! -1 - 1563867244 
transferred
[Wed 2011-11-09 23:32:54 CET] Problem writing data to TIR! -1 - 2000000 
transferred
[Wed 2011-11-09 23:32:54 CET] Problem writing data to TIR! -1 - 0 transferred
[Wed 2011-11-09 23:32:54 CET] Problem wiggling LEDs
[Wed 2011-11-09 23:32:54 CET] Problem writing data to TIR! -1 - -1229160108 
transferred
[Wed 2011-11-09 23:32:54 CET] Problem writing data to TIR! -1 - 2000000 
transferred
[Wed 2011-11-09 23:32:54 CET] Problem writing data to TIR! -1 - 0 transferred
[Wed 2011-11-09 23:32:54 CET] Problem wiggling LEDs
[Wed 2011-11-09 23:32:54 CET] Problem writing data to TIR! -1 - 0 transferred
[Wed 2011-11-09 23:32:54 CET] Problem wiggling LEDs
[Wed 2011-11-09 23:32:54 CET] Problem writing data to TIR! -1 - 0 transferred
[Wed 2011-11-09 23:32:54 CET] Problem wiggling LEDs

[Wed 2011-11-09 23:32:54 CET] Problem writing data to TIR! -1 - 1549225016 
transferred
[Wed 2011-11-09 23:32:54 CET] Couldn't send config data request!
[Wed 2011-11-09 23:32:54 CET] Problem initializing tracker!
[Wed 2011-11-09 23:32:54 CET] Changing state to ERROR!
[Wed 2011-11-09 23:32:54 CET] Calling shutdown without initializing first!
[Wed 2011-11-09 23:32:54 CET] Just left the main loop!
[Wed 2011-11-09 23:32:54 CET] Finishing server!

Original comment by olaroert...@gmail.com on 9 Nov 2011 at 10:36

GoogleCodeExporter commented 9 years ago
Hi Ola,
could you try one quick thing?
Go to the file src/tir_hw.c, change line 17 from

#define TIR_IN_EP  0x01

#define TIR_IN_EP  0x02

and compile again...
Please let me know how it goes...
Kind regards,

Michal

Original comment by f.jo...@email.cz on 10 Nov 2011 at 8:15

GoogleCodeExporter commented 9 years ago
It works! We now have full 6DOF tracking in the 3d model view. Excellent work!!!

The yellow status LED on the camera switches on and off with the start/stop 
buttons (when Signalize status is checked), not when the clip marker enters the 
view like with the TrackIR software. Don't know if that is intentional or not.

I'll test the interface with my own software now :-)

Best regards,
Ola

Original comment by olaroert...@gmail.com on 10 Nov 2011 at 10:03

GoogleCodeExporter commented 9 years ago
Hi Ola,
thanks for the good news!
The LED really signalizes if the tracker is running or not - it is a feature ;) 
I'll incorporate the change needed and merge it back to the trunk, so there 
will be no need to use this branch anymore...
Thanks for your help and let me know if you encounter any problems.
Kind regards,

Michal

PS. When merged back to the trunk, I'll ask you for another check that it still 
works and if it does, I'd close this issue.

Original comment by f.jo...@email.cz on 10 Nov 2011 at 10:10

GoogleCodeExporter commented 9 years ago
Hi Ola,
I just reintegrated the stuff from tir3 branch - try to checkout the trunk and 
compile there; it should work...
Please let me know how it goes...
Kind regards,

Michal

Original comment by f.jo...@email.cz on 10 Nov 2011 at 9:01

GoogleCodeExporter commented 9 years ago
Hi Michal,

just tested the trunk SVN, everything works. 

I also got the interface working in my own applications now. Great API, very 
easy to use. :-) 

Ola

Original comment by olaroert...@gmail.com on 11 Nov 2011 at 9:32

GoogleCodeExporter commented 9 years ago
Hi Ola,
thank you for the info...
I'll close this issue then.
Thank you for your help and cooperation!

Michal

Original comment by f.jo...@email.cz on 11 Nov 2011 at 9:47