Alpha Release #6.0.9

@HipsterSloth HipsterSloth released this Jan 9, 2017 · 29 commits to master since this release

HOTFIX - Fixed incorrect lens distortion calibration defaults

  • Only manifested on new trackers or trackers that changed USB ports
  • Added "lens_calibration_version" to config to force config update to the new distortion settings

Fixed Issue #322 (Memory spike at opening service)

  • Shared memory mapped files now opened in "shared_mem" folder adjacent PSMoveService.exe
  • This fixes occasional weird issues with trying to open temp folders in c:\ProgramData\boost_interprocess

SteamVR driver fixes

  • Fix issue with the wrong controller model showing up (set controller version type at creation time)
  • Added protocol version check that verifies the plugin isn't trying to connect to the wrong version of the service.

Added notion of "protocol version"

  • SteamVR client will fail with "Version Mismatch" log if the plugin version doesn't match service version
  • Version displayed at the top of the config tool window and at start of PSMoveService.log

Zero'ing out all angular velocity and acceleration results from all orientation filters

  • Orientation prediction in SteamVR using this data was too noisy
  • Except kalman filter, which is less noisy


  • Jan 7, 2017


    Fixed Issue #322 (Memory spike at opening service)
    * Shared memory mapped files now opened in "shared_mem" folder adjacent PSMoveService.exe
    * This fixes occasional weird issues with trying to open temp folders in c:\ProgramData\boost_interprocess

Alpha Release #6.0.7

@HipsterSloth HipsterSloth released this Jan 2, 2017 · 37 commits to master since this release

"Region of Interest" (ROI) optimization is now enabled by default

  • NOTE: If you already ran the alpha 6.0.6 build then you'll need to manually set "disable_roi" to false in your TrackerManagerConfig.json file since the old default has already been saved out.

Fixes for ROI

  • Checking against the wrong flag to see if the previous frames projection was valid
  • Don't modify trackerPoseEstimateRef.bCurrentlyTracking until after call to tracker->computeProjectionForController
  • Fixed projection area calculation to use pixels instead of normalized screen coords for ellipse
  • Made min ROI size 32 pixels instead of 10
  • Added "min_valid_projection_area" config value to tracker manager config
    • contours smaller than this size (pixels^2) are rejected if an ROI region smaller than the screen is used

Assorted Crash/Assert Fixes

  • Fixed uninitialized trackingColorType in compute tracker poses tool
  • Fixed divide by zero issue with cv:moments in tracker code
  • Fixing slightly un-normalized quaternions in LightBar optical orientation quaternions

Assorted Fixes for DS4 support (in progress)

  • Enable LightBar tracking in orientation test for DualShock4
    • Optical weight calculation in OrientationFilterComplementaryOpticalARG was completely broken
    • Yaw blending doesn't seem to be working correctly in OrientationFilterComplementaryOpticalARG,, reverted to pure quaternion blending for the moment


Alpha Release #6.0.6

@HipsterSloth HipsterSloth released this Dec 12, 2016 · 47 commits to master since this release

This release contains a ton of new code, some of which has been in progress since mid July. Several parts aren't completely done yet, but it was becoming painful to maintain many separate branches with so much churn in the master branch. So we decided to merge everything in its current state together now we are at a better merge point.

Multiple Controllers and Tracker PoV in tracking test tool

When testing tracking you can now see all connected controllers at once with the their associated bulb color and tracking id displayed:


You can also see the tracker point of view (PoV) for each tracker. This is useful for testing at a glance why tracking might be failing for a given tracker.

"Region-of-Interest" or ROI optimization

The most expensive part of the service by far is the image processing work to extract the tracking blobs from the video feed. The best way to deal with this is to have a model of where you think the controller will show up on screen and then search in a bounding box around that location. Since you are processing way fewer pixels you can typically see large performance gains from this. Chad was awesome and implemented this over the last few weeks.

This feature is currently disabled by default, but can be turned on by setting "disable_roi" to "false" in TrackerManagerConfig.json:

    "version": "2",
    "optical_tracking_timeout": "100",
    "use_bgr_to_hsv_lookup_table": "true",
    "tracker_sleep_ms": "1",
    "excluded_opposed_cameras": "false",
    "disable_roi": "false", <--- This is true by default

You can see the ROI region in the tracking PoV (select the "tracker video" button in the trst tracking tool). In that view you'll see the ROI box following the controller around.


