DIDACTIC EXPERIENCES INVOLVING MOBILE ROBOTICS HAVING MICROFACTORY AS CONTEXT

In this paper an analysis of MicroFactory is carried out and its potential for generating a diversified set of didactic experiences is evaluated. MicroFactory is a robotic competition based on a previously existing competition called Robot@Factory. Robot@Factory is a Portuguese robotic competition whose first edition was held in 2011 in Lisbon. The scenario of the competition simulates a factory which has two warehouses, and eight processing machines. The flow of the materials inside the factory starts at the Incoming Warehouse and ends at the Outgoing Warehouse, eventually passing through one or more processing machines. The robots must collect, transport and position the materials along the process, having to self-localize and navigate while avoiding collisions with walls, obstacles and other robots. There is the option of following predefined tracks present on the floor to ease the navigation problem. Robot@Factory poses challenges like dynamic task scheduling, robot cooperation, trajectory planning, robot navigation with obstacle avoidance, robot self-localization and materials identification and manipulation. Related research contributes to improve AGVs (Automated Guided Vehicle systems) technology. Presently this competition is integrated in Festival Nacional de Robótica, a yearly event which attracts lots of public, contributing also to STEM (Science, Technology, Engineering and Mathematics) popularization. MicroFactory was conceived to be low-cost and easily implementable in a small space, be it a classroom or the school robotics club. The ground area of the factory scenario was reduced to approximately one ninth of its original value. The scenario materials were simplified – the floor is now an A0 printed sheet and the warehouses and machines dimensions are so that they can be 3D printed or made out of LEGO bricks; both machines and parts had active elements with LEDs and now they are passive. Besides the competition scenario it was also conceived a prototype robot for the competition. It’s a 3D printed robot, based on an Arduino board and accessible electronic parts. The creation of this competition is part of a wider Open Source project, aiming to develop projectbased collaborative didactic experiences involving robotics and low-cost 3D printed educational robots based on generic electronics to support those experiences. Currently efforts are being dedicated to the inclusion of more sensors in the competition robot, namely low-cost distance sensors and a weight sensor at the claws, the inclusion of different kinds of motors, the development of a new version of the robot incorporating a Raspberry Pi board, the development of a very precise robot localization system, and the conception of a diversified set of didactic experiences based on the MicroFactory competition. This article presents an analysis of MicroFactory and of its inherent challenges. Through this analysis it will be possible to identify topics that can be taught and learned while developing robots to participate in the competition, and to collect elements that will be very useful in the planning and implementation of didactic experiences that work those topics.


