Design and Development of Control and Communication Systems for Complex Mobile Robot and Manipulator Structure

Design and Development of Control and Communication Systems for Complex Mobile Robot and Manipulator Structure

Design and Development of Control and Communication Systems for Complex Mobile Robot and Manipulator Structure J. Velagic*, H. Balta** *Faculty of Ele...

1MB Sizes 0 Downloads 24 Views

Design and Development of Control and Communication Systems for Complex Mobile Robot and Manipulator Structure J. Velagic*, H. Balta** *Faculty of Electrical Engineering, University of Sarajevo, Sarajevo, Bosnia and Herzegovina, (Tel: ++387 33 25 07 65;e-mail: [email protected]) **Faculty of Information Technologies, University of Mostar, Mostar, Bosnia and Herzegovina (e-mail:[email protected]) Abstract: This paper describes how LEGO kits can be used to teach design and building of the complex robot system composed of the mobile robot platform and the robot arm. Both parts of proposed system are equipped with appropriate microcontrollers, sensors and actuators. All mechanical and electrical components are parts of Lego NXT MindstromsTM Educational Robotic Kit. The control and communication software supports were building using Java programming language. This system could be controlled in two different modes, direct and Bluetooth controls. The effectiveness of the proposed complex system is demonstrated through several experiments, which provide an innovative use of the LEGO kits in robotics courses. 1. INTRODUCTION Robotics is leaving the manufacturing and production sector to become an integral part of everyday life. It is starting to be a part of the daily lives of many people. For the past several years, universities have been offering a broad variety of robotic courses, dealing with mobile as well as fixed robots, kinematics, control, bio-inspiration, and so forth (Fiorini, 2005). Many students have few opportunities to have handson experience on the design and fabrication of robotic devices. On the other hand, it is well known that students’ active involvement in a subject, while they are also learning its theoretical aspects, plays an important role in concept assimilation and in mastering the acquired concepts. Robotics requires long and expensive processes to complete a realistic design and safe usage of it. From these reasons, a few companies have developed and commercialized small robotics devices, or robotic kits, that let students apply their knowledge safely. Educational researchers have long suggested that instruction utilizing a variety of delivery modes helps students with differing learning styles to better understand the studied material. The one of most using robotic Kit which helps students to realize and implement their ideas is the LEGO MindstormsTM robotics platform and the leJOS firmware (a Java based OS). The Lego MindstormsTM robotics kit contains a programmable Lego brick (called the NXT brick), a variety of sensors (light, infrared, sound), several motors and normal Lego components (gears, pulleys, wheels, bricks, etc). This kit can be used to build robots which are identified in the manuals provided, or to create your own custom-made robot. LEGO robots provide excellent platforms for teaching various subjects of computer science. For instance, LEGO robots have been exploited to teach introductory programming (Hood and Hood, 2005), java bytecode

(Jipping et al., 2007), graphical user interfaces (Challinger, 2005), image processing (Stevenson and Schwarzmeier, 2007), systems related courses (Klassner and Continanza, 2006) and robotics (Kumar and Meeden, 1998; Bagnall, 2007). A particular application of Lego MindstormsTM Kit is in mobile robotics and artificial intelligence (AI). It allowed students to apply a variety of the AI topics studied in the classroom to the construction/creation of student-built robots to solve a diverse set of tasks. These AI topics included problem solving – using simple search, informed search and exploration techniques such planning and multi-agent communication (Thomas et al., 2002). Also, strengthening studies have attracted attention in the field of adapted learning control and neural networks control in recent years (Fujisawa et al., 2003). In this paper a complex robotic system consist of mobile platform and robot arm are designed for an unknown path following, obstacle avoidance and object moving from a trajectory. Mechanical structure of this system are build using Lego parts, such as wheels, joints, gears, belts, etc. The control and communication software is written in Java programming language and its execution on the robot is under operating system called LeJOS (Lego Java Operating System). This operating system allows the execution of Java code on the robot and includes a set of Java classes to control the different functions provided by the robot. The particular software module for remote control of the robot system over Bluetooth communication by PDA device is build. The special focus is on verifying Mindstorm's validity as an educational and scientific tool by using it for the manufacture of the target robot, and in the design of a strengthening study system. For testing this statement a several experiments were executed in this paper.