One important bug with ROI. When tracking starts, if there is some other light source that could be considered the controller when the actual controller is out of view, the ROI will lock on to that light source. It won't track the actual controller when it comes into frame because it thinks it already sees the controller. You have to "displace" the imposter by moving the controller into the ROI box that the imposter is occupying. You can get around this issue by making sure the controller is in frame when tracking starts.

Lens Distortion Compensation

Every web cam lens has some amount of barrel distortion. Until now we haven't been correcting for it. This leads to small inaccuracies in position new the edges of the tracking frame. In order to compute the barrel distortion parameters we know have a calibration tool that you show a calibration pattern in several positions. Once enough samples have been captured we can compute the focal length and distortion parameters for the camera.

You don't actually need to run this tool for the PS3EYE since we now have the focal lengths and distortion parameters baked in. However this was an essential tool to add for support multiple camera types, which we want to support soon.

If you are really curious and want to run the tool look for the "distortion calibration" button on the tracker settings panel. The distortion calibration tool looks like this:


You'll need to print out the calibration mat found here:

The tool will ask you to measure the distance between the squares on the calibration mat. Usually this is around 24mm.

New Orientation and Position filter framework

You can now select between different orientation and position filters in the controller config. You can also reset to defaults if you forgot what the default filter settings were. The most important new filters are the Kalman Orientation and Position filter. We've spent months trying to get a version of these filters working. They are essential for smoothing out noisy optical tracking, which allows the DS4 to work at all.


Unfortunately the position Kalman filter still has some issues dealing with the accelerometer bias and extracting gravity from the signal, so for moment the Kalman position filter only smooths the optical tracking position. This results in the Kalman position filter feeling more latent than it should. Hopefully I can get the final kinks with this part of the filter worked out in the coming weeks.

If you do use the Kalman position or orientation filter I strongly recommend running the new optical noise calibration tool first. This tool measures how much noise we get from the raw position (and orientation in the case of the DS4) optical tracking. This is turn tells the Kalman filter how much to trust the optical measurements for a given tracking blob size. The optical noise calibration tool has pretty clear instructions. Basically you'll hold the controller in place at 10 different distances from the camera and then it will compute a best fit curve to the data it records. If you don't run this tool there are reasonable defaults in place.


Client CAPI