INTRODUCTION
According to Dessimoz, Gaulthey, Leuba and Didier [1] paradigmatic changes in education occur when there is a kind of societal crisis in which education does not manage to satisfy society needs. Their article states that in most modern, advanced societies, an adaptation problem has been identified in education -the advanced societies development requires that a substantial part of its population, and in particular of its workforces be somehow knowledgeable in scientific and technical areas, and traditional approaches to education are not contributing adequately to this ideal balance.
On the other hand researchers in education have found that pupil's attitude towards technology is a crucial element for their long term success [2], so it is important that young pupils get familiarized with technology in early school years. According to Lin, Liu and Huang recent trends in education have been the integration of different technologies like digital games and educational robots, as well as the teaching and learning about design and implementation of educational robots [3].
As mentioned in [4] introducing robotics activities in engineering courses curricula makes all the sense. Robotics activities in the first years of college can be very effective both to motivate and create curiosity for future learning and also to help students to perceive the relationships between undergraduate courses. Robotics activities in more advanced college years are a very good solution for knowledge consolidation and integration of what has been learned in fields like computer networks, operating systems, real-time systems, distributed systems, object-oriented programming, computer vision, and even other more theoretical courses like calculus (differential calculus, Laplace transform and more), control systems, linear algebra (homogeneous transform matrices, matrices algebra) and general mathematics (trigonometry, vectorial calculus).
Robotic didactic experiences can give good results also in areas of knowledge other than technical areas -for instance [5] describes an educational robotics course lectured at a liberal art college. In fact, conceiving robots is a very good activity to lead students to enter into a contextualized creative process [1] and to apply every steps of the design process. Design requires identifying and analyzing a problem and finding innovative and adequate solutions to solve it.
"While any abstract object decreases the emotional effect on the individual, the robot is perceived as an abstract object as if it were a living being" [6]. This particularity makes robot activities particularly adequate for small kids [7]. Whenever that happens it is recommendable to also involve the children's families -see [3] and [7]. Didactic experiences with secondary students can be found in [1] and [8].
Traditionally, the main difficulties of robotic experiences have been the monetary setup costs associated -see [1] and [9], and, when the experiences are not conducted by robotics specialists, the lack of specific knowledge of the teachers. A didactic experience involving the cooperation of college teachers (experts in robotics) and secondary education teachers can be found in [6] and didactic experiences involving robotics, whose targets are preservice teachers or teachers, and which have the objective of facilitating their entry in the field of didactic experiences with robots, can be found in [1] and [10].
The authors of this article are Electrical Engineers who teach at Engineering Higher Education institutions. We are presently involved in an Open Source project whose main contributions to the solution of the identified education adaptation problem will be a set of project-based collaborative didactic experiences involving robotics, as well as the technological platform to support those experiences. The educational robots that are being developed are low cost, 3D printed and are based on low-cost generic electronics. Software is being developed for the educational robots, as well as supporting documentation, in order to simplify their use by other teachers and by the students. The work presented in [4] and in this article is part of the larger Open Source project.
Article [4] presented the work related to the creation of the MicroFactory robotic competition. This article presents an analysis of MicroFactory and of its inherent challenges. The result of this analysis is a list of didactic experiences that can be implemented based on this competition which includes the topics that can be taught and learned in them, as well as some details of their setup.
MicroFactory, its origins and its purposes will be presented in Section 2; then the referred analysis will be presented in Section 3, followed by conclusions and perspectives of future work.

