IPRE Scribbler Services Beta.msi (4.5 MB)
This set of services is part of the IPRE Myro package. Note: this readme is just for the Scribbler services and assumes the reader already has a working knowledge of Microsoft Robotics Studio (1.0). For more information on MSRS, please see: http://www.microsoft.com/robotics.
Table of contents
- What's Included
- Hardware Requirements
- Hardware Setup
- Service Architecture Overview
- Included Services
- Included Batch Files
- About IPRE / Myro
- Notable Features
This package includes a set of services to fully integrate your Scribbler robot into the MSRS system and also a preview of IPRE in MSRS. More specifically, this includes:
- A base service that handles the serial link to robot (usually over Bluetooth)
- A realistic simulation entity of robot
- A set of sensor services that subscribe to base service and implement generic contracts
- Three high level example services
- The MSRS supported version of Iron Python (RC1)
- Many batch files for quick and easy evaluation and usage
- This includes batch files for C# robotics tutorials 1, 3, and 4, and python robotics tutorials 1 and 2
- A Myro interface and it's implementation for the Scribbler
- A preliminary Myro programming environment
- A Parallax Scribbler robot. Available from: http://www.scribblerrobot.com
- A MSRS capable PC. This requires:
- Windows XP or Server 2003
- .NET 2.0 or 3.0, redistributable or SDK
- Visual Studio 2005 or Visual C# 2005 Express
- Optional: A video card that can support the MSRS simulator. See: for http://channel9.msdn.com/wiki/default.aspx/Channel9.SimulationFAQ more info.
- A serial or Bluetooth link to robot.
- Parani SD100 (recommended), Promi SD202, or SerialIO Standard BlueSnap
- Note: These serial to Bluetooth adaptors require a special cable to power the device from the robot:
A windows installer is provided for ease of installation. To install:
- Install Visual Studio
- Install MSRS 1.0
- Note, it is important to run the Robotics Studio Command Prompt at least once before using the system
- Run the IPRE Scribbler Services installer. When prompted for the installation directory, choose the default Microsoft Robotics Studio (1.0) installation folder.
- This is: C:\Microsoft Robotics Studio (1.0)
The Scribbler services will be placed under: C:\Microsoft Robotics Studio (1.0)\samples\IPRE\Scribbler.
Behind the scenes:
- Pre-compiled .dlls will be placed under C:\Microsoft Robotics Studio (1.0)\bin\services so you can run the services right away without having to compile first.
- Python .dlls will be placed under C:\Microsoft Robotics Studio (1.0)\bin so there are no extra steps required to run the Python examples.
- Mesh files for the simulated Scribbler will be placed under C:\Microsoft Robotics Studio (1.0)\store\media
Before you can use your Scribbler robot with Microsoft Robotics Studio, you must first upload a special server program to the robot. Connect the Scribbler robot to the computer using a serial cable and run the installation utility located at: C:\Microsoft Robotics Studio (1.0)\samples\IPRE\Scribbler\Basic Stamp Code\InstallServer.exe. The source code for this can be found in the same directory.
If you are using a serial to Bluetooth adaptor, it will need to be configured as well. Here are setup instructions for a few adaptors:
Service Architecture Overview
The service architecture for the Scribbler robot follows MSRS standards and can be seen in the diagram below.
In this diagram, the green box represents high level user code, the gray boxes are generic contracts provided by MSRS, and the blue boxes represent the code in this package. Typically, they are the only code that needs to be Scribbler robot dependant.
In general, users will want to write high level services such as a wander routine. This is easily accomplished through the use of generic contracts. These generic contracts allow the robot specific hardware to be abstracted away. So your code should work on different robot platforms, as well as in the MSRS simulator!
The high level service communicates to the generic contracts through standard notifications and 'Get' type messages. The Scribbler sensor services communicate to the ScribblerBase service though custom subscriptions. The ScribblerBase service handles all the communication to the actual robot and serves as the state of the entire robot in MSRS.
These services can be found under: C:\Microsoft Robotics Studio (1.0)\samples\IPRE\Scribbler. They can be run by opening the Visual Studio project file and pressing F5. Although, it may be easier to use the batch files detailed in the next section.
- ScribblerBase - This is the lowest level Scribbler service that handles all the communication with the actual robot.
- ScribblerSim - Stands as the ScribblerBase service for the MSRS simulator.
These are the sensor services as well as a few small fun
- ScribblerBumper - Implements the generic ContactSensor contract. Monitors the IR obstacle detectors and the stall sensor.
- ScribblerDrive - Implements the generic Drive contract. Handles all motor commands. Note, there are some high level drive functions such as DriveDistance, and RotateDegrees that are not implemented for the Scribbler. This is because the Scribbler robot has no wheel encoders.
- ScribblerLightSensor - Monitors the 3 light sensors. Implements its own contract, but uses the generic AnalogSensorState.
- ScribblerLineSensor - Monitors Scribbler's line sensors. Implements its own contract.
- ScribblerBackupMonitor - Makes the Scribbler beep like a big truck when it backs up.
- ScribblerHeartBeat - Flashes an LED once per second.
- ScribblerLEDArray - Implements a new LED array generic contract.
- ScribblerToneGenerator - Implements a new tone generator generic contract.
- DrawSquare - An example of a high level service. Makes the Scribbler draw a square.
- LightSeek - An example of a high level service. Makes the Scribbler drive to the brightest light it sees.
- Wander - An example of a high level service. The robot will drive around and try not to bump into anything. Will also speak when it bumps into something.
Included Batch Files
These batch files are included so that you can quickly and easily run the services above. To use, open a MSRS command prompt and navigate to C:\Microsoft Robotics Studio (1.0)\samples\IPRE\Scribbler\Batch Files. Then just execute the desired file.
- Turn the robot on before running this example. Will make the robot drive in a square pattern.
- NOTE: The robot's path is highly dependant on battery state, floor surface, and the individual robot.
- No need for a real robot. This will make the simulated robot draw a square.
- Will make the robot drive towards the brightest light it sees.
- NOTE: There is currently no simulated light sensor, so this does not work in the simulator.
- Runs the standard C# Robotics Tutorial 1 with the Scribbler. Put your hand in front of the scribbler and it puts some text on the console.
- Runs the Python version of Robotics Tutorial 1 with the Scribbler
- Runs the Python version of Robotics Tutorial 2 with the Scribbler. Put your hand in front of the Scribbler and it turns on and off the motors.
- NOTE: There is no version of this tutorial in C# that can work with the Scribbler. This is because it requires a generic motor contract which the Scribbler does not have. The Python tutorial 2 file used here has been modified to use the Scribblers generic drive contract instead.
- Runs the standard C# Robotics Tutorial 3 with the Scribbler. Put your hand in front of the robot to start the service. It will then drive around trying not to bump into things.
- Runs the standard C# Robotics Tutorial 4 with the Scribbler. An example of a win form to control the robot.
- Starts only the Scribbler base service. Not too exciting on its own.
- Starts the Scribbler base service with a bunch of extra services. Drive the Scribbler around with the Dashboard and you will notice the Scribbler's BackupMonitor beeping when you drive in reverse.
- Starts the simulated Scribbler.
- A version of Robotics Tutorial 3 that is geared towards the scribbler. Should make it turn left, or right depending on the sensor pressed.
- Put your hand in front of the Scribbler to start it going.
- Simulated version of the Wander service.
- NOTE: you must drive robot into a wall to get the wander service going
About IPRE / Myro
The Institute for Personal Robots in Education (IPRE) is a partnership between Georgia Tech, Bryn Mawr College, and Microsoft Research to apply and evaluate robots as a context for computer science education.
Myro, short for My Robotics, is software that enables its user to program their own personal robot. It will be used as a tool of IPRE in the classroom to help boost enrollment and retainment in computer science classes. In this release, a C# interface is used to provide all the .NET languages the same Myro API . Please see the ScribblerControl project. An example program is provided that makes the Scribbler drive in a square. This can be seen in the ScribblerControl.cs file. To run this example, run the ScribblerControl.exe program located in the C:\Microsoft Robotics Studio (1.0)\bin directory.
- Scribbler base service will remember com port and robot name last connected to. The first time service is run, it scans all ports for a Scribbler robot.
- In any of the ScribblerSim examples, navigate a browser to http://localhost:50000/scribblersim. Then refresh the page to drop cubes into the simulation.
- In any of the ScribblerSim examples, you can view the world from the perspective of the robot by selecting "robocam" from the camera menu in the lower left of the simulator window.
- In any of the real-world Scribbler examples, navigate a browser to http://localhost:50000/scribbler to inspect the state of the robot.
- The Scribbler will make a distinctive chirp when it turns on. This helps you know when the batteries are getting low because the robot will reset itself.
- The Scribbler will beep once when MSRS connects to it.
- The Scribbler will toggle the center LED every time a command is received. When the robot is not connected to MSRS, it will blink slowly (on for one second, off for one second). When the robot is connected to MSRS, it will blink faster, (on for half a second, off for half a second).
- I can't connect to the robot (first time connection)
- Make sure you gave the Bluetooth pairing a serial port profile. Go to Bluetooth devices, click on the device, click Properties, then go to the services tab. Make sure (SPP) "Generic Serial" is checked.
- Make sure robot is on and has the scribbler_server.bs2 running
- I can't connect to the robot
(it worked before)
- Reset the robot before starting your services
- I can't connect to the robot (service hangs trying first port)
- Remove, then re-insert the Bluetooth dongle on the PC. If you have built in Bluetooth on a laptop, there should be a way to turn off the Bluetooth antenna, then turn it back on.
- The Scribbler resets itself when I drive it
- Replace the batteries on the robot
- The Scribbler seems to have a large lag
- Unfortunately, there is not much that can be done about this. The lag can mostly be attributed to the Bluetooth delay, but it is also partly our communication scheme. Because the BASICStamp in the Scribbler does not buffer incoming commands, we have to use an echo-based flow control.
- How do I use the Dashboard?
- Type "localhost" without the quotes in the "Machine" text box. Then press "Connect". Double click "simulateddifferentialdrive/..." or "scribblerdrive/drive". If you have a joystick connected to your computer, you can use that to drive the robot by holding the trigger button and moving the stick. If you do not have a joystick, press the "Drive" button then click and drag on the sphere with the mouse.
- Who do I contact for more help?
- If it is a Microsoft Robotics Studio related question, then the MSRS forums are a good place to go. If it is about IPRE / Myro, then the myro-users email list is best.