Overview - Tufts University

[Pages:9]CHERP (Creative Hybrid Environment for Robotic Programming) is a hybrid tangible/graphical computer language designed to provide an engaging introduction to computer programming and robotics for children in both formal and informal educational settings. With CHERP you can create programs for robots like the ones built with Lego WeDo Construction kit. CHERP was created by Jordan Crouser and David Kiger at Tufts University based on the doctoral work of Michael Horn on Tern. It is currently being developed as part of an NSF-funded collaboration between the Tufts University Developmental Technologies Group and the Tufts Human Computer Interaction Lab, under NSF grant # DRL-0735657. CHERP has been modified by Safoura Seddighin from DevTech research group in order to create a new version that works with Lego WeDo.

Overview

Tangible/Graphical Programming

CHERP enables you to create both physical and graphical computer programs to control your robot with icons that represent actions for your robot to perform. You can create physical programs using labeled interlocking blocks or onscreen programs using graphical versions of the icons. The shape of the interlocking blocks and icons creates a physical syntax that prevents the creation of invalid programs. CHERP programs can be downloaded to the robots in a matter of seconds.

How It Works

CHERP's physical blocks contain no embedded electronics or power supplies. Instead CHERP uses a standard webcam connected to a desktop or laptop computer to take a picture of your program, which it then converts into digital code using the circular bar-code-like TopCodes on each block.

1

In the lab, we use specially made interlocking wooden cubes as our physical blocks, and we've included instructions for how to make your own later in this document. However, you don't need to use blocks at all to get started! You can use the graphical interface as a stand-alone, or you can simply print out the icons and use them for tangible interaction.

Installation (LEGO WeDoTM version)

Supported Platforms: Windows XP or better System Requirements: Two or more USB 2.0 ports

Required Equipment: 2 Megapixel Logitech QuickCam Pro 9000 LEGO WeDoTM Construction Kit

Required Software (included with CHERP installer):

Java 7 Development Kit (

432154.html)

Logitech QuickCam Pro 9000 drivers ()

LEGO WeDoTM driver

Quick Instructions

1. Download and run the installer attached to the CHERP webpage. 2. When prompted by the Logitech installer, deselect "Logitech Vid" then select only the drivers.

