Remote control software application

This project focuses on the development of a Java based application which will allow people to interact and control Lego Mindstorm NXT robots. To accomplish the successful communication (transition) of command to NXT robot for execution, the appropriate commands need to be parsed via a wireless link utilising Bluetooth. The primary objective of this research is focused on interaction between the software system and the NXT robot.

To achieve this interaction it was necessary to install and configure several software applications on both the controller and NXT robot. These applications will allow a user to write and execute the appropriate commands such as movement, obstacle detection and obstacle avoidance. Also the NXT robot needed replacement of both assembly complier and firmware from Lego to Java based.
Introduction
1.1 Background

Human development has always been linked to the continual development and use of new tools such as personal computers and robots. These tools extend human capabilities and make up for our natural limitations. Computers and robots now enhance our lives. One of the many promising applications for both computer and robot technology is the field of autonomous and semiautonomous robotics (Buckley 1998). This field has many potential applications which should continue to extend human capabilities. At present, autonomous and semiautonomous robots are capable of performing tasks which range from hazardous environmental clean-up to planetary exploration (Buckley 1998).

One of the most valuable aspects of autonomous and semiautonomous robot systems is their inherent variability. Since robot systems are essentially a synthesis of sensor inputs and responses, a robot designed for one task can be modified to perform a new function. During the cleanup of the Chernobyl disaster several Lunokhod lunar explorer robots were converted to remote controlled cleanup vehicles (Buckley 1998). As our ability to combine increasingly higher computing power with specialized sensor systems increases, the potential number of applications for autonomous robots also increases.

1.2 Project Aims and Objectives

The aim of this project is to develop a software application which will enable users to remotely control a mobile Lego Mindstorm NXT robot. The control system will connect to the robot using a Bluetooth connection. The system will be using the Java based operating system called leJOS and Java based API called iCommand. The leJOS framework includes and allows Lego Mindstorms robots to be programmed in the Java programming language. The control application developed using JAVA and when completed will be able to utilise all onboard Lego Mindstorm NXT robot system such as light sensor, ultrasonic sensor, sound, and touch sensor.
Background Research
2.1 Introduction

In chapter 2 the background research undertaken for this project will be outlined, in particular both the hardware and software requirements of the system will be discussed. The project incorporates the use of several different applications which are:

• Eclipse Classic v3.1
• Java v1.6,
• iCommand v0.7
• leJOS v0.5
• PC or Notebook with Bluetooth capabilities and
• Mobile robot platform

For this project the Lego NXT Mindstorm kit has been chosen for the robotic platform, which is described bellow.

2.2 Brief History of Robotics