2. SYSTEM DESCRIPTION The control system proposed in this paper is shown in Fig. 1. It is an interactive organized system that contains three major modules: the user, the human interface and the robotic system. In this section, robotic system will be described in detail, while two other modules will be consider in particular sections.

Fig. 2. Mechanical structure of complex robot system 2.2 NXT Intelligent Brick (Microcontroller) The NXT brick (Fig. 3) contains an Atmel® 32-bit ARM processor running at 48 MHz. This processor has direct access to 64 KB of RAM, and 256 KB of flash memory. The flash RAM stores programs and data even when there is no power, which saves battery life. The brick has four input ports to connect different types of sensors, and three output ports for the DC servo motors. The NXT brick transfers data to the other devices by using USB or Bluetooth 460.8 Kbits per second – 26 times slower then USB.

Fig. 3. NXT intelligent brick (microcontroller) 2.3 Sensors

Fig. 1. Block of the proposed complex robot control system 2.1 Mechanical Structure of Robot System The robotic system is show in Fig. 2. is made by using components of Lego NXT Mindstroms Educational Robotic Kit. It composed of two wheeled mobile robot vehicle with a differential drive and a robotic arm with three revolute joints. Also, the mobile vehicle contains a castor wheel for stability. Both parts, vehicle and arm, are independently controlled by two ATMEL 32-bit ARM microcontrollers. The vehicle are equipped by two actuators (DC servo motors) and two sensors (infrared and ultrasonic sensors). The robot arm is driven by three DC servo motors.

The Lego MindstormsTM robotics kit contains four types of sensors: touch, light, sound and ultrasonic sensors. All sensors are identical in size and shape, except for ultrasonic sensor (distance sensor). In this paper we use only light and ultrasonic sensors. These sensors are shown in Fig. 4.

(a)

(b)

Fig.4. Light sensor (a) and ultrasonic sensors (b)

The light sensor measures the intensity of light entering a tiny lens on the front of the sensor (see Fig. 4a). The sensor is also equipped with a red light-emitting LED diode which illuminates the scene in front of sensor. The sensor can also detect light invisible to the human eye, such as infrared (IR) light emitted from a television remote control. The ultrasonic sensor (Fig. 4b) sends out a sound signal that is inaudible to humans (like a bat), then measures how long it takes for the reflection to return. Since it knows the speed of sound, it can easily calculate the distance the signal travelled. It measures distance to solid objects in centimeter or inches. The sensor is capable of measuring distance up to 255 centimeters thought returns are inconsistent at these distances, probably because the return ping becomes weaker. The ultrasonic sensor produces a sonar cone, which means it detects objects in front of it within a cone shape. This cone opens at angle of about 30 degrees. This means that at a distance of 180 centimeters the cone is about 90 centimeters in diameter. The cone shape is ideal for robots, since it is better to scan a large area in front of the robot for possible collisions. 2.3 DC Servo Motors The DC servo motor with gears and shaft is show in Fig. 5. It uses built in tachometers to keep track of axle rotation. It can turn in any number of directions for thousands of rotations and come back to the exact starting position at any time. This feature opens up incredible possibilities for robot creation, especially with navigation and robot arms. Even better, all four sensors ports remain free. The NXT servo motor contains gears that reduce the speed of the motor and increase power.

Fig.5. Servo motor with gears and belts

3. DESIGN OF USER INTERFACE In proposed system (Fig. 1) communication between robots and an external world can be established over USB and Bluetooth protocols. The user may enter commands using these protocols in the NXT brick, which executes a control program. In the case of using the USB protocol (off-line mode) the control algorithm is created under Java IDE (Integrated Development Environment) Eclipse. This development environment must be first configured that allows uploading a program code into NXT brick.