MICROFACTORY, ITS ORIGINS AND ITS PURPOSE
Traditionally the transportation of materials inside a factory is carried out by fixed position conveyor belts or by human-driven small vehicles. Transportation based on fixed position conveyor belts has the disadvantage of being very inflexible -production lines must be stopped during considerable times whenever a reconfiguration is made. Transportation of materials by human-driven small vehicles is subject to operator errors, accidents and failures. AGV (Automated Guided Vehicle) systems allow avoiding the referred disadvantages, so they are a technology that is worth to be studied and developed.
Robot@Factory is a robotic competition that recreates the challenges an AGV has to overcome during its operation in a factory. A scenario of around 3.5m long by 2.5m wide simulates a factory with an Incoming Warehouse, an Outgoing Warehouse and 8 processing machines. Materials/parts to be transported are represented by prismatic boxes with LEDs whose color is related to the processing that they have to pass through; boxes' width and length correspond to the dimensions of a europallet scaled by 1/10. The robots must carry the materials/parts from the Incoming Warehouse to the Outgoing Warehouse; eventually some of the materials / parts in the Incoming Warehouse are not completely finalized, and need to be processed by one or more machines before they are ready to be transported to the Outgoing Warehouse.
There can be different classes of robots that compete separately -for example one class for the robots who use only the walls, the lines on the floors and other markers to locate themselves, and other class for the robots who have a more sophisticated localization system. There are three rounds of increasing complexity: • In the first round all five parts are transported directly from the Incoming Warehouse to the Outgoing Warehouse; these parts have a blue LED indicating that they don't need to be processed in any machine.
• In the second round, some of the five parts present in the Incoming Warehouse (with a blue LED) can be taken directly to the Outgoing Warehouse; the other parts present in the Incoming Warehouse (with a green LED) must be processed by a machine prior they can be transported to the Outgoing Warehouse.
• In the third round, there are two types of machines (type A and type B) and three types of materials/parts in the Incoming Warehouse -the ones which can be carried directly to the Outgoing Warehouse without further processing (signaled with a blue LED), the ones which must be processed by a machine of type B prior to being taken to the Outgoing Warehouse (signaled with a green LED) and the ones which must be processed by a machine of type A and then by a machine of type B, prior to being transported to the Outgoing Warehouse (signaled with a red LED). In this round the team can have more than one robot operating simultaneously and there can be obstacles in the field.
The processing time for each part/machine (or its statistical distribution) is made available to the teams before the competition begins. When the processing of a material/part is concluded, there is a change in color of the corresponding LED. The types of the parts/materials which are in each position of the Incoming Warehouse at the start of rounds 2 and 3 are unknown -the robot must go there and identify the LEDs colors.
In every round each team has 10 minutes for the trial. During the time trial the team can make as many runs as she wants. If at any time the team considers that the robot is in a situation from which it won't recover, she can ask to stop the run and have access to the robot. After finishing the intervention in the robot, during which the time keeps counting, the team can ask the referee to start a new run. This request is accepted but there is a minimum time interval between the starts of two consecutive runs that must be respected.
Only the best run in each round is considered for team classification. By best run of a round is meant the one with less time spent from the runs with the biggest number of parts carried to the Outgoing Warehouse (minimum of 1 piece). For each team, numbers of parts carried in each best run of every round are summed, and times of best runs of every round are summed. A table is then produced. Teams are ordered, firstly by decreasing order of total number of parts carried, and secondly by increasing order of total time spent. Conclusion: best classified teams figure at the top of the produced table.
Robot@Factory has been running yearly since 2011 and is now part of Festival Nacional de Robótica (Portuguese expression for National Robotics Festival). Thanks to this competition research teams who study AGV systems have the opportunity to gather with their pairs to know each other, to benchmark their systems' performances and to exchange ideas that contribute to their work. Besides being a stimulus to study an important research problem, Robot@Factory is also a spectacle that is worth to be part of a National Robotics Festival. This Festival attracts lots of public and contributes greatly to STEM (Science, Technology, Engineering and Mathematics) popularization. Fig. 1 shows a picture taken in the 2016 edition of this competition.

Figure 1 -Robot@Factory Competitor Robot in Action
Implementing an efficient industrial transportation system based on autonomous robots is quite an interesting challenge. With Robot@Factory it was already achieved to involve industrial partners and the academic community in a competition related to this challenge; MicroFactory -see Fig. 2, was born from the desire of creating a similar competition in which regular secondary students and undergraduate students could participate, that could be held many times in a year if desired, anywhere in the world, in small spaces like classrooms or school robotic clubs. To make MicroFactory accessible to less skilled people the main simplifications were: • Every run the team can choose where, in the scenario, the robot starts its operation; • The exigence of a minimum time between the starts of two consecutive runs was suppressed; • In rounds 2 and 3 the types of materials/parts that are inside each Incoming Warehouse are known from the start; • The component "robot cooperation" was suppressed from round 3 -there is always one only robot; • The component "obstacle avoidance" was suppressed from round 3 -no obstacles are added to the field.
To create MicroFactory, Robot@Factory scenario area was reduced to about ninth of its original value; an official Robot@Factory 3D printed robot was created; both the scenario and the official robot are made of low-cost and easy-to-find materials like paper for the factory ground, LEGO TM bricks for the machines and warehouses, and plastic for the robots chassis; factory scenario' active elements with LEDs gave place to passive elements; the competition was conceived as an Open Source project, in order to simplify sharing of information and reproducibility.
The work related to the creation of MicroFactory is part of a wider Open Source project whose main purposes are developing project-based didactic experiences involving robotics and low-cost 3D printed educational robots based on generic electronics to support those experiences. The next section presents some more details of the work developed to create this competition. Latest developments of this work are also presented, as well as an analysis of MicroFactory and of its inherent challenges, allowing understanding its potential to originate didactic experiences involving robotics.

