Specification of the robotic system

Introduction

FRP’s usefulness for robotics programming will be evaluated by the implementation a robotic controller. The robot will detect and follow objects (as captured by a video camera) using a simple image processing algorithm. This project focuses on the FRP paradigm, so the image processing / computer vision algorithm will be simple and unimportant. We may pick an ‘off-the-shelf’ algorithm for this purpose. The robot will be based on the Segway RMP 200. A USB camera that is already attached to an existing RMP unit will be used in conjunction with a laptop computer that will be attached to the robot. The laptop will connect to the RMP’s wheel drive controller via USB, allowing a computer program to control the robot’s velocity and orientation (the general layout described here can be seen in Figure 1 - General structure of the robot). The laptop will run the linux operating system. The controlling program will be designed and implemented using functional reactive programming, using a Haskell-embedded FRP framework.

_images/robot.jpg

Figure 1 - General structure of the robot

The controlling program

As we’ll be using FRP, the program’s design at the top level is clear and simple. The robot is modelled as a reactive system that transforms time-varying values and events. There are two inputs to the controlling program: video from the camera, and status events from the RMP. The video is modelled as a time-varying image. The following describes my top-level design for the controlling program:

  1. The incoming video is processed by the detector whose output is a time-varying function with a Maybe Rectangle value. If an object was not detected, the output will be Nothing. Otherwise, the rectangle output specifies the coordinates of a box inside the image that bound the detected object.
  2. The detected bounding box is passed to the locator, which maps bounding boxes to distance and orientation coordinates (r,\theta), a vector from the robot to the detected object’s inferred location.
  3. The location vector is passed to the controller, which drives the robot by sending appropriate events to the RMP. For example, if the target object is ahead, the controller may increase the velocity to get closer to the object.
  4. The RMP sends events to the controller, with information about current wheel velocity, etc.

The top-level design appears in Figure 2 - Top-level design of the controlling program.

_images/tld_design.png

Figure 2 - Top-level design of the controlling program

The Segway RMP 200

Features

The Segway RMP (Robotic Mobility Platform) 200 is a platform for robotics development and testing. It is produced by Segway, Inc. (which publishes more information about the platform at http://www.segway.com/business/products-solutions/robotic-mobility-platform.php). It features the following:

  • Two individually powered wheels
  • Electrically powered (includes batteries)
  • Two stabilization modes:
    • Dynamic - the RMP balances itself in an upright position
    • Static - requires additional support to remain upright
  • USB and Canbus communication to the internal controller

Specifications

  • Speed: 0 – 10 mph / 0 – 16 kph
  • Weight: 140 lbs / 64 kg
  • Range: 12 – 15 miles / 19 – 24 km
  • Dimensions: 25” x 29.5” x 24” / 64 x 75 x 61 cm

Cost

The Segway RMP-200 starts at $21,000 USD. Ben-Gurion University has already acquired several units, so purchase of an RMP was not necessary for this project.

Evaluating FRP - testing the robotic system

The main focus of the project is not the “robotic intelligence” or image-processing aspects. Rather, it is the design methods and implementation clarity. Therefore the tests will focus on the comparison between the FRP and the alternative implementation.

No special equipment is required for the testing.

  1. Sanity tests. Both implementations will be tested for sanity, to make sure they actually perform the basic functions that are expected. The sanity tests will include:
    1. Image processing operation - check that the robot process images as expected by the chosen algorithm.
    2. Wheel drive control - check that the robot commands the RMP properly and performs the desired movements.
    3. Integration - check that the robot detects and follows objects.
  2. Comparison tests. As mentioned in the research proposal, the following aspects will be compared between the two implementations:
    1. Code size and conciseness.
    2. Modularity.
    3. Tractability (how easy is it to reason about the correctness of the code).
    4. Binary size.
  3. Performance tests. Since this isn’t a focus of the project, only simple performance tests will be carried out if time allows. The main performance measure is reaction time latency.

Estimated Budget

Following is an estimated budget for the project (prices are in NIS). All the required equipment (computers, Segway RMP 200, video camera) already exists in the laboratory so the only price for equipment is the per-hour usage price (due to wear).

Name Price (per hour) Hours Units Total
Salary 20 200 1 4000
Computer Usage 4 200 1 800
Segway RMP 200 75 50 1 3750
USB Video Camera 0.15 50 1 7.5

The total budget estimated after rounding is 8600 NIS (approximately $2300 USD).