ProMRDS Home Page Dashboard

Professional
   Microsoft Robotics Developer Studio
Home Page Book Contents This Chapter

Dashboard Service

Purpose

The Dashboard service provides a Graphical User Interface (GUI) to control robots using the following generic contracts: two-wheeled robots with a differential drive; robotic arms; and web cameras.

Description

After using the Simple Dashboard a lot to to drive robots around, it can be quite annoying having to re-enter the same connection parameters every time. This updated version of the Dashboard uses a config file and an InitialStatePartner to reload saved settings on startup. There is also support for a top-down view of the Laser Range Finder and a Webcam window.

Dashboard

Here is what the new interface looks like. By default the Laser Range Finder and the Articulated Arm are not displayed, so it will be a much smaller window. It also remembers where you last placed it on the screen so that it will always pop up in the same position. The connection parameters and the log settings are remembered as well.

NOTE: You must select the Save Settings option in the File menu to save the settings. This is intentional because you might want to change the settings temporarily and not want them to be remembered every time you exit from the program.

When you save the settings, a file called Dashboard.Config.xml will be written into the ProMRDS/Config directory.

There are Motion Control buttons in the middle-left of the Dashboard 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 have implemented these operations. You can adjust the distance and the amount of rotation in the Options dialog.

At the bottom of the window you can see a new display option for the Laser Range Finder data. This gives you a top-down view where black pixels represent obstacles, white is free space and grey is unknown. This is the convention that is commonly used in "Occupancy Grids". (The original 3D view is still available and can be selected in the Options dialog.)


 

Webcam View

In the list of available services you can see that there is a Webcam listed. The Dashboard can display a separate window to view the video from a Webcam attached to the robot. The example screenshot is from the Maze Simulator.

Notice the red laser hits on the nearby obstacle. There are no laser hits on the ball because it is not high enough. If you minimize the simulation window these laser updates will stop.

If you resize the Webcam window, it will maintain the aspect ratio of the image (unlike the Simulator window).


Options Dialog

Dashboard Options

There are several different settings available in the Options Dialog. They can be used to control how the "trackball" works. This makes it easier to control the robot.

The scale factors allows you to control the speed of the robot as you move the trackball further from the center. For example, you might not want the robot to rotate at full speed because it is too fast to control easily. Therefore you can set the Rotate Scale Factor to 0.5 (half speed) or something suitable.

Note that you can reverse the direction of the trackball if you want to fly your robot like a plane. Enter a negative value for the Translate Scale Factor or Rotate Scale Factor to reverse the directions.

The "Dead Zone" is an area either side of the horizontal and vertical centrelines of the trackball where the value will be zero. This means that you do not have to be so exact when you move the cursor. The dead zone makes it easier to drive in a straight line and to rotate on the spot.

There is a small problem with the dead zone that can cause the robot to rotate in the wrong direction if you move the cursor too far below the horizontal center line, i.e. just outside the dead zone. This same problem exists in the original Simple Dashboard but it is even worse because it has no dead zone at all so it is even more sensitive.

Notice that you can turn the display of the LRF and Articulated Arm on or off here. The Dashboard will adjust its size accordingly. This makes it easier to fit on the screen at the same time as the Simulator for example.

If you are using the LRF, then you might want to set the Robot Width (which is in millimeters). This will display any obstacle immediately in front of the robot in red, rather than the normal blue-grey. Then it is easier to see if the robot will fit through a gap. (This feature was invented by Ben Axelrod.)

If you check the Display Map option, then a top-down view will be displayed as in the diagram above. If you uncheck it, the original 3D view is displayed. You can limit the maximum range used for the laser data. For the simulated Pioneer robot, the maximum value is 8192 millimeters, but you can reduce this to limit what the laser sees.

The purpose of the Motion Commands options should be obvious. These parameters are for the Motion Control buttons. The Power setting a value from 0 to 1000 (which corresponds to the range of the trackball). This is remapped to a power setting in the range of 0 to 1.0 before it is sent to the robot.

Due to a bug in the original simulated Webcam service there is a timer setting in the Dashboard options. However, this is no longer necessary in the V1.5 Refresh. Don't set the timer interval too low or your computer might not be able to keep up.

If you change any of the settings, remember to save them from the File menu before you shut down the Dashboard.


Legal Stuff

The Dashboard service is a hack to the Microsoft Simple Dashboard. No rights are claimed for the Microsoft portions of the code. It is not intended as a definitive example of how to add an InitialStatePartner to a service, or to display data from a Webcam, but it does work.

This code is available free of charge for non-commercial use. Please see the Licence Agreement.