DIDACTIC EXPERIENCES BASED ON MICROFACTORY
Robot@Factory and MicroFactory recreate the challenges an AGV has to face during its operation inside a factory. Robots must identify, collect, transport and position the materials/parts; for that they must be able to self-localize and navigate in the factory scenario while avoiding collisions with walls, obstacles and other robots.
These competitions can pose challenges like dynamic task scheduling, robot cooperation, trajectory planning, robot navigation with obstacle avoidance, robot self-localization and materials identification and manipulation. When thinking about building from scratch a robot to participate in such a competition it is necessary to think about how each one of these challenges will be overcome.
As indicated in Fig. 3 typically an autonomous mobile robot has: Hardware -sensors, that allow it to sense the surrounding environment, actuators than allow the robot to actuate over the environment, namely moving, and one or more processing units; Mechanics -the mechanical structure that holds all the hardware together and positions each hardware element where it must be in the robot, plus all the other mechanical parts that support the hardware in its functionality -the robot chassis, the wheels, the claws, … Software -the programming code that requires processing units to read data from sensors, to perform all the necessary calculations and to command the actuators. While in Robot@Factory the competitors must build a robot from scratch to participate in the competition, it was developed an official robot for MicroFactory. The mechanical chassis is 3D printed; the hardware comprehends an Arduino board and cheap common electronic parts -basically servomotors for the wheels and handling parts claws, infrared sensors to allow following lines and quadrature encoders to make it possible to apply localization algorithms based on odometry.
At the present moment efforts are being dedicated to: • the improvement of the robot software; • the development of an external very precise localization system; • the integration of more sensors in the robot, like low-cost distance sensors and a weight sensor at the claws, and the integration of different kinds of motors -some experiments are being made with DC motors at the wheels; • the integration of a Raspberry Pi board in the robot -this will allow to expand the processing capabilities and the integration of sensors of a different kind, namely a camera; • the development of a diversified set of didactic experiences, namely didactic experiences strongly related to the MicroFactory and Robot@Factory robotic competitions.
When participating in a robotic competition much of the teams' effort is dedicated to programming the robot so that it can overcome the imposed challenges. Fig. 4 illustrates how software modules can be organized in the case of a robot developed to participate in a robotic competition similar to Robot@Factory or MicroFactory. Basically the modules at the base of the diagram are in charge of reading data from sensors and of transmitting outputs to the actuators; the robot must localize itself in the scenario and detect obstacles, so that it can navigate while avoiding collisions with walls, robots and obstacles; it must also comply with a schedule of materials/parts manipulation and cooperate with other robots if existing.  It is the authors' understanding that the participations in robotic competitions can be very proficuous didactic experiences. That's perhaps the main reason why MicroFactory was developed as an Open Source project. Following that philosophy, CAD files for the competition official robot mechanics and every bit of the factory scenario, the hardware schematics and part of the software, can be made available to teachers or to anyone interested in organizing a competition.

