By Azali Saudi, Universiti Malaysia Sabah

 

The field of robotics is no longer exclusive. Even the kids can join in, with the wide availability of "robot kits" in the market.

Robotics is still an emerging field. In the early years, robotics looks to be an exclusive domain for those who are either working in a research lab or those who carry out studies in the university or higher learning institutions.

The perception was that robotics was such an advance science and expensive hobby, that it sort of scared away the "non-scientific" community. However, the field of robotics has changed. Nowadays building a simple "robot" is relatively easy and cheap, and that has created greater interest among the inclined public.

There are now many affordable robotics kits available in the markets that are mainly targeted to novice in robotics, i.e. potential young roboticists. These kits usually come with an assortment of construction pieces, sensors, and motors together with proper instructions to put the pieces together.

Some kits include standard construction pieces so that a robot can be built in a matter of several minutes. There are even introductory kits that do not require any assembly at all. You just provide power supply, and the robot is ready to go through its pre-programmed routines.

Overall, these kits offer an easy way to explore the fascinating and complex field of robotics. But still, it is just the first step. Building a more "capable" robot still requires a lot of work, plus the fundamental knowledge in various disciplines such as mechanical engineering, electrical engineering, computer science, and artificial intelligence.

The availability of such robotics kits should offer more opportunity to anybody interested in building robot. Furthermore, the reductions in size and cost of electronic components in recent years have drastically dropped the cost of robotics components, thus making them more affordable. One construction kit that recently gains much attention is based on Lego bricks. Previously Lego bricks are only used to construct static objects or toys. But now there are efforts to provide a self-learning experience for engineering and computer science undergraduates by building robots using Lego bricks as a rapid prototyping tool. Carnegie Mellon University for example, has a course in general robotics that uses Lego sets as part of the learning experience.

Why Lego?

Azali Saudi: The reductions in size and cost of electronic components have drastically cut the price of robotics kits.

Lego has many advantages over other construction kits. One is that they come with standard size and design so that bricks can be assembled together quite easily. Lego is also very flexible when it comes to constructing and reconstructing the design model. Moreover, Lego bricks have always been a good mechanical “prototyping tool”. Lastly, Lego building blocks is easily available from almost any toy stores.

As a result of extensive work carried out by a group of researchers at Massachusetts Institute of Technology (MIT), Lego now has become a sophisticated toy with the introduction of a new product line. They have successfully combined Lego bricks and small computers in interesting ways to produce simple robots with programmable movements. The new robotics kit is called Lego Mindstorms Robotics Invention System.

Most of the parts in Mindstorms sets are standard Lego bricks, but the most interesting part is the Robotics Command Explorer (RCX) brick. The RCX is a programmable brick that has 3 input ports, 3 output ports, an LCD display, 4 buttons (View, On/Off, Program, and Run), an infrared port for communication, and a battery box. It runs on a 16MHz microprocessor with 32Kb of memory. The RCX brick is where the "intelligence" of the robot is stored, and it can support up to five programs at a time. The default Mindstorms set comes with 2 touch sensors, 1 light sensor and two motors. The sensors and motors are connected to the input and output ports respectively.

Building the Robot

In general, there are four steps in building a robot consists of four steps. The first step is to build the body structure of the robot. Then, a set of sensors and actuators will be attached to the robot so that it could interact with its environment. Once the hardware is ready, the robot has to be programmed in order to achieve its goals. For small Mindstorms-based robot, feasible goals could include exploring indoor environment without getting stuck, playing soccer in customized field, hiding in the dark, and so on.

The final step is to test the robot and let it run on its own. These steps are then repeated several times until intended behaviors of the robot are obtained. In the case of Mindstorms robot, the body structure is constructed using standard Lego bricks. One possible design is a mobile robot base with two front wheels and one rear non-driven wheel. Two DC motors are then connected to the front wheels to drive the robot. The final assembly involves mounting sensors to appropriate position on the robot, depending on its intended functions.

For instance, touch sensors are usually directly connected to bumpers, to send signals to the processor or "brain" when it hits something. Light sensor is useful to detect light-reflective object or surface. Thus, it is normally mounted pointing forward to detect any obstacles ahead. Alternatively, it could also be used to detect white lines, in which case, the sensor is pointed down to the floor.