Current the client api is written in C++. This make psmove service trickier to interface with other programming languages (python, C#). We have a new client C api that wraps the C++ api. This still has some work to do, but is largely in place now. Over the coming months I'll be switching over the PSMoveConfig tool and SteamVR plugin to the C-API. Once that is done I'll rip out the C++ api that that we dont have to maintain two different client interfaces.

Intial PSVR headset work

Nothing to see here... move along...

In all seriousness, there is some initial work I have in place for supporting the PSVR headset. This is still in very early development. I don't have optical tracking working yet. Don't bother poking around in this and hoping to do anything fun/useful with it yet. It's only in this release because we merged together some other branches. Once I have a chance to get more interesting work done on this I'll post some documentation on how to use this.

No more 32-bit releases

You can still build a 32-bit version of the project. But I'm not going to include the 32-bit version in the releases anymore. It's a pain to build both versions due to the manual build creation process I have at the moment. If you really do wan't the 32-bit version of the releases, please let me know in the google group.


Alpha Release #5.5.3

@HipsterSloth HipsterSloth released this Nov 13, 2016 · 247 commits to master since this release

PR #273 by gb2111 Ignore opposing cameras in camera triangulation

  • Can reduce tracking jitter cause by bad triangulation between camera pairs that are facing each other
  • Useful with 3 or 4 camera configuration
  • Enabled with "excluded_opposed_cameras" flag in TrackerManagerConfig.json
  • Set to false by default

Fixed issue with recenter button not respecting the 250ms delay

  • Holding SELECT for >= 250ms should trigger a controller recenter
  • However there was a bug in the button logic (PRESS and DOWN were swapped) that caused the delay to be ignored
  • This is problematic if you had SELECT mapped to other actions


Alpha Release #5.5.2

@HipsterSloth HipsterSloth released this Nov 11, 2016 · 251 commits to master since this release

5.5.2 FEATURE - PR #272 by gb2111 - Use native image flip on ps3eye to save on CPU

5.5.2 HOTFIX - Fixed broken time delay on recenter (select button)

5.5.1 HOTFIX - Fixed broken virtual touchpad feature (spatial offset mode)

Added a configurable sleep time for PSMoveService (by gb2111)

  • Used to throttle update rate in main loop
  • Useful if you are having CPU related issues
  • Edit the "tracker_sleep_ms" value in %appdata%\PSMoveService\TrackerManagerConfig.json
  • Default is "1", which is a 1ms sleep in the main loop
  • If having CPU issues, try setting it to "20"
    • This will effectively cause you to ignore every other tracking camera frame
    • Almost halves CPU load at the cost of tracking responsiveness

Support for PSMoveController without a magnetometer

  • Controllers with newer firmware have the magnetometer disabled :(
  • Magnetometer will show up as disabled in the config tool if this is the case
  • Added orientation reset
    • Point the controller forward and hold down the select button for a 1/4 second
    • You should see the controller snap forward if it had drifted
    • Can be performed as many times as you want in either SteamVR or the Orientation test tool

Virtual touchpad fixes (by gb2111)

  • Don't send virtual touchpad movements if a virtual touchpad button (up/down/left/right) event has been sent (for a small time period)
  • Don't send virtual touch pad button events mapped to start/select buttons if the start+select button combo was pressed

Logging fixes

  • PSMoveService now saves logs to "PSMoveService.log"
  • Fixed missing new lines in the console logs

Adding logging for debugging Magnetometer issues

  • Added output to magnetometer calibration showing raw magnetometer stream
  • Added stream flag logging to server request handler

Fixed issue with trigger not working in some games (Serious Sam)

  • Switched trigger button event to using a thresholded trigger value
  • Fixed mis-labeled controller axes in steamvr plugin:
    • Axis 0 is now the touchpad axis
    • Axis 1 is now the trigger axis

Fixed issue where controllers wouldn't connect in Win8.1

  • Upgraded to latest version of HIDapi
  • Fixing uses of hid_get_feature_report to take into account +1 feature report size.


  • Nov 10, 2016


    Fixed broken virtual touchpad feature
  • Nov 5, 2016


    Clean up related to PR #264
    * switched from boost::this_thread::sleep to std::this_thread::sleep_for
     - This required getting ride of a using namespace boost to fix an ambiguous 'xtime' symbol
    * Got rid of dependence on "PSMoveProtocol.pb.h" in device manager headers
      - changed return type on getListUpdatedResponseType() from PSMoveProtocol::Response_ResponseType to int.

Alpha Release #5.4

@HipsterSloth HipsterSloth released this Oct 17, 2016 · 280 commits to master since this release

Merged PR #237 by gb2111 (Selected controller tracking + tracking status)
-Test Tracking menu now works for selected controller, not first controller
-Added display in the UI to show the tracking status for each tracker
-Camera volume color is rendered in either green or red color depending if tracking or not.

Merged PR #245 by gb2111 (Tracker Setting improvements)

  • Controller color type displayed for selected controller in tracker settings
  • Use the color of the selected controller when entering the color settings tool

Fixes for issues #239 and #238 (SteamVR lock up issues)

  • Switched from using ShellExecuteA to CreateProcessA when spawning monitor_psmove.exe
  • Added a bunch of logging to driver_psmoveservice.cpp
  • Added check in monitor_psmoveservice.cpp to make sure only one instance of the process is running (Windows only)
  • Switch back to using resource path passed into monitor_psmove.exe rather than using GetModuleFileNameA


Alpha Release #5.3

@HipsterSloth HipsterSloth released this Oct 6, 2016 · 292 commits to master since this release

Bug Fix: Issue #215 - PSMoveService crash if PSNavi is connected via USB

Bug Fix: All config files now get saved on load to make sure new defaults are saved out.

Feature - Issue #221 - Changing controller colors

  • Added color drop down in the controller setting dialog pane
  • Color setting is stored in controller config json as "tracking_color"
  • If a controller has no assigned tracking color it gets assigned one from the available pool
  • If you change the color of a controller to a color another controller is using, the other controller gets assigned the next color from the available color pool.

Merge pull request #225 from gb2111

  • Simple velocity filter via exponential smoothing (you can now throw things!)
  • Enabled by default
  • Disabled for a given controller with "enable_filtered_velocity": "true" flag in the controller JSON file