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 “Samples\BuildAllSamples.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:
The failure appears to be in the Kinect sensor code. To fix the problem follow this procedure:
- Open the “Samples\Sensors\Kinect\Kinect\Kinect.csproj” in Visual Studio, then run a build to identify where the errors occur:
- Double-click the first error to navigate to it. Here it is before the changes:
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:
- Locate the second error, shown below:
This fix is just the same move and rename of the method call, no parameter changes:
- Locate the third error, shown below:
Similar fix as before:
- And finally the fourth error, before:
- Now build again to confirm all errors are fixed:
- Re-run the “Samples\BuildAllSamples.cmd” from the DSS Command Prompt, it will succeed (you can ignore the 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.
- 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:
- Now you can test the working Kinect sample from RDS with the new 1.7 SDK:
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: http://mrdssamples.codeplex.com/releases/view/97376