Difference between revisions of "CalicoDevelopment"

From IPRE Wiki
Jump to: navigation, search
 
Line 1: Line 1:
 
This page describes the planning of Myro3, an API for communicating with real and simulated robots. This is part of the Pyjama Project.
 
This page describes the planning of Myro3, an API for communicating with real and simulated robots. This is part of the Pyjama Project.
 +
 +
= Overview =
 +
 +
The Myro3 interface will be written in C#. This will allow any of the .NET/Mono Languages (Python, Ruby, Scheme, JavaScript, F#, J#, etc) to use the API.
 +
 +
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).
 +
 +
= Getting Started =
 +
 +
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.
 +
 +
== Mono ==
 +
 +
Download and install Mono version 1.9.1 or greater. 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:
 +
 +
<pre>
 +
gmcs -target:library hello.cs
 +
</pre>
 +
 +
will create '''hello.dll''' which can be used in Python.
  
 
= Links =
 
= Links =
  
 
# [[Myro_on_.NET_(Including_Mono)#Robotics_Connection|Myro3 - Robotics Connection]]
 
# [[Myro_on_.NET_(Including_Mono)#Robotics_Connection|Myro3 - Robotics Connection]]
 +
# [http://svn.cs.brynmawr.edu/viewvc/Myro/trunk/IPRE/Services/ Myro3 Robot Services]
 
# [http://pyrorobotics.org/?page=PyroModuleObjectOverview Pyro Robot Interfaces]
 
# [http://pyrorobotics.org/?page=PyroModuleObjectOverview Pyro Robot Interfaces]
 
## [http://svn.cs.brynmawr.edu/viewvc/pyrobot/trunk/robot/ Pyro Source Code]
 
## [http://svn.cs.brynmawr.edu/viewvc/pyrobot/trunk/robot/ Pyro Source Code]

Revision as of 16:47, 5 September 2008

This page describes the planning of Myro3, an API for communicating with real and simulated robots. This is part of the Pyjama Project.

Overview

The Myro3 interface will be written in C#. This will allow any of the .NET/Mono Languages (Python, Ruby, Scheme, JavaScript, F#, J#, etc) to use the API.

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).

Getting Started

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.

Mono

Download and install Mono version 1.9.1 or greater. 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:

gmcs -target:library hello.cs

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

Links

  1. Myro3 - Robotics Connection
  2. Myro3 Robot Services
  3. Pyro Robot Interfaces
    1. Pyro Source Code