At first glance, assembling Lego bricks to create a robot platform looks trivial, just like a game. In actual fact, one must be creative and familiar not only with the bricks assembly technique, but also with the fundamentals in robotics, in order to come out with a robust design. The final construct must be robust enough to withstand the hits and bumps that the robot encounters during its test runs.

The construction manual that comes with the Mindstorms set is by itself a great help to come out with good designs. The manual illustrates various design ideas. The most common design is a wheeled robot but there are also samples of legged robot and stationary arm robot.

Robot Programming

The next phase of robot building is to write program for the robot. Lego's Mindstorms set provides plenty of programming options. The usual way of programming the RCX bricks is to use the software that is provided wit the set. This software offers a graphical user interface environment, and users can define the behavior of the robot by simply "dragging and dropping" pre-defined functions. This simplicity however comes with a price - limited functionality and slow execution speed. This is mainly due to the limited number of pre-defined functions that can be selected. Furthermore, it produces bigger program files, resulting in slower code.

In order to realize the real potential of the RCX, users could turn to C, C++, Java, Visual Basic, etc. These pure programming languages provide virtually unlimited functionality, produce more compact code and run faster. There is even a programming language that is specifically written for the RCX - NQC (which stands for Not Quite C). NQC is similar with C in syntax but much more simplified for robot programming. It supports concurrent processing, which means many tasks can be executed simultaneously. This feature enables the robot to respond to various inputs at the same time. Interested readers are recommended to visit NQC homepage, as the software is freely available for download.

There are several approaches to robot programming. The traditional approach is based on the idea of world modeling and planning. This approach blocks a program into an ordered sequence of functions. The first is to collect data from all sensors to be used to generate a robot's model of the world, and to plan a series of actions. The actions are executed by issuing commands to the actuators or motors. Unfortunately, this approach has several disadvantages. One is that it requires immense resources and intense computation, which is a main concern for mobile robots that must carry their own computational resources. Moreover, it relies on highly precise and often expensive sensors. Lastly, there is always a delay in this sense-plan-act paradigm, thus invalidating the plan if changes occur in between phases.

The new approach to robot programming is called behavior-based architecture. It is devised by Professor Rodney Brooks in his group at MIT AI Laboratory as part of their robotics research program. In this architecture, the robot is developed gradually with increasing level of skills. Low-level skills usually provide a set of basic surviving behaviors such as keep moving and avoid obstacles. Higher-level skills consist of advance behaviors that are used to achieve more specific goals. In this scheme, higher-level behaviors have the power to temporarily suppress or shut off lower level behaviors. When the higher-level behaviors are no longer triggered, however, the lower level behaviors resume control of the system.

Standard electronics components that come with Mindstorms set. From left to right: touch sensor, 12 volt DC motor and light sensor.

For instance, a robot that is designed for line-following purpose, should have keep moving, avoid obstacles, and follow line as its standard behaviors. One way of implementing these behaviors in NQC is to setup a main loop that starts all tasks concurrently. Each task is specifically created to monitor one sensor. When a sensor fires, any behavior that associated with that sensor is executed. Usually, a special routine is created that arbitrarily check the status of each sensor. This simple process of monitoring sensor and responding almost immediately by issuing commands to actuators has greatly reduced the amount of computation. For novice robot builders, simplifying such process would greatly help since they could see the behaviors of their robot without having to delve into the more complex details of robotics.

Alternative Kits

Mindstorms has proved its great potential in robotics fields. However, there are many other alternative kits that should be considered including Handyboard, Rug Warrior, MOVIT robot kits, and Khepera. For instance, if the design needs more sensors and motors, Handyboard should be the choice since it provides up to 14 input and 4 output ports. Advance researchers should consider the more expensive Khepera, which offers more computing power, 8 infra-red proximity sensors, and an extension bus for extra modules such as vision, gripper and communication device.

One invaluable resource that should be fully utilized is the fast-growing internet. The internet provides an excellent platform for robot builders to gather and share ideas. For new young scientist, however, they should start building robot now as understanding of the technology can be attained not only by reading, but also by doing.



The author is a lecturer at the School of Engineering and Information Technology, Universiti Malaysia Sabah. His research interests include mobile robotics, artificial intelligence, computer vision, and development of software. He can be reached at [email protected].
 
Hosted by www.Geocities.ws

1