logo logo
Home arrow Blog...
Friday, 04 July 2008
 
 
English English  Español Español  
Tag Cloud
Architectures Artificial Associations Books Brain Conscious Consciousness Forums Howto Machine Machines Microsoft Neuroscience Projects Publications Research Researchers Reviews Robot Robotics Robots Services Spanish Studio
A blog of all section with no images
More than 20 ports in a PortSet Print E-mail
Written by Raúl Arrabales Moreno   
Monday, 03 September 2007

How to use more than twenty ports in a PortSet?

In Robotics Studio the operations supported by a service are also defined as ports in a CCR PortSet (Microsoft.Ccr.Core.PortSet).  And the former is defined as a set of generic ports: PortSet<T0, ..., T19>.

The problem comes when you want to use more than 20 ports in the same port set, because there is no definition for PortSet<T0,...,T24> for instance.

The good news (as answered by George Chrysanthakopoulos in MSRS forum) is that there is a new variable type PortSet available in MSRS 1.5. Using it you can have as many operations as you want.

Note: In .NET Compact Framework the limitation is 8 generic type arguments for any class. However, this same approach can be applied to work arround this issue.

Follow these steps to use as many ports as you want:

1.- Instead of using the generic PortSet, use the non-generic PortSet class and pass the types of operations as a list in the constructor of PortSet:

Example:

Instead of using:

class DriveControlEvents : PortSet<OnLoad,OnClosed,...> 

Use the following:

public class DriveControlEvents : PortSet
{
public DriveControlEvents()

    : base(
typeof(OnLoad),
typeof(OnClosed),
typeof(OnChangeJoystick),
typeof(OnConnect),
typeof(OnConnectMotor),
typeof(OnConnectSonar),
typeof(OnConnectSickLRF),
typeof(OnConnectArticulatedArm),
typeof(OnConnectWebCam),
typeof(OnStartService),
typeof(OnMove),
typeof(OnRotate),
typeof(OnTranslate),
typeof(OnEStop),
typeof(OnApplyJointParameters),
typeof(OnDisconnectSonar),
typeof(OnDisconnectSickLRF),
typeof(OnDisconnectWebCam),
typeof(OnLogSetting),
typeof(OnQueryFrame),
typeof(OnConnectSetting),
typeof(OnOptionSettings))
{}
}

 

2.- If your services posts to itself, replace the post messages with PostUnknownType method.

Example:

private void btnConnectSonar_Click(object sender, EventArgs e)
{
  
string SONAR = ServiceByContract(pxsonar.Contract.Identifier);
  
if (sonar != null)
   {
       _eventsPort.PostUnknownType(
new OnConnectSonar(this, sonar));
   }
}

 

3.- In the main Arbiter pattern (for instance, the Interleave where you specify the handlers for operations), replace Arbiter.Receive with ArbiterReceiveFromPortSet and Arbiter.ReceiveWithIterator with Arbiter.ReceiveWithIteratorFromPortSet for those operations defined for the non-generic PortSet.

Comments (1) | Add as favourites (45) | Quote this article on your site | Views: 1108 | E-mail

Last Updated ( Monday, 03 September 2007 )
 
How to create a generic contract Print E-mail
Written by Raúl Arrabales Moreno   
Monday, 03 September 2007

How to build a service assembly containing generic contract(s)?

I asked this question in the MSRS forum as I wanted to test different exploration algorithms with minimal impact in my existing code, and I think the correct way to do it is by defining a DSS generic contract. In this case a Generic Exploration Algorithm Contract.

This is the answer by Dave Lee (MSFT):

How to create a generic contract:


1. Use DssNewService to clone or create a new service.

DssNewService -s:MyService

2. Add your operation types and data contracts, exactly as you would to a service implementation.

3. Delete the service implementation file (MyService.cs).

4. Open AssemblyInfo.cs and change the service declaration to:

[assembly: ServiceDeclaration(DssServiceDeclaration.DataContract)]

5. Compile.

6. Your other services should implement the proxy file which is generated by step 5.