Besides configuring IDE Eclipse tool for program code compiling and loading into NXT brick, it is also necessary to install and configure IeJOS program package on the computer and NXT brick. IeJOS is a software package used for developing and running Java programs on NXT microcontroller. Use of this package in programming functionality of NXT robots requires higher level of programming knowledge compared to NXT-G, graphical development environment offered by Lego. However, IeJOS offers various advantages, such as use of industrial standardized programming language Java, multiplatform environment, multithreading etc. First step in the process of installing IeJOS on the computer is the installation of Java Standard Edition (Java SE) and Java virtual machine (JVM) packages. Java SE is a programming platform using Java programming language while JVM is an environment executing Java bytecode that is a compiled version of Java source code. After the process of installing both packages is completed, it is necessary to install USB drivers on the computer. These drivers are necessary in order to enable communication between computers and NXT brick needed for the process of loading program code into NXT brick. The process of installing IeJOS package on the computer starts with configuration of system variables of an operating system. Then, additional options of options in IDE Eclipse development environment are adopted in order to enable of usage of IeJOS programming libraries to create of program the code. Other form of communications between the external environment and robots is established by using Bluetooth protocol (online mode). This form of communication is quite simple since NXT brick has an integrated Bluetooth device. In order to make a presentation of this communication form as simple as possible, this approach provides the PDA device remote control method. In order to enable communication with NXT brick, NXT Mobile Application (NXT MA) is installed and configured on PDA. NXT MA is the program developed by Lego, which enabling remote control of NXT by mobile phone using Bluetooth protocol. Besides remote control interface, this solution has additional options: program control managing programs loaded into memory of NXT brick, collecting data options which enable transfer of data such as pictures, audio files etc. on the NXT brick. Besides NXT MA, there is a possibility to develop applications to be installed on the computer and used for remote control of NXT brick. Library iCommand is used for development on those applications. iCommand is a Java based library for development of applications used for remote Bluetooth control by NXT microcontroller. iCommand has many similar classes like IeJOS, but the basic difference between iCommand and IeJOS is that program code in iCommand program is executed on computer and it transferred commands via Bluetooth device on the NXT brick. Advantage of this method is that there is no limit with

regard to use of memory resources as opposed to when code is executed on NXT brick. The user interface for remote control of robot developed using iCommand library and Java programming language is shown in Fig. 6.

