Robotics course with the Acrob robot · levels without any other converters on the board, so...

6
Robotics course with the Acrob robot Richard Balogh Slovak University of Technology in Bratislava Ilkoviˇ cova 3, 812 19 Bratislava, Slovakia Email: [email protected] Abstract—Robotics course at the Faculty of Electrical En- gineering and Information Technology of Slovak University of Technology in Bratislava is intended for the 3 rd year students of bachelor studies. In this paper we describe the course organization and some of laboratory exercises with the Acrob mobile robot. We describe its hardware used for the course and tasks solved. We would like to share our experience with work of students in laboratory and main problems we encountered. Index Terms—mobile robot, project-based learning, education, ultrasonic distance sensors I. I NTRODUCTION Slovak University of Technology (STU) in Bratislava is a modern educational and scientific institution. Since its foundation in 1937 more than 105,000 students graduated here. On average around 16,000 students study at the STU every year. At present, the University has seven faculties. All STU faculties offer accredited programmes within a complex bachelor, master and PhD study system. Course Robotics is intended for students of the 3 rd year of bachelor studies Industrial informatics at the Faculty of Elec- trical Engineering and Information Technology (FEI STU). Its value is 6 ECTS credits, it consists of 3 hours of theoretical lectures and 2 hours of lab sessions each week during the 12- week semester. The same course is offered also in a distance form of study. Assessment of students is based on their written laboratory reports, brief tests and one written report (40% together) and written final exam (60%) – see Fig.1 for details. Last year, 51 students visited the course. Fig. 1. Evaluation of students during semester. During the first half of the semester, students are focused on industrial robotics – work with manipulators and compute various transformations and kinematic equations. In the sec- ond half of semester, basic concepts of mobile robotics is introduced. As we mentioned before, lectures are intended for students of a broader study branch Industrial informatics, so probably most of them will never be involved in the robotics area. Only few of them will develop their knowledge within master studies in Robotics. At present, similar courses are offered at universities all over the world. Comparing our Robotics course with e.g. Mobile Robot Programming Laboratory at CMU [1], our focus is not only on robot programming – we can also modify robots hardware (e.g. sensors). We also use much simplier robots and work more with hardware interfacing. Another similar course is offered at the CTU in Prague [2]. They use commercial LEGO Mindstorms kits so the hardware and its interfacing is almost hidden to students. Other courses (e.g. [3], [4]) use simulated robots. We have found this concept unsatisfying for our students since they work with simulations in majority of courses. Similarly to [5], our course is oriented to robot programming with an opportunity to interact with hardware directly, however without incorporating the vision system for navigation. Our course is supposed for beginners and less advanced students – we deal with basics of the robotics and instead of image processing we stay on the low level of robot control and interfacing. For purposes of laboratory exercises we developed the robot Acrob [6] – see Fig. 2. II. ROBOT ACROB This robot is based on a commercial robot Boe-Bot (Pa- rallax, Inc.) [7] with completely new electronics controller board. We had many good experiences with the original Boe- Bot robot, but its programming in PBASIC language was a Fig. 2. Robot Acrob with added ultrasonic scanner.

Transcript of Robotics course with the Acrob robot · levels without any other converters on the board, so...

Page 1: Robotics course with the Acrob robot · levels without any other converters on the board, so different converters can be used. We can use standard FTDI Chips USB cable or SparkFun’s

Robotics course with the Acrob robotRichard Balogh

Slovak University of Technology in BratislavaIlkovicova 3, 812 19 Bratislava, Slovakia

Email: [email protected]

Abstract—Robotics course at the Faculty of Electrical En-gineering and Information Technology of Slovak University ofTechnology in Bratislava is intended for the 3rd year studentsof bachelor studies. In this paper we describe the courseorganization and some of laboratory exercises with the Acrobmobile robot. We describe its hardware used for the course andtasks solved. We would like to share our experience with workof students in laboratory and main problems we encountered.

Index Terms—mobile robot, project-based learning, education,ultrasonic distance sensors

