kiwi (kids invent with imagination) robotics construction...

13
KIWI (Kids Invent With Imagination) Robotics Construction Kit Research Prototype 1 Summer 2012 KIWI (Kids Invent With Imagination) DevTech Research Group, Tufts University Resource Guide KIWI is licensed with a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License . Under this license, you may use and adapt this work, but you must attribute the work to the DevTech Research Group. You may not use this work for commercial purposes. This project is supported by National Science Foundation Grant #DRL-1118897. Any opinions, findings, and conclusions or recommendations expressed in this material are those of the authors and do not necessarily reflect the views of the National Science Foundation

Upload: dangmien

Post on 08-Apr-2019

225 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: KIWI (Kids Invent With Imagination) Robotics Construction ...ase.tufts.edu/DevTech/tangiblek/research/CHERP-KIWI Technical... · KIWI (Kids Invent With Imagination) Robotics Construction

KIWI (Kids Invent With Imagination) Robotics Construction Kit Research Prototype

1

Summer 2012

KIWI (Kids Invent With Imagination)

DevTech Research Group, Tufts University

Resource Guide

KIWI is licensed with a Creative Commons Attribution-NonCommercial-ShareAlike

3.0 Unported License. Under this license, you may use and adapt this work, but you must attribute

the work to the DevTech Research Group. You may not use this work for commercial purposes.

This project is supported by National Science Foundation Grant #DRL-1118897.

Any opinions, findings, and conclusions or recommendations expressed in this material are those of the authors and do not necessarily reflect the views of the National Science Foundation

Page 2: KIWI (Kids Invent With Imagination) Robotics Construction ...ase.tufts.edu/DevTech/tangiblek/research/CHERP-KIWI Technical... · KIWI (Kids Invent With Imagination) Robotics Construction

KIWI (Kids Invent With Imagination) Robotics Construction Kit Research Prototype

2

What is in the box?

KIWI (Kids Invent With Imagination) Construction Set

The KIWI construction set enables young children (5-7) to engage in robotics activities in a developmentally appropriate way. It is a research prototype developed by the DevTech research group at Tufts University with founding from NSF. The KIWI set contains different elements including two motors, a sound sensor, a distance sensor, a light sensor, a light output, and a proper USB cable. The robot can connect to the computer using the USB cable to receive the program that controls its act. The programming language that is used to program the KIWI robot is called CHERP. CHERP is described in the programming section of the manual. Below you can find a description of the KIWI pieces that can attach to the robot’s main body and perform different tasks.

We can learn about those pieces by comparing them to our own body or animal’s bodies.

We move with our legs and arms KIWI has motors

There are three different spots for the motors to attach to the robot body. Two are on the side of the robot, one on the top. Two motors are included in each construction kit. The robot can be mobile or stationary. If the motors get attached to the sides and become wheels, the robot will be mobile. If one motor, gets attach to the top spot, the robot will be stationary. The motors can be programmed to turn this way or that way.

Page 3: KIWI (Kids Invent With Imagination) Robotics Construction ...ase.tufts.edu/DevTech/tangiblek/research/CHERP-KIWI Technical... · KIWI (Kids Invent With Imagination) Robotics Construction

KIWI (Kids Invent With Imagination) Robotics Construction Kit Research Prototype

3

We hear sounds and noises with our ears KIWI has a Sound Sensor

The Sound sensor is used to differentiate the two concepts of “Loud” and “Quiet”. Using the Sound Sensor, the robot can be programmed to do something when it is loud, and do something else when it gets quiet, or vice versa.

We see things with our eyes KIWI has a Light Sensor

The Light sensor is used to differentiate the two concepts of “Dark” and “Light”. If the room is darker than a specific level, the sensor considers that as Dark. Otherwise, the room will be considered Light. The robot can be programmed to do some things when it is light outside, and do something else when it gets dark, or vice versa.

A bat knows that is getting close to something KIWI has a Distance/Reflection Sensor by using the echo effect

The Distance sensor is used to detect whether the robot is getting Near/Far to/from a wall, another robot, etc. If the sensor senses an object that is nearer than a certain distance, it will report a “Near” value. The robot can be programmed to do something when it gets near another robot, and do something else when it gets far from it.

Page 4: KIWI (Kids Invent With Imagination) Robotics Construction ...ase.tufts.edu/DevTech/tangiblek/research/CHERP-KIWI Technical... · KIWI (Kids Invent With Imagination) Robotics Construction

