Jump to content

[1.4.1] KerbTrack v1.5: Head tracking using your webcam, TrackIR, Oculus Rift, joystick (2018-03-14)


pizzaoverhead

Recommended Posts

I have tried every trick on this thread to get it to work, but to no avail :-( Don't even get a menu to set it up in game. From what I can tell everything is running fine in the background. I do have a lot of mods but nothing that tries to do anything to the camera. What information would you need to know if it was even loading to KSP? Hope I can get this working, first thing I have made with my 3D printer is a head mount for my phone to use VR and I would love to fly a few of my missions first person!

Link to comment
Share on other sites

from the logs I have this every time

[LOG 02:35:56.339] Load(Assembly): KerbTrack/KerbTrack

[LOG 02:35:56.342] AssemblyLoader: Loading assembly at K:\kerbal64\KSP_win64\GameData\KerbTrack\KerbTrack.dll

[LOG 02:35:56.383] Load(Assembly): Plugins/KerbTrack/KerbTrack

[LOG 02:35:56.384] AssemblyLoader: Loading assembly at K:\kerbal64\KSP_win64\Plugins\KerbTrack\KerbTrack.dll

[LOG 02:35:56.389] AssemblyLoader: Loading assemblies

[ERR 02:35:56.403] AssemblyLoader: Exception loading 'KerbTrack': System.Reflection.ReflectionTypeLoadException: The classes in the module cannot be loaded.

at (wrapper managed-to-native) System.Reflection.Assembly:GetTypes (bool)

at System.Reflection.Assembly.GetTypes () [0x00000] in <filename unknown>:0

at AssemblyLoader.LoadAssemblies () [0x00000] in <filename unknown>:0

Additional information about this exception:

System.TypeLoadException: Could not load type 'TrackIRTracker' from assembly 'KerbTrack, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'.

[ERR 02:35:56.413] AssemblyLoader: Exception loading 'KerbTrack': System.Reflection.ReflectionTypeLoadException: The classes in the module cannot be loaded.

at (wrapper managed-to-native) System.Reflection.Assembly:GetTypes (bool)

at System.Reflection.Assembly.GetTypes () [0x00000] in <filename unknown>:0

at AssemblyLoader.LoadAssemblies () [0x00000] in <filename unknown>:0

Additional information about this exception:

System.TypeLoadException: Could not load type 'TrackIRTracker' from assembly 'KerbTrack, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'.

using fasttrackNoIR Not sure what I did wrong but I followed instructions installed fasttrackNoIR, installed game directory from your download, copied the .dll both versions have done the same response both on clean and mod versions of program

Excellent idea though I REALLY want to try this out.

Link to comment
Share on other sites

I have tried every trick on this thread to get it to work, but to no avail :-( Don't even get a menu to set it up in game. From what I can tell everything is running fine in the background. I do have a lot of mods but nothing that tries to do anything to the camera. What information would you need to know if it was even loading to KSP? Hope I can get this working, first thing I have made with my 3D printer is a head mount for my phone to use VR and I would love to fly a few of my missions first person!

Look in the output_log.txt for any mention of KerbTrack. It will tell you what's going wrong.

Link to comment
Share on other sites

[LOG 02:35:56.342] AssemblyLoader: Loading assembly at K:\kerbal64\KSP_win64\GameData\KerbTrack\KerbTrack.dll

[LOG 02:35:56.384] AssemblyLoader: Loading assembly at K:\kerbal64\KSP_win64\Plugins\KerbTrack\KerbTrack.dll

It looks like you've installed it twice. The KSP_win64\Plugins isn't used any more, it's there for mods written before ~0.18. You can delete the KerbTrack folder from K:\kerbal64\KSP_win64\Plugins\KerbTrack.

For me, Kerbtrack doesn't even get loaded. I don't have settings in the pause menu...

You need to either look through your output_log.txt for mentions of KerbTrack, or upload it to a site like pastebin and link it here so that I can do that.

Hello pizzaoverhead, this is just awesome! Thank you so much!

This plus KerbQuake are going to eat my whole weekend.

Glad you're enjoying it! There may be some issues with this and KerbQuake, as they're both fighting to change the camera position. It's something I'll have to address in future.

Edited by pizzaoverhead
Link to comment
Share on other sites

It looks like you've installed it twice. The KSP_win64\Plugins isn't used any more, it's there for mods written before ~0.18. You can delete the KerbTrack folder from K:\kerbal64\KSP_win64\Plugins\KerbTrack.

Sorry I grabbed the wrong snippet from when I was experimenting and trying to go at it alone

Here is what I got on most recent attempt all clean program.

[LOG 10:21:50.305] AssemblyLoader: Loading assembly at K:\kerbal64\KSP_win64\GameData\KerbTrack\FreeTrackClient.dll

[ERR 10:21:50.314] Failed to load assembly K:\kerbal64\KSP_win64\GameData\KerbTrack\FreeTrackClient.dll:

System.BadImageFormatException: Format of the executable (.exe) or library (.dll) is invalid.

at Mono.Cecil.PE.ImageReader.ReadOptionalHeaders (System.UInt16& subsystem, System.UInt16& dll_characteristics) [0x00000] in <filename unknown>:0

at Mono.Cecil.PE.ImageReader.ReadImage () [0x00000] in <filename unknown>:0

at Mono.Cecil.PE.ImageReader.ReadImageFrom (System.IO.Stream stream) [0x00000] in <filename unknown>:0

at Mono.Cecil.ModuleDefinition.ReadModule (System.IO.Stream stream, Mono.Cecil.ReaderParameters parameters) [0x00000] in <filename unknown>:0

at Mono.Cecil.ModuleDefinition.ReadModule (System.String fileName, Mono.Cecil.ReaderParameters parameters) [0x00000] in <filename unknown>:0

at Mono.Cecil.ModuleDefinition.ReadModule (System.String fileName) [0x00000] in <filename unknown>:0

at AssemblyLoader.ScanForBadTypeRefs (System.String file) [0x00000] in <filename unknown>:0

at AssemblyLoader.LoadExternalAssembly (System.String file) [0x00000] in <filename unknown>:0

[LOG 10:21:50.320] Load(Assembly): KerbTrack/KerbTrack

[LOG 10:21:50.321] AssemblyLoader: Loading assembly at K:\kerbal64\KSP_win64\GameData\KerbTrack\KerbTrack.dll

[LOG 10:21:50.352] AssemblyLoader: Loading assemblies

[ERR 10:21:50.362] AssemblyLoader: Exception loading 'KerbTrack': System.Reflection.ReflectionTypeLoadException: The classes in the module cannot be loaded.

at (wrapper managed-to-native) System.Reflection.Assembly:GetTypes (bool)

at System.Reflection.Assembly.GetTypes () [0x00000] in <filename unknown>:0

at AssemblyLoader.LoadAssemblies () [0x00000] in <filename unknown>:0

Additional information about this exception:

System.TypeLoadException: Could not load type 'TrackIRTracker' from assembly 'KerbTrack, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'.

Link to comment
Share on other sites

Looks like you're running KSP 64-bit with the 32-bit FreeTrackClient.dll. You need FreeTrackClient64.dll. You can download it at the bottom of this page, but be sure to rename it to "FreeTrackClient64.dll". Delete the 32-bit DLL too.

Just tried that one

[LOG 19:29:22.375] Load(Assembly): KerbTrack/KerbTrack

[LOG 19:29:22.377] AssemblyLoader: Loading assembly at N:\KSP_win\GameData\KerbTrack\KerbTrack.dll

[LOG 19:29:22.417] AssemblyLoader: Loading assemblies

[ERR 19:29:22.429] AssemblyLoader: Exception loading 'KerbTrack': System.Reflection.ReflectionTypeLoadException: The classes in the module cannot be loaded.

at (wrapper managed-to-native) System.Reflection.Assembly:GetTypes (bool)

at System.Reflection.Assembly.GetTypes () [0x00000] in <filename unknown>:0

at AssemblyLoader.LoadAssemblies () [0x00000] in <filename unknown>:0

Additional information about this exception:

System.TypeLoadException: Could not load type 'TrackIRTracker' from assembly 'KerbTrack, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'.

I am going to try on another computer system. There is a good chance with all the experimental software within my own registry that something is fouling up your mod on my end. However I think it is something to do with the last line with the 'TrackIRTracker' and FacetrackNOir.

Link to comment
Share on other sites

there are actually two versions of the freetrack interface. the old one which came with the most recent version of freetrack, and a newer one (freetrackclient 2.0) that the facetracknoir devs rewrote from scratch (in c++ instead of pascal). im pretty sure the 64-bit version is a build of the latter. its probibly a good idea to import the getDllVersion first, check the version, and then based on that either throw an error or do things differently based on which version you are using. im still trying to find the source for the 2.0 client, but i did find this:

http://sourceforge.net/p/facetracknoir/wiki/FreeTrack20/

i believe this is the source:

http://sourceforge.net/p/facetracknoir/codegit/ci/master/tree/FreeTrackClient/

Edited by Nuke
Link to comment
Share on other sites

Just tried that one

[LOG 19:29:22.375] Load(Assembly): KerbTrack/KerbTrack

[LOG 19:29:22.377] AssemblyLoader: Loading assembly at N:\KSP_win\GameData\KerbTrack\KerbTrack.dll

That's your 32-bit install. Don't put the 64-bit DLLs in it. They go in the install at K:\kerbal64\KSP_win64.

there are actually two versions of the freetrack interface. the old one which came with the most recent version of freetrack, and a newer one (freetrackclient 2.0) that the facetracknoir devs rewrote from scratch (in c++ instead of pascal). im pretty sure the 64-bit version is a build of the latter. its probibly a good idea to import the getDllVersion first, check the version, and then based on that either throw an error or do things differently based on which version you are using. im still trying to find the source for the 2.0 client, but i did find this:

http://sourceforge.net/p/facetracknoir/wiki/FreeTrack20/

i believe this is the source:

http://sourceforge.net/p/facetracknoir/codegit/ci/master/tree/FreeTrackClient/

Thanks Nuke, that's a good point.

Link to comment
Share on other sites

This is for facetrackNoIR. Good catch on the wrong combo on my post I still get the same error though.

During the last couple of days I have been trying different things on almost every log I have gotten this error message

***

Could not load type 'TrackIRTracker' from assembly 'KerbTrack, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null

***

on some I have gotten additional errors such wrong version. I am using FaceTrackNoIR v1.7 which uses freetrack2.0. I will give you any information you ask for, however, I will not compile code or try anything that requires me to compile code. I think the idea is cool and am willing to help troubleshoot but only to a point.

Kerbal Space Program - 0.24.2.559 (WindowsPlayer)

OS: Windows 7 Service Pack 1 (6.1.7601) 64bit

CPU: AMD A8-5500 APU with Radeon HD Graphics (4)

RAM: 16345

GPU: NVIDIA GeForce GTX 650 (1994MB)

SM: 30 (Direct3D 9.0c [nvd3dum.dll 9.18.13.1106])

RT Formats: ARGB32, Depth, ARGBHalf, RGB565, Default, DefaultHDR, ARGBFloat, RGFloat, RGHalf, RFloat, RHalf, R8

Log started: Thu, Sep 18, 2014 13:16:01

[LOG 13:16:04.162] Load(Assembly): KerbTrack/KerbTrack

[LOG 13:16:04.165] AssemblyLoader: Loading assembly at N:\KSP_win\GameData\KerbTrack\KerbTrack.dll

[LOG 13:16:04.211] AssemblyLoader: Loading assemblies

[ERR 13:16:04.223] AssemblyLoader: Exception loading 'KerbTrack': System.Reflection.ReflectionTypeLoadException: The classes in the module cannot be loaded.

at (wrapper managed-to-native) System.Reflection.Assembly:GetTypes (bool)

at System.Reflection.Assembly.GetTypes () [0x00000] in <filename unknown>:0

at AssemblyLoader.LoadAssemblies () [0x00000] in <filename unknown>:0

Additional information about this exception:

System.TypeLoadException: Could not load type 'TrackIRTracker' from assembly 'KerbTrack, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'.

[LOG 13:16:04.236] Load(Audio): Squad/Parts/Utility/LandingLeg/sounds/sound_servomotor

[LOG 13:16:04.406] Load(Audio): Squad/Sounds/editorLoop01

[LOG 13:16:04.739] Load(Audio): Squad/Sounds/sound_ambience_nature

[LOG 13:16:05.627] Load(Audio): Squad/Sounds/sound_click_flick

[LOG 13:16:05.713] Load(Audio): Squad/Sounds/sound_click_latch

[LOG 13:16:05.746] Load(Audio): Squad/Sounds/sound_click_sharp

[LOG 13:16:05.801] Load(Audio): Squad/Sounds/sound_click_tick

[LOG 13:16:05.846] Load(Audio): Squad/Sounds/sound_click_tock

Link to comment
Share on other sites

MY TIR is packed away for the move at the moment, so I can't test.

How does this affect external view? I don't really use IVA, but I would certainly like to be able to use head tracking to look around in 3PV.

The external view is still orbital, with pitch and rotation. It isn't ideal as it leaves one side of the craft difficult to view.

Link to comment
Share on other sites

I was looking through your source code and found where you are using

TrackIRTracker

you have that has a switch

public enum Trackers

{

FreeTrack = 0,

TrackIR = 1,

OculusRift = 2

}

switch (t)

{

case Trackers.FreeTrack:

{

Debug.Log("KerbTrack: Using FreeTrack");

tracker = new FreeTrackTracker();

break;

}

case Trackers.TrackIR:

{

Debug.Log("KerbTrack: Using TrackIR");

tracker = new TrackIRTracker();

break;

}

case Trackers.OculusRift:

{

Debug.Log("KerbTrack: Using Oculus Rift");

tracker = new OVRTracker();

break;

}

Wouldn't that mean that I should not be getting TrackIRTracker trying to load when I am not using it?

Link to comment
Share on other sites

Same problem here...

This is for facetrackNoIR. Good catch on the wrong combo on my post I still get the same error though.

During the last couple of days I have been trying different things on almost every log I have gotten this error message

***

Could not load type 'TrackIRTracker' from assembly 'KerbTrack, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null

***

on some I have gotten additional errors such wrong version. I am using FaceTrackNoIR v1.7 which uses freetrack2.0. I will give you any information you ask for, however, I will not compile code or try anything that requires me to compile code. I think the idea is cool and am willing to help troubleshoot but only to a point.

Kerbal Space Program - 0.24.2.559 (WindowsPlayer)

OS: Windows 7 Service Pack 1 (6.1.7601) 64bit

CPU: AMD A8-5500 APU with Radeon HD Graphics (4)

RAM: 16345

GPU: NVIDIA GeForce GTX 650 (1994MB)

SM: 30 (Direct3D 9.0c [nvd3dum.dll 9.18.13.1106])

RT Formats: ARGB32, Depth, ARGBHalf, RGB565, Default, DefaultHDR, ARGBFloat, RGFloat, RGHalf, RFloat, RHalf, R8

Log started: Thu, Sep 18, 2014 13:16:01

[LOG 13:16:04.162] Load(Assembly): KerbTrack/KerbTrack

[LOG 13:16:04.165] AssemblyLoader: Loading assembly at N:\KSP_win\GameData\KerbTrack\KerbTrack.dll

[LOG 13:16:04.211] AssemblyLoader: Loading assemblies

[ERR 13:16:04.223] AssemblyLoader: Exception loading 'KerbTrack': System.Reflection.ReflectionTypeLoadException: The classes in the module cannot be loaded.

at (wrapper managed-to-native) System.Reflection.Assembly:GetTypes (bool)

at System.Reflection.Assembly.GetTypes () [0x00000] in <filename unknown>:0

at AssemblyLoader.LoadAssemblies () [0x00000] in <filename unknown>:0

Additional information about this exception:

System.TypeLoadException: Could not load type 'TrackIRTracker' from assembly 'KerbTrack, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'.

[LOG 13:16:04.236] Load(Audio): Squad/Parts/Utility/LandingLeg/sounds/sound_servomotor

[LOG 13:16:04.406] Load(Audio): Squad/Sounds/editorLoop01

[LOG 13:16:04.739] Load(Audio): Squad/Sounds/sound_ambience_nature

[LOG 13:16:05.627] Load(Audio): Squad/Sounds/sound_click_flick

[LOG 13:16:05.713] Load(Audio): Squad/Sounds/sound_click_latch

[LOG 13:16:05.746] Load(Audio): Squad/Sounds/sound_click_sharp

[LOG 13:16:05.801] Load(Audio): Squad/Sounds/sound_click_tick

[LOG 13:16:05.846] Load(Audio): Squad/Sounds/sound_click_tock

Link to comment
Share on other sites

Yeah you need TrackIRUnity.dll in the GameData/KerbTrack folder. I think the TrackIRTracker has a fixed dependency on that DLL because the DLL is one of the fancy C# ones, not a native one (the native ones are loaded on-demand). So it'd fail to load the class even though it never actually uses the class? That'd be my guess, at least. I'm not sure why that DLL doesn't seem to be included in the current release.

If I remove it, my setup breaks even though I'm explicitly using the OculusRift tracker.

By the way, I updated my local fork of KerbTrack to support the interface changes in the OculusRift tracker (thanks pizzaoverhead!) so you can now

* recenter by pressing [home] (by default)

and also

* use quaternions for the head rotation (so you can look straight up/down without getting gimbal lock issues.)

Download here! Also includes the missing mystery DLL. I have no idea if this violates some license - if you think it does, sue me. (Or just tell me.)

Edited by FeepingCreature
Link to comment
Share on other sites

Yeah you need TrackIRUnity.dll in the GameData/KerbTrack folder. I think the TrackIRTracker has a fixed dependency on that DLL because the DLL is one of the fancy C# ones, not a native one (the native ones are loaded on-demand). So it'd fail to load the class even though it never actually uses the class? That'd be my guess, at least. I'm not sure why that DLL doesn't seem to be included in the current release.

Download here! Also includes the missing mystery DLL. I have no idea if this violates some license - if you think it does, sue me. (Or just tell me.)

Got me past that hurdle... Thank you!

Now is there a quick fix for enabling the feature within (scrlock works everywhere else but not for enabling kerbTrack)

Link to comment
Share on other sites

Not sure what feature you mean? KerbTrack should be active by default. Maybe search ksp.log for KerbTrack: entries to see what goes wrong?

PEBCAK error I should have looked at logs before posting. I had a right click twitch and grabbed a wrong file.

pizzaoverhead: Despite my lousy camera your mod made my day. Great work and thank you for your patience. I hope others will get something out of this

Break down of error: All three dll's are needed TrackIRUnity.dll, Oculus OVR PosRotWrapper.dll, and FreeTrackClient.dll for the my problem to go away. Download here!

FeepingCreature: Thank you!

Thaytor

Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...