I. INTRODUCTION

Slovak University of Technology (STU) in Bratislava isa modern educational and scientific institution. Since itsfoundation in 1937 more than 105,000 students graduatedhere. On average around 16,000 students study at the STUevery year. At present, the University has seven faculties. AllSTU faculties offer accredited programmes within a complexbachelor, master and PhD study system.

Course Robotics is intended for students of the 3rd year ofbachelor studies Industrial informatics at the Faculty of Elec-trical Engineering and Information Technology (FEI STU). Itsvalue is 6 ECTS credits, it consists of 3 hours of theoreticallectures and 2 hours of lab sessions each week during the 12-week semester. The same course is offered also in a distanceform of study. Assessment of students is based on their writtenlaboratory reports, brief tests and one written report (40%together) and written final exam (60%) – see Fig.1 for details.Last year, 51 students visited the course.

Fig. 1. Evaluation of students during semester.

During the first half of the semester, students are focusedon industrial robotics – work with manipulators and computevarious transformations and kinematic equations. In the sec-ond half of semester, basic concepts of mobile robotics isintroduced. As we mentioned before, lectures are intended forstudents of a broader study branch Industrial informatics, so

probably most of them will never be involved in the roboticsarea. Only few of them will develop their knowledge withinmaster studies in Robotics.

At present, similar courses are offered at universities all overthe world. Comparing our Robotics course with e.g. MobileRobot Programming Laboratory at CMU [1], our focus isnot only on robot programming – we can also modify robotshardware (e.g. sensors). We also use much simplier robots andwork more with hardware interfacing. Another similar courseis offered at the CTU in Prague [2]. They use commercialLEGO Mindstorms kits so the hardware and its interfacing isalmost hidden to students. Other courses (e.g. [3], [4]) usesimulated robots. We have found this concept unsatisfyingfor our students since they work with simulations in majorityof courses. Similarly to [5], our course is oriented to robotprogramming with an opportunity to interact with hardwaredirectly, however without incorporating the vision system fornavigation. Our course is supposed for beginners and lessadvanced students – we deal with basics of the robotics andinstead of image processing we stay on the low level of robotcontrol and interfacing.

For purposes of laboratory exercises we developed the robotAcrob [6] – see Fig. 2.

II. ROBOT ACROB

This robot is based on a commercial robot Boe-Bot (Pa-rallax, Inc.) [7] with completely new electronics controllerboard. We had many good experiences with the original Boe-Bot robot, but its programming in PBASIC language was a

Fig. 2. Robot Acrob with added ultrasonic scanner.

Page 2: Robotics course with the Acrob robot · levels without any other converters on the board, so different converters can be used. We can use standard FTDI Chips USB cable or SparkFun’s

Fig. 3. An example of the course material available at [9].

pain for our students. They strived with the pitfalls of Basic– new language for them, instead of dealing with robotics.

New board is based on the Atmel Atmega328P RISCprocessor and its design was inspired by original Boe-Botrobot and Arduino [8]. The new board is as much as possiblecompatible with the original board – dimensions and connec-tors fits, so it can be replaced without problems. Moreover, wecan still use a lot of original extension boards and peripherals.The board is compatible also with the Arduino Diecimila board(electrical and logical connections), so we can use Arduinolibraries. Programming in C++ is very straightforward andusing libraries effectively hides implementation details of themicro-controller.

On-board voltage stabilizator provides 5V for the micro-controller and its peripherals. Main processor is Atmel At-mega328P with a pre-burned bootloader. It provides 32 kBof program memory, 2 kB of data RAM space and 1 kB ofEEPROM. The main area of the board is occupied with asolderless experimental breadboard where various additionalcomponents can be connected. On its left side most of I/Opins are available, on its top there is a power supply connector.The board also contains connectors for servomotors and twoadditional sensors with digital or analogue outputs.

Programming and communication capabilities were in-creased comparing to the original Boe-Bot robot. We decidedto have only the serial communication interface with TTLlevels without any other converters on the board, so different

