HTC Vive Tracker Developer Guide

HTC released the Vive accessory Vive Tracker to expand devices connected to SteamVR. It also features Pogo pins, allowing users to DIY special function accessories. Recently, I’ve seen some amazing creative uses of the Vive Tracker. Relevant materials and technical details are organized in this article.

HTC Vive Tracker

Some amazing creative uses of the Vive Tracker:
Using the Vive Tracker to add positional tracking to mobile phones, allowing phones to join VR games and adding positional tracking to Daydream:

Note: Its implementation actually involves creating a room on a PC as a Server, allowing mobile devices to join the game via the network and have a Camera. The position information of the tracked Tracker is then synchronized to the mobile device and modifies the Camera’s position. The display on the mobile device is therefore the modified Camera view, making it seem like the phone has positional tracking—a clever approach (I expect using the Tracker to add positional tracking to DayDream follows the same method).

Using the Vive Tracker pin extensions to create special function hardware devices (spray cans):

HTC has also open-sourced an implementation of full-body IK using three Trackers: vive_ik_demo
Officially recommended tutorial on VIVE Tracker: New Project Code and Tutorials Released for VIVE Tracker
Guide for HTC Vive Tracker v1.6:

Related news: Vive Tracker Now Available for Developer Purchase

Set Vive Controller/Tracker Type

The Vive Tracker can be used for positional tracking, but it is not limited to that alone. Under normal circumstances, the default type after Tracker recognition is tracker, but in some cases, one may want to use the tracker to replace the controller for operations, such as:

  • Using the Tracker as the third camera for MR, replacing the required third controller
  • Using the Tracker or peripherals made with the Tracker to replace the controller in games

To achieve these two objectives, the Tracker’s type needs to be modified to controller, tricking the base station into thinking the Tracker is a Controller. HTC once provided a tool to modify the Tracker’s type: Vive Tracker Role Changer (this version is v0.8; the latest is v1.0, but HTC stopped the download of this software for some reasons).
It is also possible to achieve the same functionality without using this tool (I demonstrate modifying the Controller to a Tracker as an example). Here’s how:
First, unplug any other VR devices from the computer, then use a USB cable to connect the Controller/Tracker to the computer.
Open the installation path for Steam (SteamVR):

1
Steam\steamapps\common\SteamVR\tools\lighthouse\bin\win64

Find lighthouse_console.exe, and run it in the console:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
C:\Program Files (x86)\Steam\steamapps\common\SteamVR\tools\lighthouse\bin\win64>lighthouse_console.exe
Version: lighthouse_console.exe (buildbot_vortex-windows_steamvr_rel_win64@vortex-windows) 04924513
Attached lighthouse receiver devices: 3
LHR-AE438993
lighthouse_console: Connected to receiver LHR-AE438993
Attempting HID Open IMU: LHR-AE438993
Lighthouse IMU HID opened
LHR-AE438993: Firmware Version 1518829406 watchman@runner-watchman 2018-02-17 FPGA 531(2.19/0/2) BL 1517470641
Data request is out of range
Request Starting:0x0
Ending:0x18
Max Address is:0x3
LHR-AE438993: Successfully fetched gyro/accelerometer range modes from the device. GyroRangeMode:3 AccelRangeMode:2
Attempting HID Open Optical: LHR-AE438993
Lighthouse Optical HID opened
Attempting HID Open VrController: LHR-AE438993
Lighthouse VrController HID opened
LHR-AE438993: Read config of 2214 bytes from [vid:28de, pid:2300] (LHR-AE438993) and inflated to 9317 bytes

lh>

The currently connected device LHR-AE438993 will be detected, and you will enter the lh console.
In the lh console, input the command:

1
2
3
lh> downloadconfig
LHR-AE438993: Read config of 2214 bytes from [vid:28de, pid:2300] (LHR-AE438993) and inflated to 9317 bytes
Wrote 9317 bytes to LHR-AE438993.json

A LHR-*.json file will be generated in the current directory, with content as follows:
First generation controller:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
{
"acc_bias": [
-0.163,
0.08808,
-0.2593
],
"acc_scale": [
1,
1,
0.9959
],
"device_class": "controller",
"device_pid": 8210,
"device_serial_number": "LHR-F7099945",
"device_vid": 10462,
"gyro_bias": [
0.01332,
-0.003239,
0.01065
],
"gyro_scale": [
1.0,
1.0,
1.0
],
// ...
}

Second generation controller:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
{
"device_class": "controller",
"device_pid": 8960,
"device_serial_number": "LHR-AE438993",
"device_vid": 10462,
"firmware_config": {
"bwd_config": "0x392B",
"charge_current_low_temp_ma": 256,
"charge_current_ma": 512,
"charge_current_nominal_ac_ma": 768,
"charge_current_nominal_usb_ma": 512,
"charge_term_current_ma": 128,
"charge_voltage_limit_mv": 4400,
"charging_low_temp_threshold_c": 10,
"mode": "controller",
"radio": true,
"recharge_voltage_mv": 100,
"sensor_env_on_pin_a": 0,
"spi_flash": false,
"sys_min_voltage_mv": 3500,
"trackpad": true,
"trigger": true,
"trigger_adc_max": 3900,
"trigger_adc_min": 300,
"trigger_adc_zero": 400,
"vrc": true
},
// ...
}

You can see that device_class indicates the current device type.
You can change its value to controller/generic_tracker (I’m changing controller to tracker as an example, and vice versa):

1
"device_class": "generic_tracker",

Save and close the file, return to the lh console command window, and input the following command:

1
lh> uploadconfig

After completing, input exit to leave lh (don’t close the window directly), restart SteamVR, and then its device type will have changed to Tracker.

Related links:

SteamVR Multi-Driver Support

You need to modify the config/steamvr.vrsetting file in the Steam directory, adding activateMultipleDrivers under the steamvr item in this JSON formatted file:

1
2
3
4
5
6
7
{
"steamvr" : {
"lastVersionNotice" : "1.3.20",
"lastVersionNoticeDate" : "1553731712",
"activateMultipleDrivers" : true
}
}

After saving, restart SteamVR to apply the changes.

When filming MR videos, you can use a third Controller as a virtual camera. If there is no third Controller, you can use a tool to virtualize one: VirtualControllerDriver, which requires enabling SteamVR’s multi-driver support.

未完待续。

Scan the QR code on WeChat and follow me.

Title:HTC Vive Tracker Developer Guide
Author:LIPENGZHA
Publish Date:2019/04/03 11:41
Update Date:2019/04/10 09:42
Word Count:3.5k Words
Link:https://en.imzlp.com/posts/2125/
License: CC BY-NC-SA 4.0
Reprinting of the full article is prohibited.
Your donation will encourage me to keep creating!