KIWI (Kids Invent With Imagination) Robotics Construction Kit Research Prototype

4

Light Output

The Light output can be programmed to turn on and off. Children can turn the color of the light output into different colors using transparent stickers or paper shades.

We can remember things with our brain. KIWI stores the program on a board that is inside.

After the students finish making the programming using CHERP, they simply connect the KIWI robot to the computer and transfer the program to the robot. The robot will remember the program by storing it on an electronic board. The robot can get disconnected from the computer but will be able to run the program as many times as the person wants.

Page 5: KIWI (Kids Invent With Imagination) Robotics Construction ...ase.tufts.edu/DevTech/tangiblek/research/CHERP-KIWI Technical... · KIWI (Kids Invent With Imagination) Robotics Construction

KIWI (Kids Invent With Imagination) Robotics Construction Kit Research Prototype

5

PART I

Construction With KIWI Parts

There are a total of four ports on the KIWI body as shown below:

Both the sensors and the light output can be attached to any of these ports. Therefore, the KIWI robot does not have different ports for inputs and outputs. The user can simply swap the sensors and the light output, and changing these places would not affect running the program that has been stored on the robot. Magnetic feature of the motor boxes and sensors makes attaching them to the main body and building the robot easy.

The power needed by the robot to function, is provided by the 4 AAA batteries placed in the space on the back of the robot, or through its connection to the computer. Therefore, after the program transfers to the robot (the process is explained in the programming section), the robot can disconnect from the computer and function, only if all the 4 AAA batteries are in place. Otherwise, the robot needs to stay connected to the computer in order to function and run the program.

The only button existing on the robot is the start button. The robot starts running a program, only when the start button is pressed. This gives full control to the user to decide when to start functioning of the robot.

The distance sensor receives its input through a hole that is located on it. The hole needs to be aligned with the object/surface that is considered as the to the object/surface to get far from or close to.

The material that is used in the structure of the block (mostly wood), makes it possible for the young children to implement their artistic ideas, make the robots personal, and relate to them easier. While the magnetic aspect of the sensors and the motor boxes eliminates the challenge of placing these pieces on the robot, it resembles the process of making a puzzle that children are familiar with. Children can also attach string to the robot and use it as a car or animal robot. KIWI provides the opportunity of making arts and crafts as children can easily use recycling materials and stickers to decorate, and extend the wooden body of the robot.

Page 6: KIWI (Kids Invent With Imagination) Robotics Construction ...ase.tufts.edu/DevTech/tangiblek/research/CHERP-KIWI Technical... · KIWI (Kids Invent With Imagination) Robotics Construction

KIWI (Kids Invent With Imagination) Robotics Construction Kit Research Prototype

6

PART II

Programming the KIWI robot With CHERP

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. We have several versions of CHERP to work with different robots,

CHERP was designed and implemented by many students working in the DevTech research group at Tufts University directed by Prof. Marina Bers: Michael Horn, Jordan Crouser, David Kiger and Safoura Seddighin. This project, which evolved through several iteration, was initially possible through a collaboration between the DevTech Research Group and the Human Computer Interaction Lab at Tufts University

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

Page 7: KIWI (Kids Invent With Imagination) Robotics Construction ...ase.tufts.edu/DevTech/tangiblek/research/CHERP-KIWI Technical... · KIWI (Kids Invent With Imagination) Robotics Construction

KIWI (Kids Invent With Imagination) Robotics Construction Kit Research Prototype

7

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.

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. 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 of CHERPK ( the software that works with the KIWI robot)

Supported Platforms: Windows XP or better System Requirements: One USB 2.0 port

Required Equipment:

The newest version of CHERP, called CherpK, works with both the embedded and external cameras. That means that it will automatically detect any type of camera on your computer.. If you do not have an embedded camera on your computer, you will need an external camera. You need to make sure that the proper driver for the external camera is installed on your computer before it is used by the software. Also, if you have both an embedded and an external camera,, the external camera will be the first choice to be used by the software. Therefore, the required equipment is:

Any type of webcam, embedded or external.

KIWI Construction Kit

Required Software (included with CherpK installer):

Java 7 Development Kit (http://www.oracle.com/technetwork/java/javase/downloads/java-se-jdk-7-download-

432154.html)

Quick Instructions