converters can be used. We can use standard FTDI Chips USBcable or SparkFun’s FTDI Basic module for programmingusing the internal bootloader. We also developed a RS-232level converter module to enable operation also with a standardserial interface.

After the program is loaded, the interface is free forany user serial communication operations. This allows toconnect e.g. SparkFun’s BlueMate communication module tocommunicate with a computer or between robots using theBluetooth interface. On the board there is also a connector foran ISP programmer, so one can use any standard Atmel ISPprogrammer to burn the program into the processor. Togetherwith AVRStudio one can even debug, step and watch programswritten in assembler or avr-gcc languages. For programmingduring students laboratory exercises we used entirely Arduinoenvironment.

The new robot is called Acrob (Arduino Controlled ROBot)and its detailed description is available in [6]. In the next sec-tion we will describe the usage of this platform for educationin the Robotics course.

III. EXERCISES WITH ACROB

After a brief introduction of robotic platform and its devel-opment tools, we did basic experiments with a differentialdriven platform, its basic movements and sensory inputs.We performed analysis of robot properties measuring the

Page 3: Robotics course with the Acrob robot · levels without any other converters on the board, so different converters can be used. We can use standard FTDI Chips USB cable or SparkFun’s

Fig. 4. Students of the secondary school testing the linefollowing algorithmduring an international lecture in 2010 (project CENTROBOT).

servomotor characteristics. Results were used for basic ma-noeuvring (forward, backward, rotations). Students were askedto calculate required speed and time that will drive the robotexactly 10 cm forward or turned it 90 degrees. This part ofthe course was self-paced with help of the on-line tutorial andexample programs (see Fig. 3).

We also emphasised importance of understanding the prin-ciple of the sensor operation, knowledge of its properties touse the measured data properly. Also sensor modelling wasdiscussed regarding to the possibility to obtain reliable resultsfrom it. Sharp analogue distance sensors (GP2Y family) arevery appropriate for this, as their characteristics are non-linearand non-injective (e.g. output signal 2.5 V is measured for both3 and 8 cm distances – see Fig. 5). Conversion of ADC valuesto distance was a difficult problem and valuable experience forstudents.

As the sensor producer does not provide the exact equationfor conversion of the measured values, it is necessary toperform calibration measurements or to use the characteristicsof the sensor from the datasheet [10]. For the latter we founduseful the free program g3data [11] allowing to scan pointsfrom the image and recalculate its values based on the initialaxes calibration (see Fig. 5).

Next step was to add infrared light detectors and to measuretheir properties. Then we used them as line sensors and createdsimple line-following robots. We tried to challenge studentsto create their own line-following algorithms in the form ofthe state diagram, but their programming skills are weak andrequire much more practising. Finally, they were lucky whentheir project simply worked, and they did not deal with aprogram structure.

An example excerpt from the student’s four sensors line-following code follows:

Fig. 5. g3data screenshot during manipulating sensor characteristics.

char GetState(void){

char sensors[] = {1,3,0,2,-1};char i=0,state=0;

whi le( sensors[i] >= 0 ){

long val = analogRead( sensors[i] );i f ( val > THRESHOLD )

state |= (1<<i);i++; }

re turn state;}

void MakeMove( char state ){

sw i t ch( state ){/* 0001 */ case 1: Right(FAST); break;/* 0010 */ case 2: Right(SLOW); break;/* 0011 */ case 3: Right(MEDI); break;/* 0100 */ case 4: Left (SLOW); break;/* 0101 */ case 5: Right(SLOW); break;/* 0110 */ case 6: Fwd (FAST); break;/* 0111 */ case 7: Right(SLOW); break;/* 1000 */ case 8: Left (FAST); break;/* 1010 */ case 10: Left (SLOW); break;/* 1011 */ case 11: Right(SLOW); break;/* 1100 */ case 12: Left (MEDI); break;/* 1101 */ case 13: Left (SLOW); break;/* 1110 */ case 14: Left (SLOW); break;

/* fault */ d e f a u l t: Stop(); break;}

} /* Author: Juraj Koys */

