Tony Wall’s Blog

Remember quality? A bit more time upfront saves a ton of trouble later ;-)

Fixing Robotics Developer Studio 4 To Run With Kinect SDK v1.7

Microsoft RDS (Robotics Developer Studio)

The current (and slightly outdated) Robotics Developer Studio 4 was built with Visual Studio 2010 for the earlier versions of the Kinect SDK. Because the first thing you do is run “SamplesBuildAllSamples.cmd” this was not a problem with earlier SDK versions (references were updated automatically during the build).

Unfortunately some breaking changes have occurred in the 1.7 SDK which require manual intervention to correct. This post shows you how to fix it.

To start with, this is what you will see if you try to build after a clean install of Visual Studio, DirectX SDK, Kinect SDK 1.7, Speech SDK and Robotics Developer Studio 4:

Build All Samples Errors

The failure appears to be in the Kinect sensor code. To fix the problem follow this procedure:

  1. Open the “SamplesSensorsKinectKinectKinect.csproj” in Visual Studio, then run a build to identify where the errors occur:
    Errors in Visual Studio
  2. Double-click the first error to navigate to it. Here it is before the changes:
    Error 1 Before
    Edit the code as shown below. Basically a method has moved to a child “CoordinateMapper” property of “this.kinectSensor” and been renamed slightly for consistency. Additionally the three individual depth point parameters (X, Y and Depth) have moved to one new DepthImagePoint parameter, so that must be constructed inline:
    Error 1 After
  3. Locate the second error, shown below:
    Error 2 Before
    This fix is just the same move and rename of the method call, no parameter changes:
    Error 2 After
  4. Locate the third error, shown below:
    Error 3 Before
    Similar fix as before:
    Error 3 After
  5. And finally the fourth error, before:
    Error 4 Before
    And after:
    Error 4 After
  6. Now build again to confirm all errors are fixed:
    Errors Fixed in Visual Studio
  7. Re-run the “SamplesBuildAllSamples.cmd” from the DSS Command Prompt, it will succeed (you can ignore the warnings):
    Build All Samples Successful (Just Warnings)
    Now you have the Kinect SDK 1.7 ready to run with Robotics Developer Studio. An important point to realize is,  as we have only rebuilt the “user” sample code, you will have to run the “*.user.manifest” files instead of the “*.manifest” files in the future.
  8. If you have batch files setup to start the various samples, like the KinectUI.cmd and Eddie.cmd distributed with Parallax Inc’s MARK reference platform (“Eddie” robot) add-on, you should edit them to start the user manifests:
    Edit Sample Script to Start User Manifest
  9. Now you can test the working Kinect sample from RDS with the new 1.7 SDK:
    Fixed Code Running with Kinect SDK 1.7

EDIT 2013.04.29: I found a link to a Microsoft patch on CodePlex with similar code, confirming this fix is valid. Unfortunately they didn’t publicise this so most people won’t find it. Here is the official link if you just want to download the finished file:

Tagged , , , , ,

Leave a Reply

Your email address will not be published. Required fields are marked *