Difference between revisions of "CalicoDevelopment"

From IPRE Wiki
Jump to: navigation, search
(Links)
Line 1: Line 1:
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.
+
This page describes the planning of Pyjama Editor and Shell. The Pyjama IDE is a cross-platform environment for learning about computing. This is part of the [[Pyjama]] Project.
 
+
For extensive details on the planning of this project, please see [[Myro on .NET (Including Mono)]].
+
  
 
= Overview =
 
= Overview =
  
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.
+
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 uses [http://www.microsoft.com/robotics 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
+
  
 
= Development =
 
= Development =
  
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.
+
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. Pyjama requires Mono 2.4 and is also for free from [http://mono-project.com/].
  
== Install MSRDS ==
+
== On Linux and Mac OSX ==
 
+
# First, download Microsoft Robotics Developer Studio 2008, CTP July, and all software it prompts you on [ [http://www.microsoft.com/downloads/details.aspx?FamilyId=57CE326B-2125-4163-A33F-ED2F69E03B56&displaylang=en Download here] ].
+
 
+
# Install MSRDS
+
# Install the '''Runtime and Tools Update'''
+
# Install the '''Samples Update'''
+
# Point all the project references to MSRDS libraries to the right places.
+
 
+
== Install IronPython ==
+
 
+
Download IronPython 2.0 from [http://www.codeplex.com/IronPython/ here]. 
+
 
+
== Myro and Pyjama ==
+
 
+
The directories in the source tree pertaining to Myro3 are:
+
* <b><tt>IPRE</tt></b> (Myro3 API and MRDS services)
+
* <b><tt>Pyjama</tt></b> (New IDE for Myro3)
+
 
+
=== Users ===
+
 
+
Our read-only source tree is located at: <b><tt>http://svn.cs.brynmawr.edu/Myro/trunk/</tt></b>.  You can use [http://sourceforge.net/projects/tortoisesvn TortoiseSVN].
+
 
+
You will need Myro3 and Pyjama.
+
  
 
From the command line:
 
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
 
  $ svn co http://svn.cs.brynmawr.edu/Myro/trunk/Pyjama Pyjama
 +
$ cd Pyjama
 +
$ make
  
=== Developers ===
+
== On Windows ==
  
Our developer source tree is located at: <b><tt>https://svn.cs.brynmawr.edu/Myro-dev/trunk</tt></b>.  Note the http<i>s</i>.  You can use [http://sourceforge.net/projects/tortoisesvn TortoiseSVN].
+
# You will need the [http://msdn.microsoft.com/en-us/netframework/aa497273.aspx .NET Compact Framework]
 
+
# You will need a Visual Studio, such as this free version: [http://www.microsoft.com/Express/ Visual Studio Express]
You will need Myro3 and Pyjama:
+
# Checkout the SVN directory from: http://svn.cs.brynmawr.edu/Myro/trunk/Pyjama  
 
+
# Build the Solution in that directory
$ svn co https://svn.cs.brynmawr.edu/Myro-dev/trunk/IPRE Myro
+
# Run it
$ 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.
+
 
+
== Mono Install ==
+
 
+
Download and install Mono version 1.9.1 or greater.
+
 
+
You can see what version of Mono you have with:
+
 
+
mono --version
+
 
+
=== Fedora9 ===
+
 
+
Mono 1.9.1 is now a standard package of Fedora9. You will probably need the following packages:
+
 
+
* mono-addins
+
* mono-basic
+
* mono-core
+
* mono-data
+
* mono-devel
+
* mono-extras
+
* mono-winforms
+
 
+
As root:
+
 
+
yum install mono-addins mono-basic mono-core mono-data mono-devel mono-extras mono-winforms
+
 
+
=== Manual Install ===
+
 
+
To install Mono (currently 1.9) with ipy included:
+
 
+
* http://www.go-mono.com/mono-downloads/download.html
+
 
+
== Example Code ==
+
 
+
You can then create a program, like this:
+
 
+
<pre>
+
using System;                        // for Console
+
public class HelloWorld {
+
  public static void Main(string[] args) {
+
      Console.WriteLine("Hello World!");
+
  }
+
}
+
</pre>
+
 
+
Call that program hello.cs, and compile with:
+
 
+
<pre>
+
gmcs hello.cs
+
</pre>
+
 
+
You can run it with:
+
 
+
<pre>
+
mono hello.exe
+
</pre>
+
 
+
= 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:
+
 
+
<pre>
+
gmcs -target:library hello.cs
+
</pre>
+
 
+
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 ==
+
 
+
=== Myro ===
+
 
+
For Visual Studio:
+
 
+
# Open the Visual Studio solution <b><tt>IPRE\Myro.sln</tt></b>.
+
# Set the working directory for "runnable" projects. These projects are in <b><tt>IPRE\Demos</tt></b>. In the "Debug" tab of the project properties, set the working directory to the full path to your <b><tt>IPRE/bin</tt></b> directory.
+
# Fix any missing references to MSRDS and IronPython assemblies.
+
# You should now be able to run the demo projects!
+
 
+
=== Pyjama ===
+
 
+
# Build the Pyjama/Pyjama.sln solution
+
# You will have to make sure that the References are found:
+
## IronPython
+
## IronPython.Modules
+
## Microsoft.Scripting
+
## Microsoft.Scripting.Core
+
## Microsoft.Scripting.ExtensionAttribute
+
# Run it!
+
  
 
[[Image:Pyjama.jpg]]
 
[[Image:Pyjama.jpg]]
  
== Troubleshooting ==
+
= Troubleshooting =
 
+
* 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.
+
  
 
= Links =
 
= Links =
  
# [[Myro_on_.NET_(Including_Mono)#Robotics_Connection|Myro3 - Robotics Connection]]
 
# [[Writing a Myro3 program]]
 
# [[Myro 3.0 Developer Manual]]
 
# [http://svn.cs.brynmawr.edu/viewvc/Myro/trunk/IPRE/Services/ Myro3 Robot Services]
 
# [http://pyrorobotics.org/?page=PyroModuleObjectOverview Pyro Robot Interfaces]
 
## [http://svn.cs.brynmawr.edu/viewvc/pyrobot/trunk/robot/ Pyro Source Code]
 
 
# [http://www.go-mono.com/mono-downloads/download.html Mono Download]
 
# [http://www.go-mono.com/mono-downloads/download.html Mono Download]
 
# [http://www.microsoft.com/Express/ Visual Studio Express]
 
# [http://www.microsoft.com/Express/ Visual Studio Express]
 
# [http://msdn.microsoft.com/en-us/netframework/aa497273.aspx .NET Framework]
 
# [http://msdn.microsoft.com/en-us/netframework/aa497273.aspx .NET Framework]

Revision as of 16:36, 11 May 2009

This page describes the planning of Pyjama Editor and Shell. The Pyjama IDE is a cross-platform environment for learning about computing. This is part of the Pyjama Project.

Overview

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.

Development

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. Pyjama requires Mono 2.4 and is also for free from [1].

On Linux and Mac OSX

From the command line:

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

On Windows

  1. You will need the .NET Compact Framework
  2. You will need a Visual Studio, such as this free version: Visual Studio Express
  3. Checkout the SVN directory from: http://svn.cs.brynmawr.edu/Myro/trunk/Pyjama
  4. Build the Solution in that directory
  5. Run it

Pyjama.jpg

Troubleshooting

Links

  1. Mono Download
  2. Visual Studio Express
  3. .NET Framework