r/OSVR • u/rpavlik • Feb 01 '17
HDK Discussion Updated tracker code now merged and ready for testing!
Potential issues/sub-optimal performance with SteamVR-OSVR, or with devices that haven't had their IR board firmware updated - see below for details
At last, we've merged the updated video-based tracker code (aka the blobs_undo_bad branch) in to master in OSVR-Core, which means that the latest Core Snapshot (version 0.6.1924-g5affce6 and later), and now, the latest Runtime Installer includes the binaries of the new tracker plugin!
Updated 2-Feb: You can now download an OSVR Runtime Installer that includes the plugin - you want version 0.6.1935-ga2cba4b6
Yes, it will still print an "experimental" warning on startup in the first build (post-v0.6-1934 the warning is removed), and some use cases might not be ideally tuned, but it is a substantial improvement over the previous plugin, and it made sense to integrate this for wider usage now rather than wait any longer to get it "perfect" given that we had expected to have it completed much before now. Sorry for the delay; tracking isn't a simple problem, and the perfect is the enemy of the good.
The updated tracker code does a lot of things better than the old code: I summarize a few of them below in the course of the notes, but in general it should be more reliable and more stable, on both HDK 1.x and HDK 2. It's also far more featureful and extensible.
Note that there have been refinements based on feedback here, which are found in Core/Runtime builds with version number v0.6-1935 and later - it makes some of the notes below non-issues. I've tried to update accordingly, and will keep updating as new builds roll out.
Config files
For compatibility, and because the new tracking system is actually an entirely independent plugin from the old one (which was actually two plugins configured to work together), there are new sample config files to use if you want to use the new tracking, known as the "UnifiedVideoTracker". They are:
osvr_server_config.UnifiedVideoTracker.HDK2NotUpgradedDirect.json- For HDK2 units that were manufactured as HDK2 (not upgraded with the upgrade kit) - in direct mode. (HDK 2 chassis has slightly different IR beacon positions from 1.x, so this config has a line to indicate it should choose the HDK2 beacon pattern.)
- Modify as needed for extended mode.
osvr_server_config.UnifiedVideoTracker.HDK2UpgradeKitDirect.json- One of the rare places where a manufactured HDK 2 differs from one made with an upgrade kit: this config file is for upgrade-kit HDK 2 units that were originally HDK 1.3/1.4. It has HDK 2 display configuration, but HDK 1.x beacon locations.
- Modify as needed for extended mode.
osvr_server_config.UnifiedVideoTracker.HDK13DirectPortrait.json- for HDK 1.3/1.4 in direct mode in portrait (ideal).
- Modify as needed for extended mode, see other config for landscape.
osvr_server_config.UnifiedVideoTracker.HDK13DirectLandscape.json- for HDK 1.3/1.4 in direct mode in landscape.
- Typically you'd only use landscape direct mode on a 1.x if you're using an AMD card - their drivers don't appear to like the portrait display timings. Other reasons to use landscape on 1.x would be a wireless transmitter or other HDMI peripheral that won't work with a portrait input. (Landscape mode rotation on an HDK 1.x incurs a 1-frame latency penalty because of the requirements of actually performing the image rotation and scan-out.)
- Modify as needed for extended mode, see other config for portrait.
osvr_server_config.UnifiedVideoTracker.HDK12DirectLandscape.json- for HDK 1.2 in direct mode, landscape video input - as above, you'd leave it landscape likely only if you're using an AMD card, or a wireless transmitter or other HDMI peripheral that won't work with a portrait input.
- Can be modified for extended mode or portrait.
Notes
Please read at least the bold/italic text as there are important differences/changes you should be aware of.
Config and calibration (updated 1-Feb)
While the config files (in the original build only - removed post-v0.6-1934) mention calibration files and they can in fact be used, please don't; do not pre-calibrate unlike with the old tracker plugin, especially if you are using a manufactured HDK2.
- The calibration tool is based on the core of the old tracker plugin, which isn't aware of the changed HDK2 beacon locations, so if you make a calibration file it won't be based on the right positions to start with, but will override them instead. You can just delete or rename your calibration file so it's not found to prevent it from loading.
- While both old and new plugins actually auto-calibrate the beacon locations during runtime, the new plugin does a much more effective job of this, so pre-calibration hasn't been necessary in every test I'm aware of.
- This also means the calibration tool is an even worse way of looking inside the operation of the tracker than it was before, since it's using the old algorithm - if you want to see the annotated camera image, just enable the debug view line in the config file. Small performance hit, so it's off by default, but I know people like to look at this stuff sometimes.
- For optimal functioning of the rear tracking target, update the head circumference value in the config file to match your head. The default is somewhat large (it's the circumference of the glass head I use for initial testing, tbh) and will actually work OK with smaller heads too, but the algorithm will have to work less hard to "auto-calibrate" those rear beacons into place if it starts with a better estimate of where they are on your head. Units are centimeters, measured around where the head strap goes. (It's just used to estimate a diameter/distance from the front HMD beacons to the back ones.)
Default position (updated 1-Feb)
Note that the new tracker has a default location specification for the camera of (0, 1.2, -0.5) - which means that by default, it assumes that the camera is at approximately eye level for a seated position and that the reported position is approximately corresponding to the real world, with the origin (0, 0, 0) below you on the floor. A few implications:
- You have to zoom out to see the HMD on tracker viewer - use the scroll wheel.
- You might need to change the "cameraPosition" config for some games that were used to having your head at (0, 0, 0) - the default is as if there was this line in "params":
"cameraPosition": [0, 1.2, -0.5]
Testing and Latency (updated 1-Feb)
- When testing, test a native OSVR application before trying any SteamVR applications. The SteamVR plugin doesn't currently convey the velocity reports needed for SteamVR to do prediction, so it will likely have more judder than it should. OSVR native apps using RenderManager correctly use the reported velocities to predict poses to the render time. Yes, a fix to SteamVR-OSVR to resolve this is forthcoming. See my comments in this post for more details. (Update 10-March: I think this has been merged...)
The prediction intervals may not be entirely perfectly tuned yet, so if you see lag even in an easy to render OSVR native application, edit (increase) the
"staticDelayMS"value in one of the following RenderManager config files as appropriate for your HDK. This adjusts the latency compensation time. Note that v0.6-1934 and later contain updated values here which may resolve lag issues. (Don't mess with the other delays in these files - they're innate to the HMD hardware and thus well-known.)renderManager.direct.landscape.HDKv2.0.newtracker.jsonfor HDK 2renderManager.direct.portrait.newtracker.json- for 1.xrenderManager.direct.landscape.newtracker.json- for 1.x in landscape mode
In case of unplugging/camera movement
The new plugin now uses the IMU (orientation tracker) in the same processing step as the camera data. This provides overall improvements to both position and orientation tracking. It does mean, however, that you'll get even more unexpected results than you would have with the old plugin if you unplug/replug the HMD during tracker operation (since that would require the software to re-align the IMU and camera, which it currently only does at startup) or if you move the camera during operation (which is in fact the same problem, just the other half of it, and a good deal harder to detect).
- Restart the server if your HMD comes unplugged or you move the camera. Shouldn't need to restart any applications, though.
IR board and other firmware (updated 10-March)
This plugin is meant for use with upgraded IR driver board firmware, and may theoretically work poorly or not at all with older firmware. Performance on old IR board firmware is not correlated with performance on updated IR board firmware. This plugin has only been (recently) tested using upgraded IR driver board firmware, which is required to work around sync and exposure issues in the third-party IR camera, as well as to improve the tracking stability by selectively disabling some LEDs. Tests with an older version of this branch on the old driver board firmware on HDK 1.x indicated that the performance, while theoretically improved, had unpleasant artifacts. So, we only recommend using this if you've upgraded your IR driver board firmware. The firmware update improves reliability and range, and particularly so when used with this new plugin. (Not sure if updated firmware is shipping in new units yet.) More details in my reply to this comment
- If you decide to use the old firmware with this, please share your experiences in the comment thread I started below specifically for that purpose . Note that old IR board firmware is not recommended for use with either plugin, since the sync issues on the camera can result in loss of tracking then a "snap" as it regains lock if you move too quickly or rotate your head quickly. It would be slightly useful to know if people generally find this plugin better or worse than the old one on old firmware, just for those who cannot update their firmware yet.
- However, at least on HDK 2, the community impression appears to be that the plugin is a substantial improvement even if you haven't updated your IR board firmware. This is presumably at least in part because beacon locations moved for HDK 2, and the old plugin isn't aware of this, while the new plugin is. You still won't see the best possible tracking if you haven't updated the IR board firmware, but it seems reasonable at this point to recommend using this plugin on HDK 2 regardless of your IR board firmware.
- The plugin will not run at all if your IR camera has outdated firmware. This shouldn't be an issue for most HDK2 users, and I'm hoping that essentially all users have updated their IR camera by now, but in case it appears to do nothing, check the console messages for a warning about your firmware version.
- The version of the main firmware on the HDK doesn't affect tracking in general. This version number (something like 1.99), while important for general usage, doesn't really affect the behavior of the tracking unless you've got a really old firmware version that is delaying IMU reports, or if you're on a firmware for HDK2 that doesn't reliably start/stop the display. (in the latter case, see https://www.reddit.com/r/OSVR/comments/5rc807/another_testing_firmware_for_the_hdk_2_v199dev/ for a firmware that should hopefully fix your problem.)
HDK 1.3/1.4 "Performance Upgrade" (updated with workaround for those without access to a Windows machine)
If you're using an HDK 1.x that hasn't been upgraded to an HDK 2, note that this plugin is tuned for usage with the "performance upgrade" installed. This is a one time software process, available through the OSVR Store at no charge. You will see the best performance if you've done this process, though it will work without it if you don't have access to a Windows machine to run the tool once (in terms of relative importance to positional tracking, the IR board firmware upgrade is more critical).
- After installing the performance upgrade, do be sure to update to the latest main HDK firmware - the performance upgrade tool currently installs 1.98 when it's done, but 1.99 is available.
If you don't have the performance upgrade, you'll likely see more latency, since the reporting rate is lower, the orientation data that is coming in has some additional latency in it, and angular velocity has more on top of that, compared to post-"performance upgrade". I'd suggest trying the following changes which might help, though note the values are just approximate and haven't been thoroughly tested:
"orientationMicrosecondsOffset": -5000- One of the following:
"useAngularVelocity": false(disable usage of angular velocity input altogether - doesn't affect angular velocity output) or"angularVelocityMicrosecondsOffset": -5000(only works with v0.6-1934 or later)
- If you come up with values that are better, let us know here or on GitHub.
- Since the Performance Upgrade is not compatible with the HDK 1.2 hardware, builds v0.6-1934 and later come with the above workaround in the 1.2 config file.
Console Messages (clarified)
The console messages are somewhat different than the old plugins; while I've quieted most of the debug-type messages, some remaining (and useful!) status messages (for troubleshooting or understanding what's going on) might be a bit more technical in phrasing than a general audience might expect.
For instance, "In flight reset - error bounds exceeded" just means the tracker has lost sight of you or something similar, and is not a problem if tracking otherwise works. Error in that case is actually just talking about statistical distributions and a common part of operation, not that something has gone wrong. It means the tracker knows its incremental "guesses" have gotten increasingly uncertain past a limit we've coded in, usually because it hasn't gotten enough input data (beacons out of sight, etc) to be more confident (that is, reduce the estimated state error). Since this does usually mean that the HMD has gone out of sight, or at least that the position estimates are not very useful, exceeding the limit flips the tracker from "intelligent" filtering mode to "brute force" mode until it sees the HMD for sure and gets a fresh start with a full estimate. It's what keeps you from drifting too far or spinning out of control if you move out of sight.
- This is also a message you might see a lot if you are running an old IR board firmware.
- In practice, unless you're having problems, you can ignore the console messages.
- If you are having problems, the console messages, as well as a screen capture of debug view turned on, can be very useful.
Constructive feedback or questions are welcome below. Excited to move beyond the old plugin at last!
3
u/rpavlik Feb 01 '17
This is the parent comment for the "old IR firmware" users. (Don't use the old IR firmware!)
3
u/Nanospork Feb 01 '17
Hey rpvalik,
I think it would be useful to sticky this post, since there is a lot of good information in it. You may want to put critical warnings (e.g. may not work properly with previous IR board firmware and with current SteamVR-OSVR) at the top of the post to ensure their visibility.
2
u/LuisCorinthiano Feb 01 '17
I downloaded this, selected the new config, but now my device does not do anything with regards to the IMU or positional. I can use my old config to make the IMU work, but the camera does not detect my device. I tried using the debug option to show the camera feed and it shows the camera fine, and I can see the lights flashing in my HDK2, but tracker viewer or SteamVR act like the headset is not being touched.
I tried rolling back to the old firmware 1.99, and even 1.98 with no success.
Can somebody help?
2
u/llamacek Feb 03 '17
I know this might be SteamVR plugin related, but for some reason I'm not seeing the in-game model for the IR camera ever since I updated to the new Unified tracking.
2
u/Captain-Tettric Feb 15 '17
So I've got an HDK 2.0 with the old IR Board firmware, what is the latest version of OSVR core that I can use, without the new tracking?
(Yes, I know I should update the firmware, just haven't got around to it yet)
2
u/llamacek Feb 01 '17
Is there any cheaper route to flashing the IR board rather than buying the programming tool? Because shipping brings it up to 17 dollars not including tax just for the singular tool.
If anything, I'll try the new tracking with the old firmware soon and I'll post my results with a video if I can. Aside from that I'm liking the progress being made and I hope someone can make a video showing the new tracking in action to possibly further motivate me to buy the tool.
2
u/Hector_01 Feb 01 '17
so i have updated to the latest firmware (which works great) and i have the latest core. Everytime i run the config file 'osvr_server_config.UnifiedVideoTracker.HDK2NotUpgradedDirect.json' i get this error message in the server ''In flight reset - error bounds exceeded''. Is this normal cause i have no tracking in the tracker view and i'm running the correct config file (have a factory hdk 2). Thanks
1
u/vrdelta Feb 01 '17 edited Feb 01 '17
I have an HDK2 not upgraded and I get the console message that the camera firmware is outdated. When I run the camera firmware upgrade it says I have the latest version. Any ideas? Thanks and keep up the press!
Edit: I fixed it by restarting the computer couple of times and then was able to update firmware.
1
u/llamacek Feb 01 '17
I'm kinda lost right now. Which files do I replace do I with the new snapshot files, Just the bin folder? Along with that, no configs are showing up in the "Sample Configurations" tab within OSVR config using the new bin folder.
1
u/radje996 Feb 01 '17
Great to see the progress again...part of the fun is adding and configurating the HDK2 :)
I have a HDK2 received somewhere in October, so it is a non new firmware tracker I assume? I do not want to open it and do the firmware update yet... Is tracking something which will work with the former firmware...or is it a non issue and should the firmware update be done..otherwise tracking will never work?
1
u/islandvr Feb 02 '17
Just finished upgrading my IR board firmware, HDK firmware to 1.99dev, and acquiring the new OSVR-Core binary snapshot.
Tracking is significantly improved. Can move around and face all directions without losing tracking. It's still a bit spotty around 90 degrees from camera, but it holds better than I thought it would.
Think the 1.99dev firmware gave me an issue though. The display would keep either going black, or blinking and then displaying just a white stripe and the brightness would slowly intensify (unless I'm on drugs that I'm unaware of). I hadn't had this issue previously with the 1.99 firmware from november -- but had read some comments from people that had it with previous versions or something I think.
Is there some sort of specific log I can find / generate if there is need for it?
I've since reverted back to 1.99 firmware, and all is well.
Big ups on the update, /u/rpavlik !
1
u/Balderick Feb 02 '17 edited Feb 02 '17
In the
HDK 1.3/1.4 "Performance Upgrade" (updated with workaround for those without access to a Windows machine)
section it says
but there is no 1.99 available for hdk 1.# http://imgur.com/a/gj8CB
What scale is the tracker viewer grid sections? If the outside dimensions of grid is 3m x 3m (assumed largest theoretical tracked space) means each individial square equates to 0.2m or 20 cm I have tracker viewer showing me hmd is about 4m above the defined 1.2 metres you say is the new calibrated origin.
You also say this looks fine http://imgur.com/a/K4FBX
Is it?
That would mean i have a tracked play area of less than 1.2m x 1.2m going by the defined origin that is supposedly being used; which to me is definitely not okay.
Even at origin with ir camera less than 1m from hdk hmd tracking is drifty and jumpy.
1
u/bonesai83 Feb 03 '17
My HDK2 is still drifting to the left like hell, with new tracking, without camera tracking, game vortex and vortex only. anyone suggestions ?
1
u/Balderick Feb 03 '17
What would be a good way too confirm if hdk 13/14s have had the performance upgrade installed or not?
What would be a good way to confirm ir board firmware version being used?
2
u/Specter0420 Feb 01 '17
So... Has anyone with the updated IR board tried this in an app with native support yet? What are your findings? Can you look backwards then lean around? Does it still coast? Does the center still drift over time? Can you turn your head around quickly without losing positional tracking? How big of an improvement is it? I am dying to know but I need to wait a week for the flash tool to arrive...
1
u/Hector_01 Feb 03 '17
so has anyone tested the latest core build with the new tracking on a hdk 2.0 without the ir firmware update? I am still getting serious stuttering when looking around with the headset. I doubled checked to make sure the config file had the latest values and it does but yeah its super stuttery. Is this just because of the old ir firmware or not? Thanks
1
u/Specter0420 Feb 01 '17
Off to buy the IR board flash tool...