3. To install the appropriate LEGO WeDoTM driver, you need to have the LEGO WeDoTM Hub connected to the computer usb port. When prompted by the LEGO WeDoTM driver installer, choose the Lego WeDo device/USB Human Interface Device (Vendor ID# 0x0694 and product ID# 0x0003) and accept all the steps and options. Then, click the "Install Now" button and wait for installation to complete.

2

Testing the CHERP Interface

1. Make sure that the webcam and the LEGO WeDoTM driver are installed, and that the webcam and Lego WeDo Robot are both plugged in before you start CHERP. *If they are plugged into different USB ports than when the drivers were installed, you might have to switch which ports they are plugged into.* 2. Place the webcam on a table aimed along the tabletop or on the table's edge looking down at the floor. Leave at least 18 inches to two feet between the tangible icons/blocks and the webcam. 3. Double-click the CHERP desktop icon to open it. Click the icon showing three colored blocks (the Tangible Download button). This should capture an image from the webcam and display it on the right hand side of the screen.

a. If you get an error message indicating that the webcam is not plugged in, double-check the connection and the webcam driver installation (you may need to unplug and re-plug the webcam (perhaps to a different port) and/or restart CHERP. b. If you get an error message indicating that you need a Begin block, the webcam is working. 4. Create a short Graphical program (e.g. Begin-End) and click the Graphical Download button. If everything is set up right, the robot should start running the program immediately.

Left: Graphical ("screen program") Download button. Right: Tangible ("block program") Download button.

Interface Control

You may want to utilize full-screen mode to minimize distractions. To enter and exit full-screen mode, hit Enter and Esc, respectively on your keyboard. The system begins with only the first row of blocks (actions) showing. The second row contains REPEATS and their parameters and the third row contains IFS and their parameters. Typing Ctrl+(1 or 2 or 3) when out of full-screen mode shows that number of rows.

3

Programming with CHERP: Syntax

You can use either the Graphical Interface with the mouse or the Tangible Interface and printed icons to create your program. The standard CHERP syntax is as follows:

Every program must start with a BEGIN block and end with and END block:

Control flow blocks such as IF, IF NOT, and REPEAT must be paired with their associated

END block, with the action(s) to be controlled in between. IF NOT blocks can only be used after IF blocks.

REPEAT and IF blocks have a space for parameters. The coloring of the parameter icons

matches that of their control flow block. For REPEAT blocks, adding a parameter is optional since the default is to REPEAT FOREVER. For IF blocks, the user must add a parameter.

In the Tangible Interface, the parameters' TopCodes must align with those of the other blocks

and be visible to the camera to download the program to a robot.

4

Programming with CHERP: Build and run a program by a Robot

1. Plug in the LEGO WeDoTM and webcam before starting CHERP. Make sure CHERP is installed on your PC.

2. Open CHERP and build a program (see syntax guidelines above). a. Graphical icons will ONLY connect to a BEGIN block or to an already connected sequence of blocks. Unconnected graphical blocks will appear pale. Attach new blocks to the end or middle of a program by dragging and dropping the new block where you want to place it. b. Icons will be read by the computer and the robot in sequential order starting with the BEGIN block. Any icons not attached to a program chain starting with a BEGIN block will not be read. c. To get rid of a Graphical icon or whole series of connected icons, drag them into the rows of available icons at the bottom of the screen.

3. For the Tangible Interface, place the Tangible blocks at least 18 inches to two feet away from the webcam. a. If the icons are too close to the webcam, the computer vision will not see your program properly. b. You may get a prompt to include a BEGIN block in your program. If you do have a BEGIN block and it appeared within the image, change the distance between the webcam and your program and re-download the program.

4. Press the appropriate download button (mouse for Graphical; blocks for Tangible; see below). After downloading the program, the LEGO WeDoTM robot starts the program immediately. Note: To download a Graphical program it is NOT necessary to remove Tangible blocks from the webcam and, likewise, to download a Tangible program, it is not necessary to remove an existing Graphical program from the screen.

5. Place your robot where it can safely move. Keep in mind that since the robot is connected to the computer you need to allow enough and appropriate space for it moves. You can use extension cords to extend the length of the wire that has connected the robot to the USB port of the computer and thus give more freedom to the robot.

6. Regardless of how your program was made, once you download it by pressing the

appropriate download button, you can then edit the program onscreen.

5

Using CHERP with you LEGO WeDoTM robot:

You can build your robot using any combination of LEGOTM bricks, LEGO WeDoTM robotic parts, and recycled materials. To work with CHERP, your robot must conform to the following:

There is one hub, one motor, one distance sensor and one tilt sensor in every construction kit. Hubs are quite expensive if you plan to have extras for every kit. Motors are fairly affordable. Here you can see possible combinations of hubs and motors and the types of the robots you can have. Note that Tilt sensor is not used with CHERP and only Distance sensor would be recognized by the software.

If only one HUB is used:

Two motors can be connected to two connections on the hub. This would give you a two motor car with no sensors and the assembly would be quite simple. The set of possible commands: Forward, Backward, TR, TL, Shake, Spin, Beep, Sing, Repeat (with number condition). If command can NOT be implemented.

One motor and one sensor can each get connected to one of the connections of the hub. This would give you a one motor car with a distance sensor. The assembly might be more complex. The set of possible commands: Forward, Backward, Beep, Sing, Repeat (with sensor condition and any of the stated commands as its action), If(sensor condition and any of the stated commands as its action)

It is physically impossible to have a two motor car with two motors and one sensor all connected to one hub and still have a fully functional robot.

If two HUBs are used:

A robot with more functionalities can be made. A complete set of commands mentioned above using the distance sensor can be implemented.

Some point to consider while building the robots are:

Motors must be attached to the two ports on the LEGO WeDoTM hub. Depending on the

orientation of your motors and their wires, commands like FORWARD and BACKWARD may be reversed. It is crucial to test that your robot behaves as expected and change the wire orientation until it does.

CHERP allows you to control your robot's behavior using Distance sensor. If you choose to

use a sensor, it does not matter to which connection on the hub you attach it to.

You can run one program at the time using CHERP and the LEGO WeDoTM robot. Every time

you build a program, you would have to press one of the buttons (graphical or tangible), see the results and then start making another one or modify the one you just ran.

Other than that, the sky is the limit! Have a blast building your robot!

6

For More Information:

The Developmental Technologies Research Group: The TangibleK Project: The Human-Computer Interaction Group at Tufts: Tern: TopCodes Computer Vision Library:



People:

Safoura Seddighin Jordan Crouser: David Kiger Michael Horn:



Please feel free to let us know how you're using CHERP by emailing us at devtech@tufts.edu.

7

How to Build the CHERP Wooden Blocks

One full set will include:

2 Begin Blocks (with peg, no hole) 2 End Blocks (no peg, with hole) 28 Regular Blocks, 2 each of:

o Forward o Backward o Turn Left o Turn Right o Spin o Shake o Sing o Beep o Light On o Light Off o End-Repeat o End-If o If-Not o End-If-Not

4 Double Blocks:

o 2 Repeat o 2 If

12 Parameter labels (not affixed to blocks):

o Number labels 2-5 for use with REPEAT blocks o PUSHED, RELEASED, LIGHT, DARK labels for use with IF blocks o UNTIL PUSHED, UNTIL RELEASED, UNTIL LIGHT, UNTIL DARK labels for use

with REPEAT blocks

Materials:

40 1 3/4" wooden craft cubes (craft_parts.htm) 40 3/8" x 1 1/4" fluted pin dowels (or 3/8" dowel, cut to size) Yellow wood glue Rubber cement or 3M spray adhesive White card stock paper or printable sticker sheets for printing labels Medium grade sandpaper OPTIONAL: Thick magnetic paper or Velcro coins for control flow blocks and parameters

Tools:

10" drill press 3/8" drill bit Drill press vice Small hand saw (e.g. Tenon saw or Dovetail saw) C-clamp or vice Paper cutter (or access to a laser cutter!)

8

................
................

In order to avoid copyright disputes, this page is only a partial summary.

Google Online Preview   Download