Professional Documents
Culture Documents
1 Introduction
Additionally, we have TPL that work with Lego Mindstorms as ev3dev and
lejOS. EV3DEV is a Debian that works from an external memory to the brick, it
has support for several programming languages, but it is mainly used to develop
in Python. LejOS, is a modified firmware based on java, table 1 summarizes the
characteristics of the programming languages supported by EV3.
For students that begin programming a VPL is better option, the block labels
are easy to read as they are represented by a natural language hiding abstract
concepts [22, 19]. On the other hand, the blocks have a representative shape
and color, you can recognize a procedure by the color of the block and its shape
without having to memorize the syntax of a language. Then, a VPL reduces the
cognitive load of the programmers [24, 25, 22]. Additionally, if an error in the
program flow arises it is easier to remove a block than to identify exactly the line
of code that contains the error, making the flow of a program easy to compose.
3 ROS Robotic
2
Open Source Robotics Fundation - https://www.osrfoundation.org/
4
3.1 EV3
EV3 has a set of ROS packages that work together 3 , they control the ev3
components. The operating system that supports the brick is based on Yocto
Linux and the ev3dev kernel and includes all ROS meta-ros packages. Requires
a configuration of multiple computers in network ROS (can not be supported
directly in the brick by his limited RAM).
In the brick the ev3_manager node is executed, it launch the ros function-
alities in the ev3. The node ev3_manager publishes the topics to control the
motors and sensors, the scripts are run on ros server or rosmaster (PC) in this
way the robot is a client.
The list of packages that make up this system are:
Today, we should think about the future of robots and science that studies it, and
mainly in an interface that educates the user to control the machines. ROS as an
advanced tool is used to carry out illustrative and attractive studies on robotics
for young specialists. ROS allows the development of high quality courses in
robotics45 6 . Remote laboratories use ROS for being a flexible framework for
writing software for robots. ROS includes a large number of libraries, tools, and
conventions that simplify the task of creating complex and robust behaviors.
With the existence of educational kits, teaching robotics has become popular,
especially simple in introductory courses in programming and robotics [16], [14],
[12], [9], [10], [8]. Robotics provides a level of programming for all students to
visualize and demonstrate ideas and concepts. In a robotics course with ROS
the idea is to obtain functional scripts that are executed by the rosmaster and
its behavior is visualized in a simulator or in a real robot.
In its first version, this project works only with a mobile robot with wheels (Fig.
1) and with the four sensors of the kit (touch, ultrasonic, color, gyroscope). Only
one type of sensor can be connected to every input port (in1, in2, in3, in4). The
robot must have 2 large motors connected to the output ports B and C.
4.2 Primitives
Sensors Each sensor is associated with a block, each block calls one python
function that maintains the structure of a python script to subscribe to a topic
and get information from a sensor (Listing 1.2).
Listing 1.2. Python script subscriber in a topic
import rospy
from std_msgs.msg import String #message to read
rospy.init_node(’topic_subscriber’)
sub = rospy.Subscriber(’topic’, String, callback)
4.3 Errors
Error handling is an important topic when designing APIs. However, we wanted
users to be able to focus on their programs, and assume that the primitives work
as described. The only primitive with which we had error was for Girar Robot
block, since it does not move the robot when the time is less than one second.
or function calls are represented as blocks shaped like puzzle pieces. These blocks
can be connected by stacking them, attaching values to inputs, or nesting blocks
inside of other blocks. Blockly allows custom blocks to be made by defining a
blocks appearance, inputs, and outputs. We designed custom blocks for each
primitive, with inputs and outputs as shown in table 2 and Fig 2. We also
provided standard programming language constructs such as loops, conditionals,
variables, functions, strings, lists, math utilities, and logical operators. A full list
of all the standard blocks can be seen on Blocklys website 8 .
The graphical interface has two tabs. The first tab, all blocks programming di-
vided into eight categories: Logic, Loops, Math, Variables, Code, Control, Motors
and Sensors. Logic blocks are about boolean operators and conditional blocks,
Loops category are while and repeat blocks, Math involves math operations and
numbers, with Variable category we can create a new math, string or bool vari-
able, Code is only one block where we can compile code python, Control has
two blocks wait and init blocks, Motors are two blocks one to go forward or
backward, last category is Sensors, it has all sensors block we can work with
EV3. In the second second tab we can see the script auto-generated in a TPL.
We use mainly Python like TPL to program the behavior of the robot. We can
see the program in textual language and the visual language to introduce users
in other language, we focus here on Python as we can see in Fig 3.
We have five buttons the user can use to control the program and create a
new program or save it: Nuevo, Ejecutar, Abrir, Guardar, Control Manual.
The Control Manual button is for teleoperate the EV3 with directional keys.
8
Blockly
8
(a)
(b)
Fig. 3. Programs developed in the system. (a) Program with blocks makes the robot
go forward ten times if distance is less 15 centimeters, (b) Python script auto-generated
correspond to blocks program.
9
5 User Study
5.1 Procedure
We carry out a small robotics course (Fig. 4) with high school students. The
participants were first introduced to the robot with a simple and clear descrip-
tion about EV3, introduced in Linux and open source software too. Then, they
completed a 30-minute on how to build a robot. Then, the students use the
application and made a simple program to control motors and sensor. The par-
ticipants then created five programs with our system, one program at a time.
These programs, shown in table 3, were based on the real-world use cases dis-
cussed in next section.
# Program
1 Robot goes a path using flow control sentences.
2 Robot use touch sensor to know if should go forward or stop.
3 Robot use ultrasonic sensor to know there is someone or something in front of him.
4 Robot use color sensor to identify a black line.
5 Robot use gyro sensor to follow path of square.
Table 3. The prompts describing each of the five programs to make in the user study.
We evaluate the experience to introduce in linux basic and learn about open-
source software. Also talk about the system if was easy to use and whether there
is something have to better. We work with eigth students (girls).
Linux and open-source software From eight students, only two students knew
the Linux Operating System, and they had a vague idea of what open source
software meant. The other students met a new operating system for the first
time.
Lego Mindstorms EV3 All the students liked the EV3 kit, they achieved to build
simple designs with ease. Only one student knew the ev3 kit because she pre-
viously attended a robotics course. The other students had heard about LEGO
but did not know the EV3 version.
10
(a) (b)
(c) (d)
Fig. 4. Robotics course with teenager students. (a) and (b) the girls building their
robot, (c) Teacher explain how works the system and (d)Test of the robot
Motors All the students achieved to make several simple programs to move the
motors of the robot. There was no complexity to understand the input parame-
ters of each block.
Sensors In order to work with the ev3 sensors, we had to talk about variables
and data types. The students identified mainly 2 types of data (boolean and
numerical). They knew and related the functioning of each sensor with the senses
of the body.
Control Flow The students did not have programming knowledge, only one
student. Of the main flow control sentences, the most commonly used sentence
was repetir.
The system does not allow to visualize the information of the robot, this
is initially seen from the terminal that executes the ROS nodes. The students
pointed out that this was one of the characteristics that have be improved in the
system. Additionally, another improvement that they suggest is the ability to add
another sensor, such as a camera, to perform an exploration of an environment.
Also, the students point out the interface is simple and its main function is
understood, which allows creating programs to control a lego robot. Students did
not recognize the type of string data because the system does not have feedback
from the sensors’ information, so they did not use that data type.
11
One of the most common errors reported by the students was the response
time of the robot, when the robot had to turn for a time less than a second, in
most cases, the robot did not move, and the program ended.
Acknowledgment
This work was supported by Universidad Nacional de San Agustin, UNSA In-
vestiga, Peru, under the agreement 12-2016-UNSA.
References
[1] Vic Grout and Nigel Houlden. Taking Computer Science and Programming into
Schools: The Glyndr/BCS Turing Project. Procedia - Social and Behavioral Sci-
ences. 141, 680-685 (2014).
[2] Jrgen Lindh and Thomas Holgersson. Does lego training stimulate pupils ability to
solve logical problems? Computers and Education. 49, 1097-1111 (2007).
[3] Fabiane Barreto Vavassori Benitti. Exploring the educational potential of robotics
in schools: A systematic review. Computers and Education. 58, 978-988 (2012).
[4] Sánchez, Rafael Esteban Arango and Builes, Jovani Alberto Jiménez. LEGO
Mindstorms NXT: Juego como Herramienta de Aprendizaje de Programación.
Lámpsakos, 72-78 (2014).
[5] E. Irigoyen and E. Larzabal and R. Priego. Low-cost platforms used in Control
Education: An educational case study. IFAC Proceedings Volumes. 46, 256-261
(2013).
[6] Peter J. Bradley and Juan A. de la Puente and Juan Zamorano and Daniel Brosnan.
A Platform for Real-Time Control Education with LEGO MINDSTORMS. IFAC
Proceedings Volumes. 45, 112-117 (2012).
[7] Magnenat, Stéphane and Shin, Jiwon and Riedo, Fanny and Siegwart, Roland and
Ben-Ari, Morderchai. Teaching a Core CS Concept Through Robotics. Proceedings
of the 2014 Conference on Innovation & Technology in Computer Science
Education. 315-320 (2014).
[8] V. B. Barreto and A. L’Erario and J. A. Fabri. Teaching programming for high
school students using the Lego Mindstorms robot. 2015 10th Iberian Conference
on Information Systems and Technologies (CISTI). 1-7 (2015).
12
[9] Mataric, M. J. Robotics education for all ages. In Proc. AAAI Spring Symposium
on Accessible, Hands-on AI and Robotics Education. (2004).
[10] Ministerio de Educacin Perú. Generando Experiencias Lúdicas. [PeruEduca] http:
//www.perueduca.pe/robotica/. (2016).
[11] Romero, Juan Suarez. Library Programming with LEGO MINDSTORMS,
Scratch, and PicoCricket: Analysis of Best Practices for Public Libraries. Com-
puters in Libraries. (2010).
[12] Uvais Qidwai and Ryan Riley and Sayed El-Sayed. Attracting Students to the
Computing Disciplines: A Case Study of a Robotics Contest. Procedia - Social and
Behavioral Sciences. 520 - 531 (2013).
[13] Morgan Quigley and Ken Conley and Brian P. Gerkey and Josh Faust and Tully
Foote and Jeremy Leibs and Rob Wheeler and Andrew Y. Ng. ROS: an open-source
Robot Operating System. ICRA Workshop on Open Source Software. (2009).
[14] Khassanov Alisher and Krupenkin Alexander and Borgul Alexandr. Control of the
Mobile Robots with ROS in Robotics Courses. Procedia Engineering. 100, 1475-
1484 (2015).
[15] Magyar, G., Sink, P., & Krizsn, Z. Comparison study of robotic middleware for
robotic applications. In Emergent Trends in Robotics and Intelligent Systems.
Springer. 121-128 (2015).
[16] Michieletto, S., Ghidoni, S., Pagello, E., Moro, M., & Menegatti, E. Why teach
robotics using ROS?. Journal of Automation Mobile Robotics and Intelligent Sys-
tems, 8(1), 60-68 (2014).
[17] S. Cousins. Is ROS Good for Robotics? [ROS Topics]. IEEE Robotics Automation
Magazine. 13-14 (2012).
[18] Brian Gerkey. ROS user survey: the results are in http://www.ros.org/news/
2014/04/ros-user-survey-the-results-are-in.html (2016)
[19] Martin Erwig and Karl Smeltzer and Xiangyu Wang. What is a visual language?.
Journal of Visual Languages & Computing. 38, 9-17 (2017).
[20] Weintrop, David and Wilensky, Uri. To Block or Not to Block, That is the Ques-
tion: Students’ Perceptions of Blocks-based Programming. Proceedings of the 14th
International Conference on Interaction Design and Children. 199-208 (2015).
[21] Resnick, Mitchel and Maloney, John and Monroy-Hernández, Andrés and Rusk,
Natalie and Eastmond, Evelyn and Brennan, Karen and Millner, Amon and Rosen-
baum, Eric and Silver, Jay and Silverman, Brian and Kafai, Yasmin. Scratch: Pro-
gramming for All. Commun. ACM. 52, 60,67 (2009).
[22] Matsumura, Kazuo and Tayama, Shuichi. Visual Man-Machine Interface for Pro-
gram Design and Production. Springer US. (1990).
[23] Open Roberta Open Roberta Wiki http://lab.open-roberta.org/ (2016)
[24] Luxton-Reilly, Andrew. Learning to Program is Easy. Proceedings of the 2016
ACM Conference on Innovation and Technology in Computer Science Education.
284-289 (2016).
[25] Duncan, Caitlin and Bell, Tim and Tanimoto, Steve. Should Your 8-year-old Learn
Coding?. Proceedings of the 9th Workshop in Primary and Secondary Computing
Education. (2014)