Listing 1: An example Linefollowing code.

Page 4: Robotics course with the Acrob robot · levels without any other converters on the board, so different converters can be used. We can use standard FTDI Chips USB cable or SparkFun’s

A. Ultrasonic Distance Measurements

In the second part of labs we investigated deeply propertiesof ultrasonic sensors. The PING)))TMsensors [12] by theParallax, Inc., were used. An interesting idea of the sensorconnection is used – measurements are controlled using asingle I/O pin. Its direction is changed dynamically duringthe measurement.

Real metrological properties of the sensor are far beyondstudents’ image of ideal sensors. The main misunderstandingwhich we noticed during classes was that ultrasonic acousticwave is often improperly appearing in many diagrams as anarrow beam. In reality it is a diffusive acoustic cone (seeFig. 6).

Fig. 6. Different views on the ultrasonic distance sensor principle (a) froma producer’s datasheet, (b) in reality.

The students’ tasks included

1) measuring a response time of the reflected ultrasonicwave

2) conversion of the measured response time into the dis-tance in cm

3) exploring an effect of temperature changes4) measuring and comparing sensor characteristics with and

without the compensation5) measuring the critical angle (where the wave is not

reflected back to a transmitter)6) measuring a minimal size of detected obstacles7) measuring minimal and maximal detected distances8) measuring sensor angular characteristics.

We found that even the 3rd-year students still had problemswith proper data processing – they used unnecessary (andunreal) precision (6 and more decimal places) in tables, andtheir charts were non-descriptive (often totally useless) – seeFig. 7. This can be improved by quick and detailed feedback.Corrected reports should be returned as soon as possible toenable students to learn on their own mistakes.

Fig. 7. Students still have problems with data processing.

An interesting question arose during lessons – whether thereexist objects invisible to the sensor. One, classical, answerwas: of course, there are objects too small or too furry(hairy) to be detected. But some groups implemented theirfindings about a critical angle and proposed an object similarto stealth technology (well-known in aerospace industry) –objects with many broken surfaces which reflect almost allwaves away from the sensor. It was inspiring to see herethe implementation of knowledge and experiences from manydifferent areas.

When students were able to obtain a correct, callibrated andcompensated value of the distance, we added a simple rotatingservomechanism (see Fig. 2). Students’ task was to measuredistances in a range of angles in the front of the robot. Tomake this task more attractive, we slightly adapted the PeterDainty’s project Radar Screen [13]. It is a simple applicationreceiving data in the form XaaVbbb<CR><LF>, where aais actual angle and bbb is measured distance in cm. Data aresent over a serial line (using USB or even better, Bluetoothconverter). Then application displays measured and receiveddata in a form of radar screen (see Fig. 8). As there weresource files available, we added a serial port opening drop-box. Compiled Processing [14] application was then availablefor students to see the measured data in a pleasant way.

Fig. 8. Radar Screen window.

During measuring angular values from sensors, there wasalso a good opportunity to explain how to deal with circulardata. We asked students to calculate mean value of followingfour angles measured in degrees (e.g. robot found an obstaclein following directions in four consecutive measurements):

1) 85, 95, 110, 90 (circular mean = 95, mean = 95)2) 350, 360, 0, 10 (circular mean = 0, mean = 180)3) 350, 360, 10, 360 (circular mean = 0, mean = 270)

More about circular statistics can be found in [15], [16].The most difficult part of the work was an attempt to analyse

measured data and to create a map of the environment. First,we created a probabilistic model of the sensor according [17],[18] and displayed a 3D graph of a single measurement.

Then, again according [17], we combined more measure-ments using a recursive Bayesian theorem to create a map ofenvironment. This was done in Matlab or GNU/Octave using

Page 5: Robotics course with the Acrob robot · levels without any other converters on the board, so different converters can be used. We can use standard FTDI Chips USB cable or SparkFun’s

Fig. 9. QtOctave Screenshot.

