![]() |
![]() |
Professional
Microsoft Robotics Developer Studio
The Drive By Wire service was developed specifically for the Compact Framework (CF). However, in order to do this you must first create a Desktop version, so there are in fact two services: one for the Desktop and another for CF, i.e. PDAs.
NOTE: To compile the CF version you must have the Professional Edition of Visual Studio. The Express and Standard Editions do not support the Compact Framework.
When run as a Desktop service, the DriveByWire service has two windows - one for controlling a Differential Drive, and the other for viewing a WebCam. It is very similar to the TeleOperation service. It can remember where you last placed it on the screen so that it will always pop up in the same position. The connection parameters are remembered as well.
A Compact Framework (CF) version of the service is also available which will run on a PDA. The main window looks the same, but the CF version does not currently support a webcam because PDA screens are too small. However, if your PDA has Bluetooth you can use it to drive many of the available robots that connect via Bluetooth, such as the Boe-Bot.
Some PDAs have a limit on the baud rate that they can support over Bluetooth. For example, the Dell Axim 50v cannot make Bluetooth connections at 115200 baud. This means that the Drive By Wire service cannot be used with the LEGO NXT or Hemisson robots on this particular PDA. You should check out your own PDA to see if it works.
Enter the host name and the port number to connect. The first Differential Drive service and WebCam service that are found on the specified host machine will be used. Note that the DriveByWire does not automatically connect when you start the service. This allows you to select the appropriate host, which might be elsewhere on the network.
You can use a Joystick, a Gamepad, the arrow keys on the keyboard, or the on-screen "trackball" to control the robot once you have connected. When you use the keyboard, the robot will continue to move as long as you hold down a key. When you release the key, the robot will stop. On a PDA, the "rocker switch" is equivalent to the four directional arrow keys. When you release the rocker switch the robot will stop. This makes it easy to drive with one hand by using your thumb on the rocker switch.
There are Motion Control buttons in the bottom-right of the DriveByWire window that can be used to move the robot. These use the TranslateDistance and RotateDegrees functions of the Differential Drive. For these to work, the robot you are driving must implement these operations. You can adjust the distance and the amount of rotation by changing the settings.
NOTE: To save the settings, you must use a web browser to
view the state of the service. Browse to the following URL when
the service is running:
http://localhost:50000/DriveByWire
This will only be possible on a PDA if the PDA has WiFi as well as Bluetooth
and the WiFi interface is turned on. A better approach is to edit the config
file directly.
When you save the settings, a file called DriveByWire.Config.xml will be written into the ProMRDS/Config directory. Most of the settings are the same as for the TeleOperation service.
This code is available free of charge for non-commercial use. Please see the Licence Agreement.
This service should not be used for commercial purposes because its operation is not guaranteed.