I just completed the MyTutorial1 and MyTutorial2 tutorials for the Microsoft Robotics Studio.  I used the Lego RSX 2.0 hardware for the tutorials.  I noticed a couple things that stumbled me for a short time.

Problem #1
When you launch the tutorials from the visual studio IDE the services never seem to communicate with the RSX.  I was able to get the service to work using the DSSHOST executable passing in the manifest file.  So I looked at the parameters that the IDE is passing to the DSHOST when you debug and it was using the contract command line option instead of the manifest option.  So I changed it to use the manifest and the service ran fine.

So change the command line debug argument -contract from:

-contract:"http://schemas.tempuri.org/2006/06/mytutorial1.html"
To:
-manifest:"C:\Microsoft Robotics Studio (June 2006)\samples\
MyTutorial1\MyTutorial1.manifest.xml"

And you should be able to launch the service from the IDE

Problem #2
On tutorial number two there is no step to add in the legorcxmotor service to the manifest, so the service never gets started correctly when you run the application from the IDE.  So add the following to the MyTutorial2.manifest.xml file:

      
<SERVICERECORDTYPE>
 <wsap:Contract>
  http://schemas.microsoft.com/robotics/2006/06/legorcxmotor.html
 </wsap:Contract>
</SERVICERECORDTYPE>

Overall I found the two tutorials informative. I at least got my feet wet with using the framework. I might try a few more tutorials before I attempt to write a driver for the BX24.

Wow, did you know that Microsoft has a robotics group?  I just noticed that they released a Microsoft Robotics Studio.  I am downloading this technical preview now to check it out.  This to me is a huge leap for the robotics industry.  Putting the power of Microsoft development tools to build robotic applications is a win win solution.  I finally can merge my two passions of software development with Microsoft technologies and building robots!  I am very excited about this project.  Make sure you check out the Channel 9 video about the group.  Keep an eye open for your favorite robot somewhere in the background of the video.

Some projects the group is working on.

Key features of the platform

  • Concurrency and Coordination Runtime (CCR) - An asynchronous messaging library that makes managing state changes easy to the developer.
  • Robotic remote control via a web browser
  • Scripting robotic commands via jscript to create complex robot movements
  • Multiple hardware platforms.  Currently supporting Lego Mindstorms (RSX and NXT) and fischertechnik.
  • Support for 8, 16 and 32 bit processors
  • Separating state from behavior
  • DSS - A services layer
    • Support for service contract programming where multiple input or output devices can be used by simply altering what device is bound to the contract.  Example:  A contract could be established that controls the robots movement.  A keyboard device could be bound to the contract to provide the input that moves the robot.  Or a joystick device could be bound to the contract to provide the input to move the robot.  The point here is that support is in place for a pluggable architecture or re-usable components.
  • Subscribe publish model that allows for a lot of autonomous agents to react to state changes.  This promotes a decoupled environment.  You can create a published event like bumper touched and later build a component that subscribes to that event and reacts to it.  There can be multiple subscribers to the event. 
  • Model simulation - You can model your environment and run your software without any hardware.
  • Since the applications are service based you could distribute services across multiple machines. 
    • Example if I create a service that monitors my door bell and expose the service to the public you could subscribe to my service and perform some action when my door bell is rung.

Well I could go on and on about this new platform but I want to get started on using it.  I will first go through the tutorials to gain an understanding of how it works.  Luckly I have a Lego Mindstorms RSX kit.  After the tutorials are complete I will try extending the services to support a BX24 bassed hardware device.

In Interfacing a PC to the outside world Part 1 I mentioned that I wanted to work on a set of articles to discuss interfacing your PC to the outside world.  In part 2 I am going to continue the series and talk about what my first connection to the outside world is going to be. 

 

There are a number of devices that are designed to communicate over I2C.  I2C is a serial interface developed in the 1980's at Phillips Semiconductor.  The architecture allows for multiple devices to co-exist on the same 2 wire bus.  You can get more information on the I2C bus at the following: http://www.esacademy.com/faq/i2c/. 

 

There are a considerable number of devices that support the I2C bus.  A compass can be used to determine direction.  A sonar module can be used to detect obstacles.  A motor controller can be used to drive motors on a robot.  A servo controller to drive hobby servo motors.  All of these I2C capable devices (and several more) can be found at www.acroname.com.  I have done some research on PC I2C devices but so far everything I have found is fairly expensive.  I believe I can make a device that will bridge the PC to I2C gap and open up the world of I2C devices to PCs.

 

So a .Net I2C library is going to be the first project that I will do.  The library will support communicating on the I2C bus to other devices.  The consumers of this library should not care how the I2C communication is actually implemented.  So the primary goal of this exercise is to architect a provider model for communicating to these devices.  The benefits of this model allows for different I2C providers to be used without affecting the consumers. 

 

The first provider I will be creating will be a micro controller RS232 I2C Provider.  This will be  a small device that sits between the PC and the I2C devices.  The micro-controller's job is to intercept the serial commands from the PC and convert them into I2C commands.  I will be using a BX24 from Netmedia as this micro controller.  Later I will create a parallel port I2C provider that can be used in place of the micro controller RS232 provider.

 

The PC to BX24 I2C solution is a little more expensive than I intended to start with.  However I have a few BX24s lying around from other projects so it won't take a dent out of my pocket.  Also I have a Deventech compass to try the library out on.  Besides I also intend to use the BX24 for other interfacing projects.