Fig. 7. The robot environment and predefined robot path (which is not known a priori for the robot

Fig. 6. The user interface for remote control Also, it is possible to use IDE Eclipse for the development of program code based on iCommand programming package. In this example, SWT (Standard Widget Toolkit) module was used for development of user interface. SWT is a Java based environment for user interface development (GUI). Developed application enables remote control of a mobile platform. Application has a simple user interface starting mobile platform through adequate requests. There are five buttons on the form used for robot movement control. 4. EXPERIMENTAL RESULTS The experimental verification and validation of the proposed control and communication system are tested through different scenarios. The first scenario considers a problem of tracking of an unknown path, which is marked by black colored curve, by using measurement of infrared sensor. The second treats a problem of the object recognition and movement. After that the remote control via Bluetooth is activated for the object moving from the path. The detection of obstacles on the robot motion path is provided by ultrasonic sensor. These experiments are demonstrated in the next subsections.

The objective of the path following is to obtain a minimal deviation between actual and desired robot paths. The infrared sensor is used for desired black colored path detection. When the measures of the infrared sensor are between 28 – 35 values it detects black color. In the case of white color these values are 50 – 55. Those values are input information for the microcontroller (NXT brick). The NXT brick combines these values and produce a control output to the actuators based on the control algorithm. This algorithm ensures the accurate path following and its pseudo code is illustrated in Fig. 8. The control algorithm code was executed in Java program language under the leJOS. infrared_sensor = 0 repeat (infinity or stopped by user) { if infrared_sensor reading <= 35 robot_go_forward() else robot_turn_right() if infrared_sensor reading <= 35 robot_go_forward() else robot_turn_left() if infrared_sensor reading > 35 robot_go_forward() }

4.1 Path Following The robot environment with a black colored path is shown in Fig. 7. Dimensions of robot environment are 2 meter × 1.2 meter. The rest of the environment is white colored because of fine contrast to be achieved. This contrast between these colors is required for elimination of an error measurement from the infrared sensor.

Fig. 8. Pseudo code for the path following behavior The one scene during the path following algorithm is shown in Fig. 9.

Fig. 11. Robot arm moves an obstacle from the path Fig. 9. One robot configuration during path following process 4.2 Object Recognition and Movement In this subsection the ultrasonic sensor is used for object detecting on the desired path. When robot detects an obstacle (object) on the predefined unknown path at distance of 25 cm it stopped and activates its arm. Then, the robot arm catches an object and removes it from the path. After that, the robot continues its motion on the path. The maximum infrared sensor range reading is 255 cm. The pseudo code for this behavior is described in Fig. 10.

infrared_sensor = 0 repeat (infinity or stopped by user) { robot_pilot_motion() if infrared_sensor reading <= 35 robot_stopped() robot_arm_activated() obstacle_removed() else robot_pilot_motion() }

Fig. 10. Pseudo code for obstacle detection and object movement The situation when the robot arm removed an obstacle from the path is depicted in Fig. 11.

6. CONCLUSIONS In this paper we presented the design and development processes of complex robot system composed of the mobile robot and the robot arm. The whole hardware system is built using the Lego MindstromsTM robotics kit. This system is equipped by microcontroller (NXT brick), sensors and actuators. Control and communication software is created under Java programming environment. The robot system is capable to follow a predefined unknown path and detect an obstacle on the path. The robot arm is used for removing obstacles from the path. Finally, from the experimental results obtained, it can be concluded that the Lego MindstromsTM robotics kit may be exploited in design of complex robot system and teaching of robotic principles. REFERENCES Bagnall, B. (2007). Maximum Lego NXT : building robots with Java brains. Variant Press, Winnipeg, Canada. Fiorini, P. (2005). LEGO Kits in the Lab, Robotics and Automation Magazine, Volume 4, pp. 5-5. Thomas L., Ratcliffe, M., Woodbury, J. and E. Jarman (2002). “Learning Styles and Performance in the Introductory Programming Sequence,” In: Proceedings of the 33rd SIGCSE Technical Symposium on Computer Science Education, February 27- March, 3, Cincinnati, USA, pp 33-37, 2002. Fujisawa, S., Kurozumi, R., Ohnishi, R., Kawada, K. and T. Yamamoto (2003). “Reinforcement Learning of Walking Behavior for a Lego-Mindstorms Robot,” In: Proceedings of Conference on Computers and Advanced Technology in Education, Rhodos, June 30 – July, 2, 2003. Hood, C. and D. Hood (2005). “Teaching programming and language concepts using legos,” In: ITiCSE 2005. Jipping, M., Calka, C., O’Neill, B. and C. Padilla. (2007). “Teaching students java bytecode using lego mindstorm robots,” In: SIGCSE 2007. Challinger, J. (2005). “Efficient use of robots in the undergraduate curriculum,” In: SIGCSE 2005.

Stevenson, D. and J. Schwarzmeier (2007). “Building an autonomous vehicle by integrating lego minstorms and a web cam,” In: SIGCSE 2007. Klassner, F. and C. Continanza (2006). “Mindstorms without robotics: An alternative to simulations in systems courses,” In: SIGCSE 2006. Kumar, D. and Meeden, L. (1998). “A robot Laboratory for Teaching Artificial Intelligence,” In: Proceedings of the 29th SIGCSE Technical Symposium on Computer Science Education (1998).