1. Download and run the installer called “CherpK”, linked to the CHERP webpage. This is the

newest version of Cherp, modified to use KIWI hardware.

2. When prompted by the Java 7 Rutime, agree with the default settings and go on. Click the

“Install Now” button when prompted, and wait for installation to complete.

Testing the CHERP Interface 1. Make sure that the webcam (if you are using an external camera) plugged in before you start CherpK. *If the camera is plugged into different USB port than when the driver was installed, you might have to switch the port which it is plugged into, so the software recognizes the external camera .*

If you are using your computer’s internal (embedded) camera, you will not need to do anything in regards to the camera.

2. Place the external webcam on a table aimed along the tabletop or on the table’s edge looking down at the floor. If you are using an internal camera, you need to make sure that it is aligned in

Page 8: KIWI (Kids Invent With Imagination) Robotics Construction ...ase.tufts.edu/DevTech/tangiblek/research/CHERP-KIWI Technical... · KIWI (Kids Invent With Imagination) Robotics Construction

KIWI (Kids Invent With Imagination) Robotics Construction Kit Research Prototype

8

the way that can capture a clear picture of the tangible icons/blocks .Leave at least 18 inches to two feet between the tangible icons/blocks and the webcam.

3. Double-click the CherpK 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, it means that no internal or external webcam was detected on your computer. Please 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 CherpK.

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 receive the program from the computer and start running the program when the start button located on its body is pressed.

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.

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.

Page 9: KIWI (Kids Invent With Imagination) Robotics Construction ...ase.tufts.edu/DevTech/tangiblek/research/CHERP-KIWI Technical... · KIWI (Kids Invent With Imagination) Robotics Construction

KIWI (Kids Invent With Imagination) Robotics Construction Kit Research Prototype

9

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.

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

1. Plug in the webcam(if an external webcam is used), before starting CherpK. Make sure CherpK is installed on your PC.

2. Open CherpK 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.

Page 10: KIWI (Kids Invent With Imagination) Robotics Construction ...ase.tufts.edu/DevTech/tangiblek/research/CHERP-KIWI Technical... · KIWI (Kids Invent With Imagination) Robotics Construction

KIWI (Kids Invent With Imagination) Robotics Construction Kit Research Prototype

10

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. Connect the KIWI robot to the computer and press the appropriate download button (mouse for Graphical; blocks for Tangible; see below). After downloading the program, disconnect the robot from the computer and place it on a stable surface. Press the start button on the robot. The robot should start running the program immediately. *If all the required 4 AAA batteries are placed in the special place designed on the back of the robot, you can disconnect the robot from the computer and the USB cable after the program is uploaded to the robot, and start running the program by pressing the start button. In case all the batteries are not provided, you can still use the robot and run the program that you upload on it, but you need to keep the robot connected to the computer using the USB cable, at all times.

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. Regardless of how your program was made, once you download it by pressing the appropriate download button, you can then edit the program onscreen, and download it again on the robot by reconnecting the robot and using the appropriate download button.

Page 11: KIWI (Kids Invent With Imagination) Robotics Construction ...ase.tufts.edu/DevTech/tangiblek/research/CHERP-KIWI Technical... · KIWI (Kids Invent With Imagination) Robotics Construction

KIWI (Kids Invent With Imagination) Robotics Construction Kit Research Prototype

11

Using CHERP with your KIWI robot:

You can build your robot using a combination of KIWI parts, and recycled materials. To work with CherpK, your robot must conform to the following:

The process of programming the KIWI robot is relatively simple. The first and main step in programming the robot is to connect it to a USB port using a proper USB cable, and have it turned on.

On the back of the robot, there is a place designated to place 4 AAA batteries. It is important to note that the robot does not necessarily need the batteries to perform. If the batteries are placed in their special location, the robot can disconnect from the computer and run the program that has been updated on it. However, if any of the batteries is missing, the robot can still run the program that is uploaded on it but needs to stay connected to the computer to get the necessary power from the computer.

In order for any of the three sensors to function, they need to attach to one of the four ports located on the robot. Since there are magnets designated in the body of the sensors and the light output, they can easily attach to the slots by being placed in the ports.

There are two motors, one light sensor, one distance sensor, one sound sensor, and one light output included in every kit. One, a few, or all the elements can be connected to the robot at the same time.

