Read Me Page for MRDS Samples
The MRDS Samples on CodePlex provide additional code samples to help you to learn RDS (Robotics Developer Studio).
Many of the samples use the simulator and therefore do not require a real robot.
This page contains important notes about using the CodePlex samples. Please read it carefully before you try to use the samples. The setup process is manual, and failure to follow these instructions might prevent the samples from working.
Also, there are version-specific issues related to different versions and Editions of Visual Studio (described below).
Please ask questions about these samples in the
RDS Discussion Forums
You can download the MRDS Samples ZIP file from CodePlex. However, before you install the package make sure that you have installed Visual Studio (2008 or 2010) and
that Robotics Developer Studio 2008 R3. (The samples will work with R2, but they are intended for R3).
Once you have the pre-requisites installed, unzip the MRDS Samples into your RDS installation folder. The directory hierarchy for the MRDS Samples starts with
and it deliberately parallels the Samples
provided by Microsoft so that the two sets of source code do not get intermixed.
DO THIS IMMEDIATELY AFTER UNZIPPING!!!
Before you try to use the samples you must run Setup.cmd
. This copies the relevant files to their correct destinations and also runs the
tool which is essential any time that you move samples from one computer to another.
Building the Samples
Build scripts are provided for each of the different languages except for Python which you do not have to build.
These scripts are:
- BuildAllCS.cmd - For C# samples
- BuildAllVB.cmd - For VB samples
- BuildAllCpp.cmd - For C++ samples
If you only have an Express Edition of Visual Studio then you should just use the appropriate script. If you have a full Edition of Visual Studio (that supports all languages) then you can instead use the
script (which just calls the other ones).
Note that some of the C++ samples consist of both C++ and C# code. You must have Visual Studio 2008 to build these samples.
To run a build script, do the following:
- Open a DSS Command Prompt window from the Start Menu.
- Change directory to CodePlexSamples: cd CodePlexSamples
- Type the name of the appropriate script as a command.
Depending on the language of the sample, there are various ways to run them. Obviously VPL examples have to be loaded and run from VPL. C# and VB samples can be run from Visual Studio. Specific instructions are provided in the doc pages for how to run the
As a convenience, some of the samples have command scripts that allow you to run them from a DSS Command Prompt once they have been built. These are provided in the Scripts folder and are copied to the RDS bin folder when you run
. Note that these scripts will not
work if you run them directly from the Scripts folder -- they are designed to be run from the bin folder.
For example, if you open a DSS Command Prompt from the Start Menu you can type any of the following commands to start the corresponding sample:
All of these samples run in the Simulator so you do not need a robot to get started.
The following sections contain additional notes about using the MRDS Samples. You should read
through all of the notes even if you do not think that they apply to you.
Visual Studio 2010
All samples are provided in VS2008 format. You can build them with VS2010 (see Build Scripts below) without upgrading them. However, if you open a solution/project file in Visual Studio 2010 then it will be upgraded. You have no choice.
Converting back to VS2008 is possible by editing the .sln and .csproj or .vbproj files, but this is unsupported and not explained here. If you want to go back, just get the files from the ZIP file again.
VS2010 C# Express and VB Express
Upgrading a project makes it target the .NET 4.0 Framework. To fix this, edit the .vbproj or .csproj file using Notepad (or another text editor) and change
back to 3.5. (There is no way in the VS Express IDE to change the Target Framework, so you must edit the project files outside of Visual Studio with a text editor. Do not use Microsoft Word to edit a project file.)
The VS2010 version of VC++ cannot compile services for RDS. It can only target the .NET 4.0 framework which is not yet supported by RDS.
If you wish to use any of the samples that contain C++ code, you must have Visual Studio 2008 VC++.
When you compile under VC++ there might be errors due to missing folders in the path. Just create the folders that it is looking for (see the
output from the compiler). For example:
C:\Program Files\Microsoft Visual Studio 9.0\lib
C:\Program Files\Microsoft Visual Studio 9.0\VC\atlmfc\lib\i386
The latest version of IronPython
is built for .NET 4.0 and will not work with RDS. There is however another version built with 2.0 SP1 that does work. You have to look on the IronPython Downloads page for the correct
After installing IronPython, you should copy all of the binaries to the RDS bin folder, i.e. all of the .exe and .dll files.