daviswellmrainandrsn paper 9

Upload: ivan-avramov

Post on 03-Apr-2018

215 views

Category:

Documents


0 download

TRANSCRIPT

  • 7/28/2019 DavisWellmRainAndrsn Paper 9

    1/5

    Providing Robotic Experiences Through Object-BasedProgramming (PREOP)

    James DavisThe University of AlabamaTuscaloosa, AL

    [email protected]

    Briana Lowe WellmanThe University of AlabamaTuscaloosa, AL

    [email protected]

    Monica AndersonThe University of AlabamaTuscaloosa, AL

    [email protected]

    Michael RainesThe University of Alabama

    Tuscaloosa, [email protected]

    ABSTRACT

    PREOP (Providing Robotic Experiences Through Object-Based Programming) is an integrated approach to usingrobots within the introductory Computer Science sequence.

    Rather than use the program-by-wire approach of exist-ing tools, PREOP leverages an object-based, syntax-freeenvironment. PREOP provides a physical, relevant, chal-lenging problem domain that appeals to students. This pa-per presents the PREOP implementation, its technical chal-lenges and the promising preliminary results.

    Categories and Subject Descriptors

    K.3.2 [Computing Milieux]: Computers and Education-Computer and Information Science Education

    ; D.2.8 [Software Engineering]: Programming Environ-mentsGraphical environments, Integrated environments

    ; I.2.9 [Computing Methodologies]: Artificial Intelli-

    genceRobotics

    General Terms

    Design, Languages, Human Factors

    Keywords

    Computer Science Education, Graphical Development En-vironments, Syntax-free development environments

    1. INTRODUCTIONThis paper seeks to introduce and describe a modification

    to the interactive programming environment Alice. By sup-

    plementing the virtual world of Alice with robotics, the mod-ification expands upon the utility of the software through theaddition of a tactile functionality. Considering the highly

    Permission to make digital or hard copies of all or part of this work forpersonal or classroom use is granted without fee provided that copies arenot made or distributed for profit or commercial advantage and that copiesbear this notice and the full citation on the first page. To copy otherwise, torepublish, to post on servers or to redistribute to lists, requires prior specificpermission and/or a fee.Copyright 200X ACM X-XXXXX-XX-X/XX/XX ...$5.00.

    lauded success of Alice in addressing the problematic reten-tion rates in the field of Computer Science, it seems rea-sonable to predict that such an expansion may increase itsefficacy.

    The purpose of Alice is to instill confidence and motivateintroductory Computer Science students, which, in turn, in-creases interest and therefore, retention. Syntax can be asignificant hurdle for entering students with no prior pro-gramming experience. Alices interface requires no knowl-edge of syntax. This results in increased confidence in pro-gramming ability, and through a maintained program struc-ture, Alice is able to simultaneously emphasize core con-cepts. Alice motivates students by enticing them with theproposition of creating interactive 3D worlds. In short, Alicekeeps Computer Science majors interested by giving themthe ability to easily program with a compelling output.

    Our addition to Alice will be referred to as ProvidingRobotic Experiences Through Object-Based Programmingor PREOP(available at cs.ua.edu/PREOP). PREOP addsa physical component to the output of Alice, leaving the restof the software intact. Students can program a robot to per-form actions and respond to virtual or physical stimuli withthe proven Alice interface. This modification serves the samefunction as Alices creation of interactive worlds. Studentsunmotivated by a purely virtual output could potentially becompelled by the physical element of PREOP.

    As a preliminary study, PREOP was implemented in theintroductory Computer Science curriculum at The Univer-sity of Alabama (UA) in the fall semester of 2008. In this ex-periment, students in a class that utilized PREOP were com-pared to students in classes that followed the pre-existingcurriculum, the results of which will be discussed in thispaper.

    The following explains the organization of this paper. Therelated work is presented in Section 2. In Section 3, the ap-proach including software features, hardware, and softwaredevelopment is discussed. Section 4 follows with a discus-sion of classroom deployment and preliminary results. Theconclusion and future directions are in Section 5.

    2. RELATED WORKPrior research supports the use of robots and robotic ap-

    plications to help increase student motivation, confidenceand competence. There are a number of reports that de-

  • 7/28/2019 DavisWellmRainAndrsn Paper 9

    2/5

    scribe the usefulness of robotics in teaching science, mathand computing skills at all education levels [12, 10, 3]. How-ever, the application of robotics in Computer Science first-year sequences has lacked key elements required to success-fully teach programming.

    Syntax-free graphical environments have proven useful forteaching programming constructs [4]. However, current robotics-based approaches do not mirror any of the well-known pro-

    gramming paradigms well enough to facilitate knowledgetransfer to programming. Most graphical robotics-basedprogramming environments focus on wire-based graphicalinterfaces that connect data sources with data consumers.Although studies have shown that robotics in introductorysequences requires a simulation component to facilitate ini-tial code generation and testing [5, 6], only the MicrosoftRobotics Studio provides a simulator.

    The Institute for Personal Education Robotics (IPER) [1]is a consortium of university and industry partners that fo-cuses on an integrated approach that combines software,hardware, and instructional materials. The center of theapproach is the scribbler robot, an inexpensive robot that ispurchased and owned by the students. Robot control pro-grams are created using an API from traditional languagessuch as Python and C.

    Berea College takes an alternative funnel-based approachthat uses robotics as an elective course designed to piqueinterest but leaves the first-year sequence intact [11]. TheBerea College Math and Computer Science department hasexperimented with different technologies to attract unde-cided students to Computer Science. A series of specialtopic CS0 classes were offered that included web develop-ment, Alice and robotics using RoboLab. Each technologyappealed to different groups based on CS0 enrollment. Al-though students taking the Alice CS0 course had the highestcontribution of students to the CS1-programming with C++course (57.5%), robotics had the second highest retentionrate (50%). The robotics course had a higher level of minor-

    ity students persisting in CS than did the Alice course, whichmay suggest that robotics is more appealing to minorities.This is consistent with previously documented phenomenathat suggests that minority students prefer to work on prob-lems with societal benefit [7, 9]. However, women preferredthe Alice CS0 course to the robotics CS0 course. The CS0web course appealed strongly to both women and minorities.

    3. APPROACHThis approach outlines the steps needed to create a typ-

    ical PREOP project to familiarize the reader with the newsoftwares features. Then, we discuss the technical detailsregarding these features and the process of development. Fi-

    nally, we present the method by which the preliminary studywas conducted at The University of Alabama.

    3.1 HardwareA personal computer (Windows/Unix/MAC) with Blue-

    tooth support and an iRobot Create (Figure 1) with a Blue-tooth Adapter Module (BAM) are required to fully operatePREOP. PCs without Bluetooth hardware can be fitted witha Bluetooth device. iRobot, makers of the autonomous vac-uum Roomba, produces the Create, a vacuum-less Roomba,for hobbyists and educators. The BAM connects to a serialport on the Create and forwards received Bluetooth trans-missions to the host for wireless control of the robot.

    Figure 1: iRobot Create robot with a BAM in-

    stalled.

    3.2 Demonstration of Software FeaturesThe purpose of this section is to familiarize the reader with

    the use and features of PREOP to ensure that subsequent,technical explanations will be more meaningful.

    After starting PREOP, users are presented with an inter-face nearly identical to that of Alice. In order to control anearby Create, outfitted with a BAM, users must add theCreate object. As the Create object follows the samerules as any other object in Alice, the new object can beadded and manipulated with a basic knowledge of the soft-ware. If a user selects the added virtual robot, the objectdetails panel will display the functionality of the Create,decomposed into the now-familiar categories of properties,

    methods and functions. Each of the categories contains de-tails that are specific to the Create object.To establish a Bluetooth connection between the software

    and the BAM, the user modifies the virtual robots con-nectedTo property. This presents a dialog where the usercan type a unique four-digit code to connect to a particularBAM. Once connected, the user might drag move, turn andplay note methods or functions that return sensor data,into the code editor.

    Figure 3 shows a program that moves the robot forwarduntil it hits a wall, whereupon it will play a note while re-versing at an arc and then, proceed forward again. Thefigure includes a Do together block. When commandsare located within one of these designators they are non-blocking, that is, they are permitted to run simultaneouslywith other commands. The example includes a turn andmove command executing simultaneously, which results inthe tracing of a rounded path.

    Figure 3 also includes a play note method that acceptsa note variable, a category of variable not included in theoriginal version of Alice. Users define notes by selectingvalues for pitch and duration in a prompt (Figure 4). Also,the Alice type list can be used to create an array of notesaccepted by the play song method, which causes the robotto sound a succession of notes.

    Users can simulate the output of their programs by select-ing the Play button, which presents a new window with a

  • 7/28/2019 DavisWellmRainAndrsn Paper 9

    3/5

    Figure 2: Properties, methods, and functions of the

    Create object

    Figure 3: Sample PREOP code

    Figure 4: Prompt for users to define notes

    Figure 5: Prompt to connect to a Create

    3D rendering of the result. To send commands to the BAM,users must activate the Real Play option. Selecting RealPlay will run both the simulation and the physical robotsimultaneously.

    3.3 Technical ChallengesThe development of PREOP posed many challenges, the

    most important of which are covered in the following sec-tions.

    3.3.1 Designing the Create object

    Careful consideration was taken to ensure PREOP main-tained the proven structure of Alice. The most important

    decisions involving congruency with Alice were made withregard to the seamless integration of the Creates functionsinto Alices world.

    Objects in Alice are composed of properties, methods andfunctions (Figure 2). Properties hold data that can be freelyaltered in much the same way that public attributes maybe. Methods are the equivalent of their namesake in con-ventional class vocabulary, that is, they tell the object todo something. Lastly, functions correspond to private, read-only attributes of a class.

    The only actions the iRobot Create can perform, move-ment and note playing, are designated as methods. Thecolor and power status of the LEDs are denoted as prop-erties, because the lights characteristics can be written to

    and read from. The bump detectors and wheel-drop sensorsare categorized as functions, because the data from thesesensors can only be read.

    3.3.2 Connection using Bluetooth

    Alices code consists almost entirely of Java. Sun Mi-crosystemss Java has no official support for Bluetooth com-munications; however, a specification (JSR-82) [8] has beenwritten outlining a recommended interface for a Java Blue-tooth library. Several third-party companies have createdlibraries to fit this specification. BlueCove [2] was chosenfor our purposes, because it is a free, open-source Bluetoothlibrary that functions on both Windows and Linux. PREOPuses BlueCove to send and receive data from the BAM.

    In an early version of PREOP, the connection proceduresearched for and listed all of the BAMs detected by the PC.The user would then select a device and connect to it. Ina room filled with BAMs, populating the list proved time-consuming, so a shorter method was devised. Now, usersinput the last four digits of a BAMs unique identificationcode (Figure 5). The system searches for devices until thecorrect one is found and automatically connects to the de-vice. The new method has accelerated and simplified theconnection process, although some versatility has been lost.

    3.3.3 Moving the Create

    Translating the movement of a virtual object in Alice to

  • 7/28/2019 DavisWellmRainAndrsn Paper 9

    4/5

    Figure 6: Sample PREOP code

    Figure 7: Foward and turn velocities from the code

    in Figure 6. A change in velocity triggers a com-

    mand to be sent to the robot

    the physical movement of a robot poses unique problems.Tantamount to these is the disparity between the way thatAlice animates objects and the way that the Create followsinstructions.

    The virtual Create and the physical Create function ondifferent planes. For the sake of animation, Alice makesminute, incremental changes to the virtual robots orienta-tion. These rapid changes, however, would be impossiblefor the real robot to perform, because once set, the veloc-ities of the robots wheels are maintained until otherwisecommanded.

    The first step taken to convert Alice methods into com-mands for the real Create was the development of a functionthat would yield the desired tra jectory in a physical setting.This function takes the forward and turning velocities in the3D environment and converts them into the individual wheelvelocities of the real Create. If the real Create is given inputthat is not physically possible, the function caps the wheelsrotational velocities to approximate the motion.

    Next, the Alice code that controls the execution of meth-ods was modified to add and subtract velocity from forwardand turning velocities already in use. Velocity is added whenthe Creates method begins, and is subtracted when themethod is complete.

    Finally, after any change in velocity, the wheel velocities ofthe Create are updated using the function discussed earlier.A buffer combines commands received in rapid succession toavoid jumpy movements that could damage the hardware.

    This solution allows for the successful synthesis of anycombination of method calls. For example, consider themethods move forward and turn left performing simul-taneously. The velocities would be updated when Alice ranthe methods, triggering a command to be sent to the Create.The robot would travel in an arc until the methods termi-nated and the velocities were subtracted. The change wouldthen send a command to stop the robot. Figures 6 and 7show an example program and illustration of how commandsare sent to the Create.

    Topics

    Objects and MethodsVariableUser InputLoopsNested IfsParametersEventsRandom NumbersArraysRecursion

    4. PREOP IN THE CLASSROOMThe following describes the approach used to test the ef-

    fect of integrating PREOP into an introductory ComputerScience course. UA requires a problem-solving lab (CS116)to be taken with or before the first Computer Science course(CS114). Of the five labs offered in the fall semester of 2008,one was chosen as the test group. The class consisted offorty students that worked in pairs, each with a PC and aniRobot Create. Classes began with a fifteen-minute lecture

    on a programming concept, after which, students completeda PREOP assignment illustrating the concept. Topics dis-cussed included: objects, methods, variables, if-statements,loops and other fundamental programming concepts (TableI). Students were required to submit a lab report demon-strating their comprehension of the fundamental concepts.At the end of the semester, the entire population of lab stu-dents was given surveys about their performance in theirfirst Computer Science course.

    4.1 ResultsThe survey was administered to students during the 12th

    week of class, meaning that students still in the class couldno longer drop out of the course. The survey was admin-

    istered in the CS116 lab and included students who hadalready dropped the CS114 course (generally considered tobe more challenging than the lab). Of the seven CS ma-

    jors in the Alice with Robotics CS116 lab section, there wasonly one withdrawal from the CS114 course. The remainingsections of the traditional CS116 lab reported eight with-drawals out of the twenty CS majors, which correlates withthe one-third drop rate usually experienced in CS114. Of theeight students that dropped CS114, five reported that theywould re-attempt CS114 the following semester. The stu-dent who dropped CS114 from the experimental section ofCS116 planned to retake the course the following semester.Because this data is self-reported, additional data must beobtained from the Registrar to accurately characterize theeffects of the new CS116 programming lab on both studentdrop rates and persistence. Also, larger numbers need tobe studied for statistical significance. However, this data,coupled with much higher recommendation rates for the ex-perimental course over the traditional course, suggests thatthe new lab may be an asset to achieving greater skill ac-quisition and persistence in the major.

    These results motivated Berea College to incorporate PREOPinto their CS curriculum. Berea students implemented thesame assignment (programming a polygon) in both PREOPand RoboLab. The thirty-seven students were then askedto contrast the two environments. Students reported appre-ciating the availability of the simulation environment.

  • 7/28/2019 DavisWellmRainAndrsn Paper 9

    5/5

    Approximately 40% of students used a programming con-cept to describe PREOP such as, coding,sequence,al-gorithm, function and object-oriented. Most studentsreferred to RoboLab as wiring, which is not a program-ming concept, and further commented that, RoboLab is foran advanced group of individuals. Comments made aboutPREOP included that: [PREOP] required fewer commands,we know what [the icons] mean, and [it was] easier to in-

    put algorithms.

    5. CONCLUSION AND FUTURE WORKIn this paper, we detailed the process used to integrate

    robotics into an existing educational programming environ-ment and discussed the resulting products first round oftesting in an introductory Computer Science curriculum.The approach was successful, but PREOP lacked some im-portant features, and further study will be required to thor-oughly establish our softwares efficacy.

    A limitation of PREOP involves the simulators lack ofsupport for the Creates virtual sensor responsiveness. Userscannot test collisions in Alices virtual environment; thus,users can only use the bumper sensors in a physical envi-

    ronment. Future additions to the software should includea more robust simulation environment, including collisiondetection, to solve this problem.

    The results of our study indicated that the use of therobotics software was an improvement over the existing cur-riculum, but the study lacked the scope needed for statisticalreliability. Therefore, a larger study, including a compari-son to the original Alice, should be conducted in order toevaluate the effectiveness of our method.

    6. ACKNOWLEDGMENTSThis work is supported by NSF grant DUE-0736789. We

    would like to acknowledge Dr. Jan Pearce for her assistance.

    7. REFERENCES[1] T. Balch, J. Summet, D. Blank, D. Kumar,

    M. Guzdial, K. OHara, D. Walker, M. Sweat,G. Gupta, S. Tansley, J. Jackson, M. Gupta, M. N.Muhammad, S. Prashad, N. Eilbert, and A. Gavin.Designing p ersonal robots for education: Hardware,software, and curriculum. IEEE Pervasive Computing,7(2), Apr-June 2008.

    [2] Bluecove. An open source implementation of theJSR-82 Bluetooth API for Java.http://www.bluecove.org/.

    [3] K. Cannon, M. LaPoint, N. Bird, K. Panciera,H. Veeraraghavan, N. Papanikolopoulos, and M. Gini.No Fear: University of Minnesota Robotics Day Camp

    Introduces Local Youth to Hands-on Technologies.Proc. of the IEEE Intl. Conf. on Robotics andAutomation (ICRA), pages 363368, 2006.

    [4] S. Cooper, W. Dann, and R. Pausch. Teachingobjects-first in introductory computer science. InProceedings of the 34th SIGCSE technical symposiumon Computer science education, pages 191195. ACMNew York, NY, USA, 2003.

    [5] B. Fagin, U. Academy, and L. Merkle. Measuring theEffectiveness of Robots in Teaching Computer Science.

    [6] T. Flowers and K. Gossett. Teaching problem solving,computing, and information technology with robots.

    Journal of Computing Sciences in Colleges,17(6):4555, 2002.

    [7] P. Freeman and W. Aspray. The Supply of InformationTechnology Workers in the United States. 1999.

    [8] B. Kumar. JSR-82: Java APIs for Bluetooth.[9] L. Layman, L. Williams, and K. Slaten. Note to self:

    make assignments meaningful. In SIGCSE 07:Proceedings of the 38th SIGCSE technical symposium

    on Computer science education, pages 459463, NewYork, NY, USA, 2007. ACM.

    [10] C. Massey, G. Weaver, J. Ostrowski, and T. Amos.Agents for change: Robotics for girls. National ScienceFoundation, Division of Resource Development.Award, 9976527, 2000.

    [11] J. Pearce and M. Nakazawa. The funnel that grew ourcis major in the cs desert. In SIGCSE 08: Proceedingsof the 39th SIGCSE technical symposium on Computerscience education, pages 503507, New York, NY,USA, 2008. ACM.

    [12] S. Wagner. Robotics and Children: ScienceAchievement and Problem Solving. Journal ofComputing in Childhood Education, 9(2):149192,

    1998.