Difference between revisions of "CalicoDevelopment"

From IPRE Wiki
Jump to: navigation, search
Line 159: Line 159:
= Links =
= Links =
# [[PyjamaDevelopment]] - plans and details for Pyjama development
# [[Myro_on_.NET_(Including_Mono)#Robotics_Connection|Myro3 - Robotics Connection]]
# [[Myro_on_.NET_(Including_Mono)#Robotics_Connection|Myro3 - Robotics Connection]]
# [[Writing a Myro3 program]]
# [[Writing a Myro3 program]]

Revision as of 13:28, 10 November 2008

This page describes the planning of Pyjama Editor and Myro3. The Pyjama Editor is an integrated, cross-platform environment for learning about computing, and Myro3 is an API for communicating with real and simulated robots. This is part of the Pyjama Project.

For extensive details on the planning of this project, please see Myro on .NET (Including Mono).


The Pyjama interface is written in C#. This will allow any of the .NET/Mono Languages (IronPython, IronRuby, PyjamaScheme, JavaScript, F#, J#, etc) to use the API. Myro3 is the interface in .NET/Mono that allows these languages to connect to robots.

Myro3 uses Microsoft Robotics Developer Studio. This guide describes how to get started developing for Pyjama and get up and running with the in-progress version of Myro3. We are targeting the following software versions:

  • Microsoft Robotics Developer Studio 2008, CTP April
  • .NET 3.5
  • Mono 1.9.1 or greater
  • IronPython 2.0

Initially, connections to robots (real and simulated) will be made through the Microsoft Robotics Developer Studio (MSRDS) API [2]. This is made through a set of services defined for each robot, sensor, actuator, etc.

In addition, an alternative interface could be defined that allows direct connections to a robot, or through another API, such as Player/Stage. This may require a layer above the services, or a different set of objects. This interface could allow for models to be created in C# (or another .NET language).

Current State

A sample of Myro3 is currently implemented for IronPython 1.1 and the version of CCR/DSS of that time period (summer 2008). We are in the process of updating that to IronPython 2.0 and the latest CCR/DSS, and integrating it with Pyjama.

Pyjama can edit code, and can evaluate it with F5.

Short term goals:

  • bring Myro3 demo up to date with IP2 with latest CCR/DSS
  • execute Myro3 demos from Pyjama
  • make the Console (Shell) work

Longer term goals:

  • move libraries to Pyjama framework
  • color-syntax highlighting for multiple languages
  • integrate Scheme into the DLR and Pyjama


One can program either in Visual Studio (only available on Windows) or in Mono (available on most platforms). Mono has a development environment (called MonoDevelop), but you can also use any editor. There is a free Visual Studio Express available from Microsoft. Mono 1.9.1 comes with Fedora 9 and is also for free from Mono.

Install MSRDS

  1. First, download Microsoft Robotics Developer Studio 2008, CTP July, and all software it prompts you on [ Download here ].
  1. Install MRDS.
  2. Point all the project references to MSRDS libraries to the right places.
  3. Install the update and samples

Install IronPython

Download IronPython 2.0 from here.

Myro and Pyjama

The directories in the source tree pertaining to Myro3 are:

  • IPRE (Myro3 API and MRDS services)
  • Pyjama (New IDE for Myro3)


Our read-only source tree is located at: http://svn.cs.brynmawr.edu/Myro/trunk/. You can use TortoiseSVN.

You will need Myro3 and Pyjama.

From the command line:

$ svn co http://svn.cs.brynmawr.edu/Myro/trunk/IPRE Myro
$ svn co http://svn.cs.brynmawr.edu/Myro/trunk/Pyjama Pyjama


Our developer source tree is located at: https://svn.cs.brynmawr.edu/Myro-dev/trunk. Note the https. You can use TortoiseSVN.

You will need Myro3 and Pyjama:

$ svn co https://svn.cs.brynmawr.edu/Myro-dev/trunk/IPRE Myro
$ svn co https://svn.cs.brynmawr.edu/Myro-dev/trunk/Pyjama Pyjama

See the Myro 3.0 Developer Manual for details on MSRDS and services.


Download and install Mono version 1.9.1 or greater.

You can see what version of Mono you have with:

mono --version

To install Mono (currently 1.9) with ipy included:

You can then create a program, like this:

using System;                        // for Console
public class HelloWorld {
   public static void Main(string[] args) {
      Console.WriteLine("Hello World!");

Call that program hello.cs, and compile with:

gmcs hello.cs

You can run it with:

mono hello.exe

Libraries for Pyjama

If you create a Dynamically Linked Library (.DLL) then you can load the library in Python (or any language) and use it as if it were written in Python.

For example under Mono:

gmcs -target:library hello.cs

will create hello.dll which can be used in Python.

If you need graphics, please use Windows Forms (aka, winforms) rather than GTK, or Windows Presentation Forms.

Build and run


For Visual Studio:

  1. Open the Visual Studio solution IPRE\Myro.sln.
  2. Set the working directory for "runnable" projects. These projects are in IPRE\Demos. In the "Debug" tab of the project properties, set the working directory to the full path to your IPRE/bin directory.
  3. Fix any missing references to MSRDS and IronPython assemblies.
  4. You should now be able to run the demo projects!


  1. Build the Pyjama/Pyjama.sln solution
  2. You will have to make sure that the References are found:
    1. IronPython
    2. IronPython.Modules
    3. Microsoft.Scripting
    4. Microsoft.Scripting.Core
    5. Microsoft.Scripting.ExtensionAttribute
  3. Run it!



  • You may have to keep your source tree on a local drive, instead of a network drive, or you may get strange errors about not being able to find modules. I was getting dssproxy.exe exiting with code 20, and unable to load modules at runtime, and this may have fixed it. This may be because under Vista, network drives are not always trusted.


  1. Myro3 - Robotics Connection
  2. Writing a Myro3 program
  3. Myro 3.0 Developer Manual
  4. Myro3 Robot Services
  5. Pyro Robot Interfaces
    1. Pyro Source Code
  6. Mono Download
  7. Visual Studio Express