You can run one program at the time using CHERP and the KIWI robot. Every time you build a program, you would have to reconnect the robot to the computer (if it has been disconnected from the computer), press one of the buttons (graphical or tangible), disconnect the robot (if you desire and all the 4 batteries are placed in the designated space), see the results and then start the process over again for making another program or modify the one you just ran.

How to Build the CHERP Wooden Blocks

One full set includes:

2 Begin Blocks (with peg, no hole)

2 End Blocks (no peg, with hole)

24 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

Page 12: KIWI (Kids Invent With Imagination) Robotics Construction ...ase.tufts.edu/DevTech/tangiblek/research/CHERP-KIWI Technical... · KIWI (Kids Invent With Imagination) Robotics Construction

KIWI (Kids Invent With Imagination) Robotics Construction Kit Research Prototype

12

4 Double Blocks: o 2 Repeat o 2 If

8 Parameter labels (not affixed to blocks): o Number labels 2-5 for use with REPEAT blocks o NEAR, FAR,LOUD, QUIET, LIGHT,DARK labels for use with IF blocks o UNTIL NEAR, UNTIL FAR, UNTIL LOUD, UNTIL QUIET, UNTIL LIGHT, UNTIL

DARK labels for use with REPEAT blocks

Materials:

36 1 3/4” wooden craft cubes (www.barclaywoods.com/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!)

Instructions for building:

1. Current laboratory versions of CHERP are built out of 1 3/4” wooden craft cubes. These cubes can be purchased from online vendors such as:

http://www.barclaywoods.com/craft_parts.htm

2. Each block will need to have a 3/8” hole drilled through the cube. This is best done with a 10” drill press and a 3/8” drill bit. Each cube should be clamped down with a vice and the hole should be drilled with the grain (i.e. drill into one of the end grain sides of the cube). It's important that the holes be drilled exactly into the center of the cubes so that the blocks line up straight when connected together in a program.

3. For the START and END blocks, holes should only be drilled half way through the cube. For the REPEAT and IF blocks, drill the holes only half-way through two cubes. Then use wood glue to glue the sides opposite the holes together to form double blocks.

4. Use wood glue to glue the pin dowels into the cubes. Spread glue on the bottom 1/2” of the peg and twist it into the hole of the cube so as to distribute the glue evenly. The dowel should stick out 3/4” from the hole. You can use a penny (which has 3/4” diameter) to gauge the proper height.

Page 13: KIWI (Kids Invent With Imagination) Robotics Construction ...ase.tufts.edu/DevTech/tangiblek/research/CHERP-KIWI Technical... · KIWI (Kids Invent With Imagination) Robotics Construction

KIWI (Kids Invent With Imagination) Robotics Construction Kit Research Prototype

13

5. After the glue has dried, sand the edges and corners of the blocks to make them smooth.

6. PDF files of the icons and parameters can be found on the CHERP website:

http://ase.tufts.edu/DevTech/tangiblek/research/cherp.asp

Print out two copies of the icons and one copy of the parameters on printable sticker sheets or card stock using a color printer, and cut out each individual label with a paper cutter.

OPTIONAL: You may want to print the labels for the parameters on magnetic paper so that the parameter icons can easily stick to the control flow blocks. This works best on a laser printer rather than an ink-jet printer.

7. If using magnetic parameters, glue 4 squares of magnet paper under the 4 parameter spaces on double-blocks.

If using card stock rather than sticker sheets, use rubber cement or 3M adhesive to glue the block labels onto the four outside faces of the cubes. It is important that the TopCode label be aligned as shown in the image above, with the dowel pointing to the right and/or the hole to the left. This ensures that the webcam will be able to correctly identify the block.

If using Velcro coins to attach parameters, be sure to place the coins in the proper location to ensure that the parameters are in line with the other blocks. For instance, place Velcro coins on the bottom left corner of the REPEAT FOREVER spaces or in the center of the Ifs’ empty parameter spaces, and place the other half of the coin in the corresponding spot on the parameters. Also be sure to place the correct half of the coin pairs (scratchy or fuzzy) on the block versus the parameter.

8. Feel free to come up with your own materials and techniques for making a working set of Tangible blocks!

CHERP is licensed with a Creative Commons Attribution-

NonCommercial-ShareAlike 3.0 Unported License. Under this

license, you may use and adapt this work, but you must attribute

the work to the DevTech Research Group. You may not use this

work for commercial purposes.