a set of prepared scripts which were available for students.Some of them just changed simulated example data with theirown off-line measurements, but some of them attached therobot on-line and collected data in real time. Similar approachwas implemented in the Neptune Mobile Robot constructed atCMU by the team of Hans Moravec in the 80’s [19].

f u n c t i o n result = Mapping(Map,Sensor)f o r Row = 1:100

f o r Col = 1:100Map(Row,Col)=Sensor(Row,Col)*Map(Row,Col)/( Sensor(Row,Col) * Map(Row,Col) +(1-Sensor(Row,Col))*(1-Map(Row,Col)) );

endendresult = Map;

Listing 2: An example of used mapping.

It is important to interpret results propely as can be seen inFig. 9 – ultrasonic distance sensor is not the 3D scanner. It isjust a probabilistic map of an obstacle’s presence in the planeof the sensor. It means that pillars in the image are not pillarsin reality. They are just places with increased probability ofan obstacle presence. The green part of the image is not awall or something similar; it is completely unknown area (the

probability is 0.5 – the same as if one uses a coin to decidewhether there is or is not an obstacle).

In fact, the pillar in the middle of the plane can be a realpillar as well as a small box of height few cm in the frontof the sensor. Also the ”tower” is not a real tower. Fromthe measurement principle we cannot ”see” behind the frontreflective surface of objects, so we have no idea of theirshapes. Thickness of the tower is proportional to the sensoruncertainty. It is clear that we can really ”see” only the surfaceplane, not the thickness of the object. In fact, we can seesomething also from sides of the object and more or lessreconstruct a shape of the object. But in our (Fig. 9) case,its shape is determined by uncertainties more than by realknowledge.

This part of the course was attractive for students as theycould immediately see results of measurements and comparethem with reality. They were able to watch a process ofthe map creation, but later they stated that not everythingwas clear, and asked for more time for this topic. The topicwas also considered difficult to understand since it has morecomplicated mathematical background.

IV. COURSE EVALUATION

At the end of the course, we surveyed students to get theirevaluation of our conception. Generally, they had positive ex-perience. Almost all of them considered the course interesting

Page 6: Robotics course with the Acrob robot · levels without any other converters on the board, so different converters can be used. We can use standard FTDI Chips USB cable or SparkFun’s

and well taught. A typical response was that nothing shouldbe changed, as this was one of the best courses during theirstudies:”. . . interesting exercises, after all something practical anduseful. . . ”

It proves that our students welcome everything what moves,can be controlled and is somehow connected to real life.

Unfortunately, some students had problems with study mate-rials in English (datasheets, manuals, and some instructions):”I did not like exercises as I have problems with educationmaterials in English. Something was also translated intoSlovak language, but not everything. Therefore, I did notunderstand many things. I even missed some of the exercisesto develop.”

Although this view was unique, it may represent a groupof students which didn’t complete the questionnaire. Unfor-tunately, knowledge of a foreign language is a must and wecannot make compromises here. It is necessary to improvetheir language skills during first years at the university.

We were also interested whether students worked indepen-dently in their groups. Plagiarism is a big issue in under-graduate classes. We were pleased that most of our studentsdeclared that all tasks were solved independently. Many ofthem highlighted benefits of working in pairs, or appreciatedthat we offered them partially prepared code, which they justneeded to modify to fulfil requirements. Only one respondentwrote that he was completely unable to make assignments.

V. CONCLUSION

Despite students’ optimism, our observations are a bit dif-ferent: even students in the third year of bachelor studies haveproblems with basics of the C programming language. Duringthe semester, we help them too often to solve ”problems” withmissing semicolons or brackets. And when finally programsworked, their programming culture was very low. Variablesdid not have semantic names, comments were not used, andstudents were not able to use appropriately even limitedamount of structures in the C language .

Although the questionnaire was anonymous, we offered thepossibility to sign it: 42% did it. We consider it as a sign thatthere exists an atmosphere of mutual trust.

Also the robot Acrob was well accepted. From teacher’spoint of view, we were satisfied with robot’s reliability andease of its operation. All planned experiments were easilyimplemented.