dssnewservice -i:"MyService.Y2007.M08.Proxy.dll" -s:Foo

(Note the "-i" stands for "implements").

Comments (1) | Add as favourites (50) | Quote this article on your site | Views: 1659 | E-mail

Last Updated ( Monday, 03 September 2007 )
 
Language Mind and Consciousness Print E-mail
Written by Raúl Arrabales Moreno   
Wednesday, 22 August 2007

AI Forums: Language Mind and Consciousness. This AI Forum is dedicated to the problem of language, mind, and consciousness.

Background

The manipulation of natural human language by a computer, a major research track inside artificial intelligence, at first seemed like a highly tractable problem, but slowly revealed itself to be prohibitively difficult.

The research of language acquisition is today central to the science of AI. How do people acquire language? And how could computers? Is there such a thing as a “universal grammar”? And why is it that machines just don’t understand? The science and philosophy of language are the heart of AI.

Link: http://www.ai-forum.org/forum.asp?forum_id=3 

Comments (1) | Add as favourites (58) | Quote this article on your site | Views: 2334 | E-mail

 
Control Panel Service (Dashboard) Print E-mail
Written by Raúl Arrabales Moreno   
Tuesday, 14 August 2007

The Control Panel service is a version of the Dashboard service by Trevor Taylor in which a control for representing the simulated Sonar has been added. Dashboard is based on the MSRS Simple Dashboard service. Dashboard original code and documentation can be found in Trevor's page.

This Control Panel Service provides access to a graphical representation of a simulated frontal SONAR array. The simulated Sonar service uses Robotics Studio Simulator raycasting to simulate SONAR transducers (simulation is not yet very realistic as it uses a single plane for raycasting instead of a 3D cone for each transducer. Additionally, readings are ideal, as no noise is simulated). Using this service you are able to test Simulated Sonar distance measurement in the MSRS Visual Environment. See the Simulated Sonar service description for details about how measurements are aquired.

Background:

ARCOS based robots (like the Pioneer P3-DX) can integrate up to four SONAR rings, each with eight transducers. These sensors provide object detection and distance information. The Robotics Studio platform doesn’t include a simulated SONAR service that could be use in the Visual Environment. However, there exists a generic contract for SONAR that I wanted to implement for the specific case of my SIMULATED P3-DX frontal SONAR array.

NOTE: A real (not simulated) ARCOS SONAR service is available at:
http://www.conscious-robots.com/en/robotics-studio/robotics-studio-services/arcos-sonar-service.html

NOTE: Current version of SimulatedSonar don't generate a 3D cone using raycasting, instead a 2D pie is generated and used to calculate the closest intersection. Therefore, the robot only sees in a 2D plane (situated at the height of the SONAR device pose). In order to build a more realistic SONAR, this needs to be fixed. Additionally, noise should be added in the simulation in order to get as closest as possible to a real SONAR.

You can subscribe to this SimulatedSonar service from your application and easily get SONAR readings in your MSRS code. Additionally, you can see a graphical representation of the Sonar readings using this Control Panel Service. For instance, you can use the Maze Simulator Service and Control Panel service in order to see how Sonar sensors acquire measurement information from the virtual environment. Also, the same Control Panel service should work with a real Arcos Sonar service.


Description:

Each Pioneer 3 DX SONAR ring is composed of eight transducers arranged at angles -90, -50, -30, -10, 10, 30, 50, and 90 degrees. They are polled sequentially at a configurable rate (usually 25 Hz – 50 ms per transducer per array).

The SimulatedSonar service aims to simulate a real SONAR by using the raycasting facility of the MSRS simulator. P3DX front ring sonar is 180 degress. But lateral transducers are centered at 90 degrees, so I consider: 196 degrees. I considered the aperture of one transducer is 16 degrees (real hardware transducers have an aperture of 15 degrees).

The graphical representation you can see in the Control Panel depicts each of the Sonar transducers reading as a 2D cone (the red line represents the scaled range measured by each Sonar transducer, the rest of blue lines represent the apperture of each Sonar transducer, and therefore the area which is free of obstacles according to Sonar readings. Note the blue lines get darker as closer obstacles are detected).