Control
Previous section described the simplifications made to the original competition to create MicroFactory, as well as some details of the MicroFactory official robot, but competition organizers are free to make the changes they desire -that's just a base configuration; teachers and competition organizers are also free not to share with participants everything that we make available to them, or to add/replace software libraries.
The beauty of this competition, especially if organized for small groups, is that it can be tailored to the participants profile and to the organizers goals. The development of the new external high precision localization system and the integration of a new processing unit and more sensors, are intended to provide even more flexibility. After completion of this work it will be possible to make adjustments to create versions of this competition with a wide range of difficulty levels. For instance: • By adding the external localization system that allows knowing transparently the robot's position and orientation at any time with big precision and adding a visual programming interface that allows sending the robot to a defined position and orientation and lift or lower the claws, it will be possible to create a version of the competition adequate to small kids. In this version of the competition there is only one robot and the types of materials/parts which are in every Incoming Warehouse are known in advance. All that the competitors must do is programming a sequence of steps to transport the materials/parts present in every Incoming Warehouse, to the Outgoing Warehouses, eventually having to put some materials/parts into machines for processing and to fetch them back after constant time intervals, before transporting them to their final location.
• By adding low-cost distance sensors and forcing the use of localization systems implemented by the teams (no line following is allowed) it is possible to increase the difficulty of the competition. It is possible to make it become even more difficult by introducing variable processing times by the machines; by forcing the use of a camera (and inevitably of a more powerful processing unit) for materials/parts identification using image processing; by introducing obstacles in the scenario; by not revealing in advance the types of materials/parts that are inside each Incoming Warehouse; by introducing the possibility of using two or more robots to perform the task simultaneously, etc. This version of the competition treats the problem of transporting materials/parts inside a factory in a very realistic manner and is adequate to teams of very high skilled competitors.
The project is being run in such a way that its developments can be very useful for teachers wanting to implement didactic experiences involving robotics. Our goal is that, at the end of the project, a teacher who wants to implement didactic experiences with robotics can easily print copies of the scenario (the ground of the factory is a printed sheet of paper and the other parts of the scenario can be 3D printed) and copies of the robot chassis and other plastic mechanical parts (that can also be 3D printedseveral kinds of robots will be available), buy the necessary hardware components, assemble the robots according to the available schematics and upload to them available software (at least a fully functional version of the robot will be available, as well as libraries that make it easier to use the hardware).
Robotics is a multidisciplinary subject. Some of the topics that can be taught and learned using robotics include mathematics, physics, operational research, control systems, mechanics, electronics, operating systems, computer programming, computer networks, computer vision, etc. This project makes it relatively easy and low-cost to dispose of a scenario, robots and some software modules, to setup didactic experiences in a small room.
Perhaps the most complete didactic experience that can be implemented is involving the students in the work of a step-by-step improvement of a pre-existing robot configuration, in order to produce a robot to participate in MicroFactory or in an adapted version of this competition. This improvement work can involve the mechanics, the hardware and the software, or can focus only on a subset of these aspects.
Such an ambitious task could be, for instance, the subject of a final degree work or of a Master Thesis. It is possible, by choosing the right subset of tasks of implementing a small AGV and by choosing the right level of problem realism, to design a whole postgraduate course on mobile robotics around those tasks. Another possible implementation of the project could occur running in parallel in two undergraduate courses -a programming course and an integrative laboratorial course, being or not the only subject of those courses.
According to our vision, shorter duration projects are the ones which will interest worldwide educators the most, consequently our efforts are being directed mainly to conceiving hands-on didactic experiences that teachers can implement in a small number of classes to give students the opportunity to apply in practice some of the theoretical concepts learned in their courses. Some examples of implementable didactic experiences are: • Programming robots to recognize the scenario and make a map. One possible way of implementing this experience is by using a robot configuration that uses low-cost distance sensors and an external high precision localization system. This didactic experience requires the use of a processing unit with more capabilities than an Arduino board -a Raspberry Pi for instance; • Implementing a module to identify the materials/parts types. As in Robot@Factory, in MicroFactory there are three types of parts/materials (see the Robot@Factory description at the begin of section 2); the difference is that in Robot@Factory there is a colored LED that indicates the type of materials/parts and in MicroFactory the type of /materials/parts is indicated by the number of marbles on the corresponding prismatic box -the implemented rule is that the number of marbles on the prismatic box plus the number of machines that still have to process the materials/parts before they can be taken to the Outgoing Warehouses is always equal to 2.
One possible way to achieve this goal is by using a configuration that includes a weight sensor at the claws -more marbles on the box correspond to more weight; other possible way is by using a camera -despite being a little more difficult way of achieving the same goal, this last approach is interesting because it provides a way of introducing students to image processing; • Programming the robot so that it can locate itself in space. The localization system implemented by the students can then be used alone, or used in parallel with the external high precision localization system that will be available. The use of distance sensors provides an opportunity for a revision on trigonometry; the implementation of a localization system based on odometry and distance sensors provides an opportunity to teach and learn to use Kalman filters. Note that the level of difficulty of implementing a localization system based only on distance sensors is very lower than the level of difficulty of implementing a localization system that uses odometry and distance sensors simultaneously and then uses Kalman filters for sensor fusion (advanced topics in robotics). Lower cost distance sensors can be used in this last case. Using both localization systems in simultaneous provides an opportunity to test the system created by the students and to perform some statistical calculations.
• Programming the navigation algorithm. There can be several levels of difficulty associated to this task also. Robot navigation by following lines is an option -a relatively low difficulty one, but navigation algorithms that allow the robot to move without using the lines are perhaps more interesting conceptually because they allow the teaching and learning of pathfinding algorithms, of trajectory optimization and of obstacle avoidance.
• Programming the robot task scheduling heuristics. This problem becomes even more interesting in the case where multiple robots cooperate between them.
• Implementing a remote control system for the robot. This didactic experience allows, for example, studying several technologies for wireless communication.
• Implementing a speed control system for the robot. The first configuration of the MicroFactory official robot included servos at the wheels. Some modelling efforts have been made to ease the speed control. More recently some experiments have been made with DC motors. This kind of motors and this didactic experience are very adequate to approach some control system concepts, namely system control using PID controllers.
• Disposing of a fully functional 3D printed robot with a set of sensors and actuators is a great opportunity to promote familiarity with robotic systems, and to promote learning about hardware and about fast prototyping techniques. Students can, for instance, be invited to analyze the current configuration of the robot and enumerate the existing hardware; be invited to analyze that hardware technical features by reading technical documentation; make a guided online tour through some hardware stores; be stimulated to produce the electronic schematics of the current robot configuration using CAD tools; make a survey on fast prototyping techniques, namely 3D printing; be challenged to make a small change in the design of a given robot configuration, for instance by adding a new sensor -this mentioned challenge is a very interesting and complete didactic project that implies redesigning the chassis, reprinting it, updating the hardware schematics, reassemble all the hardware and conceive a small library to have access to the data from the sensor.
• The availability of our realistic simulator -SimTwo -is also important in the sense that it creates the opportunity to perform a complimentary set of didactic experiences, namely experiences that involve building virtual models. An example didactic experience that could be implemented consists in building a model in SimTwo for the robot distance sensors.

