Wednesday, February 25, 2009

Update

It's been a while since I have updated here... Sorry - I am currently working on unofficial PhD work: I have handed in my masters but have not (officially) received a mark. So I can't register for anything - which is good - because that means I can whack out publications.

I have not been permitted to continue studying in robotics (apparently the engineering department doesn't like computer science guys doing robotics). However, I will continue developing in MRDS because I do enjoy it. But it will be purely as a hobby. But that won't stop me from trying to publish ;)

I am waiting for an official response to my masters and the end of March, then I will start developing again. Also I have to wait to get a better computer. I will try to create a robot to solve a real problem. I'll start off with toy problems and move on from there.

Wednesday, November 5, 2008

CCR and DSS are now distinct from MRDS

Microsoft have finally separated the CCR and DSS libraries into individual toolkits for applications other than robotics. Check it out [here].

These two libraries are really useful, and I believe they will change the manner in which programmers code. They are extremely powerful.

Thursday, October 16, 2008

Just to be current

I just thought that I would show you what I have been working on. What's more important is what is going on in the background. I coded the robot in C# and designed the environment in the VSE. Then I connected it via the manifest editor. But like I said, it's more about what's going on in the background.





Thursday, August 14, 2008

Microsoft© CCR getting you down?

In my research, which is almost complete, I have come across the first paper that was written regarding the CCR. No doubt changes have been made to it, but it would be a useful read for those who wish to understand it in more depth.

Here it is, and another one:
An Asynchronous Messaging Library for C#
Developing a concurrent service orchestration engine in ccr

Thursday, July 31, 2008

Custom messages using the PortSet

I am not sure whether this is in the tutorials, but I thought I would highlight it anyway. Making custom messages in MRDS is really easy. Also you can pass state information through them. This post should also give you insight into how the request operations on hardware works.

To create a custom message, the first step is to create the request class. This request class can contain data that you want to send through. It is declared in the <dss_name>Types.cs file. Remember that all properties need to be Serializable. That means (a) the class needs to be a [DataContract] and (b) the properties need to be ints, bools, strings, etc ([DataMember]). I do not recommend customizable objects, since these services are actually designed to pass between computers, what good is a local definition? So create the message of the structure you want:
[DataContract]
public class NewMessageRequest
{
private bool _input;

[DataMember]
public bool Input
{
get { return _input; }
set { _input = value; }
}
}

Then create a class in the <dss_name>Types.cs that inherits from the Update portset:
public class NewMessage : 
Update<NewMessageRequest,
PortSet<ReturnType, Fault>>
{
public NewMessage() :
base(new NewMessageRequest()) { }
}

What is awesome is you can specify the return type. I kinda guessed this behaviour from navel gazing at the code. That means you can post state changes directly back or whatever information you wish. I went for the state, so that the DSS is still 'responsible' for the output it gives. Then you need to write the handler for the request. This occurs in the <dss_name>.cs file:
[ServiceHandler
(ServiceHandlerBehavior.Exclusive)]
public IEnumerator<ITask>
NewMessageHandler(NewMessage msg)
{
if (beh.Body.Input)
{
//perform certain changes
}
else
{
//perform other changes
}
msg.ResponsePort.Post
(/*ReturnType instance*/);
yield break;
}

In this manner, you can create customized messages and defer computation to other services, rather than focusing all computation in one service. This is really distributable computing, making use of DSS and CCR.

Tuesday, July 22, 2008

The pursuit camera

Paul Roberts (blog), the author of the pursuit camera, pointed out that the pursuit camera in fact does follow the bot (I feel ashamed! I was mistaken, I did cross it out...)1. It just needs to be set in the constructor (See his post - done in code: [Pursuit Camera Service]). But since I prefer the VSE (I have my reasons), I wanted to find out how to set it up from there. I realised what I was doing wrong.

When you create the PursuitCamera, a form pops up with the constructor, just like the TriangleMeshEnvironment entity. You can either set the 'target' property (before creation) or set the TargetName property (after creation).

Just type in the name of the bot you wish to pursue, and it does the rest. It is quite nifty! Just don't set it's parent!

1 Firstly, I am so sorry for being over-critical before doing my research! It will not happen again. Secondly, thank you for reading a blog as humble as mine. Thirdly: Please keep up the excellent work! I love this framework. If I had children, regardless of their age and gender, they would be programming robots.

Monday, July 21, 2008

New CTP version of MRDS - just be careful

There is a new version of MRDS out. Read all about it here: [Welcome to July CTP of Microsoft Robotics Developer Studio 2008]. It is available for download here: [Download MRDS CTP July 2008].

I have checked it out and I like the interface for the dssnewservice. It looks really good. Let's hope it fixes some of the other known issues:
  • Tutorials for the manifest editor: Yes! Now my triumph a couple of weeks ago is literally nothing. Of course you have to know to use the manifest editor, which I think was my problem in the first place. My hassle was there were no projects dedicated to simulated and real robots.
  • Meshes being walls in the FloorPlan entity: See next point.
  • Texturing (FloorPlan and TriangleMeshEnvioronment Entities): Nope, no fixes. My 'quick and dirty' method won't even work since the FloorPlan is now limited to walls only, meaning no meshes. The TriangleMeshEnvironment allows for everything, but textures are still not working.

I also noticed there are less project options. The DSS hosing template has been taken out. In fact you can only create a service. But that is a topic for another day.

I like the fact that the simulation environment can be embedded in forms, but I think that was there before, it just didn't work so nicely (I still don't know how to use it, so I'm no authority here). I have vague recollections 2 years ago trying to create a form with a robotics simulation on it. Back then help was scarce...

What is really good is the DSS Manifest Editor loads really quickly! Also if you stop the VSE without stopping a manifest, the manifest editor just runs a shutdown rather than throwing errors. The VSE is (more) amazing - they have at least removed the editable options that did not change dynamically. It used to be that, when you clicked on an entity in the tree, you could 'edit' the entity in the left menu. The problem was, none of those changes would take effect. You had to click 'Edit Entity' and change the properties there. At least now you aren't fooled into thinking you have made changes.

The only hassle is when you do that with a Camera entity is creates a new camera. Annoying. I know for a fact it didn't do that in the older CTP. At least it effects both cameras and so it's just a matter of deleting the duplicate. Also when you load a previously edited VSE manifest is resets the camera to a high weird position.

They also added a pursuit camera... Which is a great idea, but not really useful. I was hoping for a 'third person' view. It seems it looks behind, and it is really static in terms of its relation to the parent object. [23 JULY 2008: CORRECTION]

In code, a lot of the references have changed. Not in terms of names, but location and namespace, so it's just the DLLs in the references that need updating:
  • Ccr.Core is now Microsoft.Ccr.Core
  • DssBase is now Microsoft.Dss.Base
  • DssEnvironment is now Microsoft.Dss.Environment
  • DssRuntime is now Microsoft.Dss.Runtime

This change is for the best, at least you know whose DSS and CCR you are using :) Be careful because I suspect there are a lot more than that.

I noticed in the tutorials some of the pictures are missing. The Robotics Introductory Course is missing all images. That could hinder. The simulation tutorials need to be re-numbered. I know that 3 and 6 are somewhere else, but really... how disturbing! Simulation Tutorials 3 and 6 are language independent.

I got my main project working in the new version in a matter of minutes. So at least there are no changes that are going to drastically affect or hinder progress.

Remember that CTP stands for Community Technical Preview, which means that it is not an official release, but is up for technical revision. So get on the forums and make comments! But I think that Microsoft Robotics are coming closer and closer to a very squeaky-clean package that is going to take robotics to the next level.