These days we can see robots everywhere around us in different shapes and forms, but what is a robot? Robots can be defined variously as: "A reprogrammable, multifunctional manipulator designed to move material, parts, tools, or specialized devices through various programmed motions for the performance of a variety of tasks" (Robot Institute of America, 1979) and as "An automatic device that performs functions normally ascribed to humans or a machine in the form of a human." (Webster's Dictionary 2008).

The word robot was first mentioned or coined by the famous Czech playwright Karel Capek in his play Rossum's Universal Robots written in 1921. The word robot comes from the Czech word rabota which means “forced labour”. However the first conception of robots spans back as far as 3000B.C. when Egyptian water clocks used human figurines to strike hour bells. The first modern robots as we know them were created in the early 1950s by George C. Devol, an inventor from Louisville, Kentucky. He invented and patented a reprogrammable manipulator called "Unimate" from "Universal Automation." (Gareth Branwyn 2003)

For the next decade, he attempted to sell his product in the industry, but did not succeed. In the late 1960s, businessman/engineer Joseph Engleberger acquired Devol's robot patent and was able to modify it into an industrial robot and form a company called Unimation to produce and market the robots. For his efforts and successes, Engleberger is known in the industry as "the Father of Robotics." (Gareth Branwyn 2003)

Currently the zenith of extremely complex robotics can be seen in the form of the Honda robot called “ASIMO”, which is the latest and most advanced robot that Honda robotics team has made in the long line of humanoid robots which were designed to interact with humans (Honda whitepaper - The intelligent ASIMO 2001).

2.3 Hardware

When we talk about hardware we always fail to see how important is to choose the appropriate tools for specific task. For this project a PC-based hardware platform and Lego NXT Mindstorms have been chosen for the following reasons:

• the kit provide a wide degree of flexibility in terms of configuration of robots
• the kit provide a variety of types of sensors for the robots
• the software environment provided by the Mindstorms kits is highly configurable

Because it is not platform specific, which means you can easily upgrade or change both hardware and software.

2.4 Hardware Requirements I (PC/Notebook)

The one of two key components for this project comes in form of PC or a Notebook PC or Laptop whit: 1GB of RAM, 80GB HDD, 1.8GHz CPU, Bluetooth capabilities, Java enabled, leJOS and iCommand enabled.

2.5 Hardware Requirements II (NXT Mindstorm Robot)

The second key component for this project is a robotic platform have, and for this purpose we chosen to use the Lego NXT Mindstorm robot. The reason for this was the NXT Mindstorms flexibility and usability in terms of designing and constructing a mobile platform, network and communication capability and due to is low cost.

The NXT is the brain of a Mindstorm robot. It is an intelligent, computer-controlled Lego brick that lets a Mindstorm robot perform different operations. It has several input and output ports (Motor port, Sensor port, and USB port), loudspeaker, LCD display and interface buttons. (More information available at Lego NXT website)

Also this section of the report will show and describe each of the individual sensor systems on NXT. Once the sensor systems are identified, there will be a description of how the particular system is used. “The use of external sensing mechanisms or sensors allows a robot to interact with its environment in a flexible manner” (Fu, Gonzalez, and Lee 1987). These sensors are as follows:

Touch Sensor
NXT Mindstorm Touch SensorThe Touch Sensor detects when it is being pressed by something and when it is released again; also Touch Sensor as any other sensors which come in the pack can make NXT robot act on command (LEGO NXT Mindstorm 2007).

Sound Sensor
NXT Mindstorm Sound SensorThe Sound Sensor allows NXT robot to detect sound in both decibels and adjusted decibel . A decibel is a measurement of sound pressure (LEGO NXT Mindstorm 2007).

Light Sensor
NXT Mindstorm Light SensorThe Light Sensor enables NXT robot to distinguish between light and dark. It enables the NXT read and measure the light intensity of coloured surfaces (LEGO NXT Mindstorm 2007).

Ultrasonic Sensor
NXT Mindstorm Ultrasonic SensorThe Ultrasonic Sensor is second sensor that gives your robot vision. The Ultrasonic Sensor enables robot to see and detect objects. This sensor can also use it to make robot avoid obstacles, and measure distance, and detect movement.

The Ultrasonic Sensor measures distance in both metric and in imperial units (LEGO NXT Mindstorm 2007).

Large sized objects with hard surfaces return the best readings. Objects made of soft fabric, or that are curved , or are very thin or small can be difficult for the sensor to detect (LEGO NXT Mindstorm 2007).

Servo Motor
NXT Mindstorm Servo MotorServo Motors give robot the ability to move, and ther are three motors; each motor has a built-in Rotation Sensor which allow us to control robot’s movements precisely. The Rotation Sensor measures motor rotations in degrees or full rotations [accuracy of +/- 1 degree] (LEGO NXT Mindstorm 2007).

Bluetooth
“Bluetooth wireless technology is a short-range communications technology intended to replace the cables connecting portable and/or fixed devices while maintaining high levels of security.” The key features of Bluetooth technology are robustness, low power, and low cost. The Bluetooth specification defines a uniform structure for a wide range of devices to connect and communicate with each other. (Bluetooth 2007)

2.6 Software Requirements
One of the advantages of the NXT robot platform is that it can be programmed using a range of programming languages and API. The main options include: leJOS, Robot C and NXT software (LabVIEW based).

leJOS
leJOS is a firmware replacement for the Lego Mindstorms programmable NXT controller. It includes a Java virtual machine, so allows Lego Mindstorms robots to be programmed in the Java programming language also leJOS is the Java based programming language for this platform. (Brian Bagnall 2002)

iCommand
iCommand is a Java API which is used to program or control the NXT brick over a Bluetooth connection. The advantage of using iCommand is that it can use the standard Lego NXT or leJOS firmware to receive commands from Java code from your computer (Windows, Linux, Macintosh or Windows Mobile). (Jose Solorzano)

BlueCove
BlueCove is a Java library for Bluetooth (JSR-82 implementation) that currently interfaces with the Mac OS X, WIDCOMM, BlueSoleil and Microsoft Bluetooth stack found in Windows XP SP2 or Windows Vista and WIDCOMM and Microsoft Bluetooth stack on Windows Mobile. (bluecove.org)

Robot C
Robot C is a text based language base on C programming language. It includes built-in debugger tools, as well as (but not limited to) code templates, Math/Trigonometry operations (such as sin, cos, tan, asin, acos, and other), user-friendly auto-complete function built into the interface, and built-in sample programs.

NXT software
NXT software is the official Lego programming language for NXT Robot. This software was is visual based and developed using National Instruments LabVIEW Visual programming language.

For this project we have chose to use leJOS as an OS and iCommand as programming language because it has several competitive and advanced features such Wi-Fi communications while utilising Bluetooth which is of key importance for this project. Also another reason for the use of the leJOS and iCommand for LEGO NXT Mindstorm package is because they are open source, and available for the user customisation. The leJOS and iCommand API is extensively commented, and documented.

Eclipse
“Eclipse is an open-source software framework written primarily in Java.” In its default form it is an Integrated Development Environment (IDE) for Java developers, consisting of the Java Development Tools (JDT) and the Eclipse Compiler for Java (ECJ). Users can extend its capabilities by installing plug-ins written for the Eclipse software framework, such as development toolkits for other programming languages (Eclipse 2007). Also the Eclipse was chosen for this project because it is completely portable which means that you can use it on any machine you need to with out having the administrative rights.
Software Testing
5.1 Introduction
Software Testing is the process of executing a program or system with the intent of finding errors (Glenford J. Myers 1979). Or it involves any activity aimed at evaluating an attribute or capability of a program or system and determining that it meets its required results (William C. Hetzel 1988). Software is not unlike other physical processes where inputs are received and outputs are produced. Where software differs is in the manner in which it fails. Most physical systems fail in a fixed (and reasonably small) set of ways. By contrast, software can fail in many unexpected ways. Detecting all of the different failure modes for software is generally not feasible, and for this reason the testing of this application we have selected the black box testing method.

5.2 Black Box Testing
Black Box TestingThe black box testing is testing for which we do not need to have knowledge of the internal workings of the item being tested. For example, when black box testing is applied to software engineering, the tester would only know the legal inputs and what the expected outputs should be, but not how the program actually arrives at those outputs. It is because of this that black box testing can be considered testing with respect to the specifications, no other knowledge of the program is necessary. For this reason, the tester and the programmer can be independent of one another, avoiding programmer bias toward his own work. For this type of testing, test groups are often used, "Test groups are sometimes called professional idiots people who are good at designing incorrect data." (Dennie Van Tassel 1974) Also, due to the nature of black box testing; the test planning can begin as soon as the specifications are written. The opposite of this would be glass box testing, where test data are derived from direct examination of the code to be tested. For glass box testing, the test cases cannot be determined until the code has actually been written. Both of these testing techniques have advantages and disadvantages, but when combined, they help to ensure thorough testing of the product.
Conclusion and Future Work
7.1 Conclusion
Following development of robotics and programming, we can clearly see the potential of the hybrid systems which are being used more and more worldwide. In fact, many industries, such as the military, vehicle, aerospace, manufacturing and the shipping industry, have become quite dependent on this service. The discontinuation of hard labour work (which we had in the past) in favour of more mechanised programmable systems is the recognition of this fact that these systems are the future.

The challenges provided by this project encompass a range of disciplines. Robotic based hardware platform incorporated the design of the software based control application in building of an autonomous or semiautonomous unit. Obstacles regarding development of this project and finding appropriate solution to the task have been successfully dealt with by means of theoretical and practical research. Much research had also been done in Java programming, leJOS and iCommand API, especially into its operation and limitations.

Software engineering included Java programming, and the heavy use of leJOS OS and iCommand API.

The objectives set out at the start of the project have been successfully met. The author has demonstrated the possibility of combining NXT Robot with and Java based programming trough the continuous assessment work in Robotics Class and with this project.

Finally, by combining these two technologies together it is authors’ opinion that this system when fully functional could be further developed with minor changes into a device that could help people with special needs.

7.2 Future work
To develop an intelligent robot is to create a machine that will be able to exhibit many of the human qualities and characteristics, which can be beneficial to all. It is the authors opinion that this type of technology is seems appropriate to use and further develop to help aid people who have lost certain abilities due to accident or simply to help those who were born with disability.

As it stands now this system performs all of its tasks successfully in real time using an NXT Mindstorm robot and at this stage might seem less complex, but in order to perform more complex tasks already existent functions need to be up scaled. With that in mind this system can be further improved with adding of other modules so we could voice operate the robot or robot will be able to recognise objects and body gestures with the use of unique sensors which are now easily available for purchase.
 
< Prev   Next >