You can also check the actual values of measurement (in milimiters) obtained by the Sonar. They are the S0 to S7 values that appear to the right of the graphical representation.


 

Service Download:

 

Installation instructions (for source code zip archive):

Decompress the contents of the file under MSRS home directory. Note that the service source code is located under Apps directory. Build it using Visual Studio.

See the readme.txt file included in the distribution package for detailed instructions and version history. It is important that you install the service in a machine with the same version of MSRS that is indicated in the readme.txt file. I always try to update the distribution file with the latest available version of MSRS, please check regularly for updates.



Service Details:

Service Contract Identifier:
    http://www.conscious-robots.com/2007/8/controlpanel.html

Implements generic contract: 
    N/A

Service partners:
    Microsoft.Robotics.Services.GameController.Proxy

Allow Susbscriptions:
    Yes.

Service State:
    Cranium.Controls.ControlPanelState

Comments (1) | Add as favourites (61) | Quote this article on your site | Views: 2275 | E-mail

Last Updated ( Tuesday, 14 August 2007 )
 
www.Conscious-Robots.com Forums Print E-mail
Written by Raúl Arrabales Moreno   
Thursday, 09 August 2007

Conscious-Robots.com Forums welcome discussion about the following topics:

  • Machine Consciousness
  • Scientific Study of Consciousness
  • Cognitive Robotics
  • Microsoft Robotics Studio
  • Anything related to AI and Consciousness


 

 

 

LINK: http://www.conscious-robots.com/en/forums.html 

Be first to comment this article | Add as favourites (57) | Quote this article on your site | Views: 1611 | E-mail

 
Maze Simulator Service Print E-mail
Written by Raúl Arrabales Moreno   
Thursday, 09 August 2007

This Maze Simulator Service for Microsoft Robotics Studio is 99% based on the MSRS Maze Simulator by Trevor Taylor (find the original version following this link to Trevor's page). I just modified it to use my simulated SONAR service instead of the simulated Laser Range Finder (LRF). I called this branch of MazeSimulator MazeSimulatorRA and also changed the contract identifier, so you can have both versions in the same MSRS environment.

 Background

Please check original documentation available at the link provided above for a complete overview of this service. Basically this service allows you to simulate a maze composed of walls and blocks in the MSRS Visual Environment. I am using it to simulate a Pioneer 3 DX robot in a building-like environment. The service builds the 3D maze from a 2D color bitmap that especifies the position and color of the walls. I am using a bitmap image that resembles to my lab environment so I can test exploration and SLAM algorithms in the MSRS simulator.

As I am currently using SONAR sensors instead of a LRF I commented out the laser part of the original service and included my simulated sonar service.

 

Service Download

- MazeSimulatorRa Source Code Download

 

Installation Instructions (for source code zip archive)

Please see readme.txt file included in the zip file for detailed instructions. The zip file contains the source code, resources, and visual studio solution. Download the ZIP file and unzip it into your MSRS root directory. This should create a directory called: <MSRS>\Apps\UC3M\MazeSimulatorRA

 

Service Details

Service Contract Identifier:
    http://www.conscious-robots.com/2007/8/mazesimulatorra.html

Implements generic contract: 

Service partners:
    Microsoft.Robotics.Simulation.Engine.Proxy
   

Allow Susbscriptions: 
    No.

Service State:
    Cranium.Simulation.Worlds.MazeSimulatorState

 

Service Implementation Description

See http://sky.fit.qut.edu.au/~taylort2/MSRS/MazeSimulator/MazeSimulator.htm for more information about the implementation.

 

Video:

 

Comments (2) | Add as favourites (76) | Quote this article on your site | Views: 2956 | E-mail

Last Updated ( Friday, 30 November 2007 )
 
<< Start < Prev 1 2 3 4 5 6 7 8 9 10 Next > End >>

Results 55 - 60 of 160
 
Top! Top!