CONCLUSIONS
Technology is in constant evolution and is present everywhere. On the other hand the development of modern societies requires professionals with high levels of technological literacy. Educational models and systems must, and inevitably will, accompany these realities. Two important recent trends observable in education have been the integration of different technologies like digital games and educational robots, and the learning and teaching about design and implementation of educational robots.
Robotics integrates different knowledge domains such as mechanics, automation, mathematics, programming, computer engineering, and artificial intelligence; so, robots can be used to teach different topics. Besides that, assembling robots is a task that motivates most of the students and is adequate to promote social skills like teamwork capabilities.
Our team is involved in an Open Source project whose purposes are the development of projectbased didactic experiences with robotics and the development of low-cost 3D printed educational robots based on generic electronics to support those experiences. This article shows an example of how an existing very complex engineering problem can be worked in order to be brought from the research laboratories associated to universities and from the companies' research and development departments, to the interior of classrooms.
First an existing advanced competition was adapted to make it implementable with few resources, anywhere in the world, inside a classroom, with regular students as competitors; then an analysis was made and consequently a set of diversified didactic experiences was proposed. Some of the didactic experiences will be tested inside the author's teaching institutions and their target will be their students, but some of them will be targeted to K-12 students in the context of Summer Schools or Open Days to potential students and to their families.