Positive acceptance of the course is obvious if one knowsthat first years at university are usually more theoretical(courses like Mathematics, Physics etc.).

Our experiences are overall positive and we would like toencourage others to introduce this type of education into theircurricula.

ACKNOWLEDGMENT

Publication of this paper was supported through the Sci-entific Grant Agency of the Ministry of Education, science,research and sport of Slovak Republic with the grant VEGA1/0690/09.

REFERENCES

[1] Lalonde, Jean-franois and Bartley, Christopher P. and Nourbakhsh,Illah: Mobile robot programming in education. In IEEE InternationalConference on Robotics and Automation, 2006.

[2] Hlinovsky, Martin and Polcar, Tom: Subject Robots at the CTU FEEin Prague – using LEGO robots to teach the fundamentals of feedbackcontrol. In Proceedings of the 1st international conference on Roboticsin Education, RiE2010. Bratislava : September 2010., pp. 119-122 FEISTU, Slovakia. Available on-line: http://rie2010.stuba.sk/proceedings.html

[3] Raz, Tzvi: Graphics robot simulator for teaching introductory robotics,IEEE Transactions on Education, vol.32, no.2, pp.153-159, May 1989doi: 10.1109/13.28048

[4] Fernndez, J. and Casals, A.: Open Laboratory for Robotics Education.In Proceedings of ICRA. 2004, 1837-1842.

[5] Soto, Alvaro and Espinace, Pablo and Mitnik, Ruben: A Mobile RoboticsCourse for Undergraduate Students in Computer Science. In IEEE LatinAmerican Robotics Symposium, Chile 2006.

[6] Balogh, Richard: Educational Robotic Platform based on Arduino, InProceedings of the 1st international conference on Robotics in Education,RiE2010. Bratislava : September 2010., pp. 119-122. FEI STU, Slovakia.Available on-line: http://rie2010.stuba.sk/proceedings.html

[7] The Boe-Bot Robot education kit. Parallax Inc., Rocklin. Available on-line: http://www.parallax.com/go/BoeBot

[8] Arduino. Available on-line: http://www.arduino.cc/[9] Acrob – an educational robotic platform compatible with the Arduino.

Available on-line: http://www.robotics.sk/acrob[10] GP2Y0A21YK – General Purpose Type Distance Measuring Sensors.

Datasheet, Sharp Corporation. Available on-line: http://sharp-world.com/products/device/lineup/data/pdf/datasheet/gp2y0a d e.pdf

[11] Jonas Frantz: g3data.exe ver. 1.5.1. Available on-line: http://www.frantz.fi/software/g3data.php

[12] PING)))TMUltrasonic Distance Sensor (#28015). Parallax, Inc., Rock-lin, 2006. Available on-line: http://www.parallax.com/dl/docs/prod/acc/28015-PING-v1.3.pdf

[13] Dainty, Peter: Arduino + Processing: Make a Radar Screen’s VisualiseSensor Data from SRF-05. Available online: http://luckylarry.co.uk/arduino-projects/

[14] Processing - an open source programming language. Available online:http://www.processing.org/

[15] Berens, Philipp: CircStat: A MATLAB Toolbox for Circular Statistics.Journal of Statistical Software, September 2009, Volume 31, Issue 10.Available on-line: http://www.jstatsoft.org/v31/i10/paper

[16] Kulcar, Ladislav: Problematika urcenia aritmetickeho priemeru prikruhovom rozdelenı. [in Slovak] In Proceedings of the IMEM Inter-national congres. September 2009, pp. 104-112. PF KU Ruzomberok,Slovakia.

[17] Murphy, Robin R.: Introduction to AI Robotics, MIT Press, 2000.[18] Elfes, Alberto: Using Occupancy Grids for Mobile Robot Perception

and Navigation. IEEE Computer, 1989, 22, 46-57.[19] Moravec, Hans: Neptune Mobile Robot Project Archive. http://www.ri.

cmu.edu/research project detail.html?project id=48&menu id=261