Anyone got any clues on getting XRTrackers to work?

Godot Version

4.2.1

On Linux using Monado

Question

Lots of hints in the documentation that adding SteamVR trackers into the game ought to be handled somehow but I’m basically stuck not knowing what I’m doing.

The Index Controllers work fine, with XRController3d objects in the scene and the trackers set to “right_hand” or “left_hand”

Monado is reporting that it recognizes the trackers exist as it starts up:

	Using builder lighthouse: Lighthouse-tracked (Vive, Index, Tundra trackers, etc.) devices builder
	Got devices:
		0: Vive HMD
		1: HTC Vive Tracker
		2: HTC Vive Tracker
		3: Valve Index Controller
		4: Valve Index Controller
	In roles:
		head: Vive HMD
		left: Valve Index Controller
		right: Valve Index Controller
		gamepad: <none>
		eyes: <none>
		hand_tracking.left: Valve Index Controller
		hand_tracking.right: Valve Index Controller
	Result: XRT_SUCCESS

But still only the XRController3D objects which have “left_hand” or “right_hand” set as their “Tracker” actually show up.

If I iterate though XRServer.GetTrackers on startup it’s only showing the head and two controllers, not the trackers.

The documentation says to “listen for signals”, and I can attach a function to the XRServer.TrackerAdded during the _ready of an object but suspect the XR is already systarted up by then since it gets no signals even for the 3 tracked objects that we can indeed see.

I can create a new XRPositionalTracker and add that manually:


        XRPositionalTracker tttracker =  new XRPositionalTracker();
        tttracker.Type = XRServer.TrackerType.Controller;
        tttracker.Hand = Godot.XRPositionalTracker.TrackerHand.Unknown;
        tttracker.Name = "/user/vive_tracker_htcx/role/waist";
        XRServer.AddTracker(tttracker);

That does call the added handler, but doesn’t actually start any tracking. I don’t really think I’m supposed to be manually adding the trackers though. Here I’m aware I’m not assigning a device-ID to that name either so dunno how it would be supposed to know which of the tracker devices it was tracking.

Can’t listen for button or joystick signals of course because the trackers have no buttons or joysticks.

Has anyone successfully gotten some trackers to work at all?
Or on Linux?
Or with Monado?

Any ideas what I’m supposed to do in order to get the trackers actually moving an object in my scene?

Thanks.

Hummm. I copied everything over to a Windows install.

Interestingly the windows install does show more trackers in XRServer.GetTrackers, one for every role even though none of them actually then seem to track the physical position of any of the the hardware devices.

So might be some kinda linux/monado bug I guess?

I shall investigate more in a less weird setup I suppose. Anyone with any working code in any system would love to see what you did.

Okay, so the SteamVR settings has a Controllers/Manage-Trackers panel.

There we can assign which tracker takes each role.

And with that done the XRController3D objects assigned to those roles are indeed tracking.

Great!

So I guess the question is, what is the Monado equivalent to assigning these trackers to roles? The roles aren’t even showing as existing on the Linux/Monado but maybe they would if I could assign a device to them somehow.

Maybe there’s a settings-file I can edit? That’d be nice.

Yeah, even if we configure those trackers to be attached to roles in the SteamVR interface on the Linux machine, Monado still can’t pick it up.

So it seems as though, as least for now, there is no way to configure which trackers are assigned to which roles in Monado, and thus they never tigger the plugin to make them show up in the Godot system.

Guess I’ll be in Windows when I need the extra trackers then.

You could try asking in the monado irc or discord Monado - Developer Site

Thanks. I tried a bug report ( A way to assign trackers to roles (#341) · Issues · Monado / Monado · GitLab ) - Sounds like someone has a fork I can look into.

One thing to check is whether you action map contains entries for the trackers, without entries in the action map they won’t be bound.

Also it helps turning on verbose output in your project settings (or running with the -v command line switch). We dump out a bunch of extra data that can help see whats going on.

The action-map does indeed contain the trackers, one for each of the roles which I can’t assign to any trackers. Not really sure why they are there though since there’s no buttons on the trackers to map to any actions.

Apparently the problem is that Monado doesn’t expose the XR_HTCX_vive_tracker_interaction extension, and there’s a fork that does ( https://gitlab.freedesktop.org/BabbleBones/monado/-/commits/vive_tracker3/ ) but it hasn’t been merged into main as yet. Hard to tell if there are plans to do so and I won’t have time to look into it for a little while.

You can connect peripherals to the HTC tracker through its USB port and it allows you to add buttons :slight_smile: For instance there are a number of manufacturers that make gun props a tracker can be attached to so you have both spatial tracking and button input.

Indeed the XR_HTCX_vive_tracker_interaction needs to be implemented, I’ve only tested with SteamVR myself which supports it.

For Monado I highly recommend joining their Discord and asking about it. Very often these things get stale because not enough people are testing the work.