file and identify erroneous and inhibit potentially dangerous controller settings. The workcell utilises the. MA2000 six axis robotic arm supplied by TecQuipment.
Visualisation, Simulation & Control Of A Robotic System Using Internet Technology D.W. Calkin, R. M. Parkin, R. Safaric
C. A. Czarnecki
Department of Mechanical Engineering Loughborough University, Ashby Road Loughborough, LE11 3TU UK
School of Computing Sciences De Montfort University, The Gateway Leicester, LE1 9BH UK
Abstract The increased accessibility to the internet has been successfully exploited by many universities to provide wider access to on-line learning resources, however a typical problem facing engineering based applications concerns the lack of real world laboratory equipment, i.e. robotic manipulators, servo systems etc. with which students can work with, in order to acquire valuable practical ‘hands on’ experience. This paper presents a virtual robotics and control laboratory, MuMaTE∗ , which is being developed to study the design issues involved in providing remote users with internet access to laboratory based hardware. Simulation tools for the robotic hardware utilise a desktop virtual reality environment to improve the visualisation of the manipulator hardware and associated workspace. The development of the project web server, interface electronics and control software is also discussed. ∗
MuMaTE: http://mumate.lboro.ac.uk
1. Introduction Robotics and control principles are widely taught in engineering subjects, however a common problem concerns the limited availability of expensive equipment with which students can work with, in order to acquire valuable practical ‘hands on’ experience. Although the World Wide Web (WWW) has evolved into a distributed hypermedia system, which allows the users of most typical computing platforms to interact with a diverse global network of online resources, the provision for on-line access to various laboratory hardware and teleoperated robotic systems has yet to be fully exploited. In response to a research initiative funded by the higher education funding councils of the UK, we are developing a small scale virtual robotics and control laboratory, MuMaTE [1], to study the design issues involved in providing network access to real world laboratory
resources. From an engineering perspective, this work develops platform independent simulation tools for robotics, utilising desktop virtual reality environments to improve the visualisation of the manipulator hardware and associated workspace. The work also facilitates the control of robotic hardware across the WWW, enabling the study of novel manipulator control paradigms.
1.1 Virtual Laboratory Concept Our approach to the virtual laboratory is based on the concept that it provides a working facility for hands-on training whilst reducing the need for multiple high cost actual devices. The aim is for a robotics laboratory of typically sixteen users, equipped with one or two actual manipulators which can be accessed by all. Because the robotic manipulators are only used intermittently the majority of work is undertaken in the virtual environment, where the skills are developed, before final completion on an actual system. Typically in such scenarios it is the configuration of the experiments which is the time consuming task, not their actual execution. Such an approach, we believe, provides students with greater access to laboratory resources, which is paramount to the education process, but reduces the capital outlay required to provide high quality training environments.
1.2 Methodology The intended application as a WWW based resource requires that a platform neutral approach to software development adopted. It is desirable that the robot simulation should be capable of being executed through any standard WWW browser application e.g. Netscape Navigator etc. irrespective of the remote users local computing environment. Our objective is not to provide real time teleoperation between the user and remote apparatus. This is not a feasible goal since data transmission times across the world wide web depend
heavily on the transient loading of the network, making this form of communication unsuitable for time critical interactions. Instead we aim to provide an environment in which the users configure experiments locally using the virtual environment before transmitting the configuration data, via the internet, to the remote project WWW site where the experiment is validated and executed on the laboratory’s real world apparatus. Once complete, the results of the experiment are returned to the user for analysis along with context relevant Java applets, which allow the data to be locally represented and manipulated by the user. Communication between the virtual model of the robotic manipulator, which is viewed by the remote user, and the control system which positions the joints of the actual laboratory based device is achieved as follows: • Remote user invokes robot simulation tools through WWW browser. • User develops robot task within virtual environment. • Transmission of completed robot task file from remote user to the MuMaTE laboratory. • Authentication, error checking and runtime scheduling of the received task file. • Execution of requested task within laboratory workcell. • Collate and return the results to the remote user. Since these resources will be applied as an educational tool it is also essential to consider the effects our virtual environment has on the learning process, particularly pedagogical issues which influence how the course material will be structured in terms of depth, degree of interaction and delivery to meet the needs of the student user [2].
2. Embodiment The MuMaTE laboratory WWW network server is responsible for processing the requests for information by external WWW browser’s, delivering a on-line documents and providing access to the robotic and control hardware. The server is implemented on an Intel P166 Pentium based computer, running the Windows ’95 operating system and a proprietary WWW server application program. The current range of networked laboratory hardware, illustrated in Figure 1, includes a 6 axis robotic arm, motor servo control system and a digital inputoutput interface module. This configuration was chosen to allow various interfacing strategies to be investigated, whilst maintaining an open architecture for the future development of the project.
Fig 1. Networked workcell
The network server and local clients are connected to the internet via the campus 10Mbps Ethernet link. Home user clients however utilise a much slower 14.4k modem connection to their local internet service provider using Point to Point Protocol (PPP). A copy of the virtual environment can be installed on a home clients local computer. This eliminates the need to continually access the simulator across the network, minimising the inconvenience of lengthy data transmission times, thus providing an effective environment for both campus and home users.
2.1 WWW Based Software Engineering The success of the WWW as a distributed hypermedia system is founded on the definition of the Hyper Text Markup Language (HTML) [3], which provides a standardised method of describing static text, image, audio and video data types. A variety of methods also exist to integrate external application programs, e.g. searching through an on line database. Of these methods Java [4] provides a rich and powerful object orientated programming language which can be used to develop and distribute secure embedded application programs within the WWW environment. While the use of HTML specifications enable two dimensional formatted text documents & embedded images to be displayed on traditional WWW browser’s, the addition of the Virtual Reality Modelling Language (VRML) [6] provides an efficient mechanism for the distribution of desktop virtual reality environments across the WWW. Interactive three dimensional worlds are created using various geometric and behavioural primitives. A suitably configured WWW browser is required to view and interact with the virtual world through navigation tools
which allow the scene to scaled, rotated, translated, and viewed from an infinite number of viewpoints. A recurring problem with software engineering concerns the choice of target computing platform when developing new applications. Even with generic language specifications, such as ANSI C, each application often requires additional supporting libraries to allow the executable code to run on a specific machine, due to differences between microprocessor types, computer architectures and operating systems. The Java programming language, and the notion of a virtual machine provide another approach to the development of platform neutral software. Program source code is compiled into an intermediate format which represents the instruction set of a generic virtual machine. Each target computing platform is made responsible for translating the instruction set of the virtual machine into it’s own native code though an appropriate language interpreter. Now, the software engineer only has to consider developing the application to run within the constraints of virtual machine, rather than developing code for each individual computing platform. By contrast the primary goal of the VRML language specification is as a multi platform file interchange format [7] for building 3D graphical models. The standard defines the semantics found in 3D modelling applications e.g. construction of geometric primitives, hierarchical transformations, lighting sources, viewpoints, animation, texture mapping etc. Java software development can take the form of a stand alone application program, Java Script program module, or a self contained Java applet which is embedded within a HTML document. Stand alone applications and applet’s distribute the executable program using pre compiled byte-codes which are viewed through a suitable environment, for example a Java enabled WWW browser. In contrast Java Script’s greatly simplified instruction set is interpreted directly without compilation. Strict rule checking and validation tests are applied during program compilation and execution to achieve a secure transmission protocol and maintain the integrity of computers which utilise the executable Java programs. These measures however restrict the functionality of the language, particularly when accessing local resources, such as disk drives and memory mapped input-output devices, on the clients machine. These limitations can be overcome, section 3.1, thus allowing platform independent software development and program delivery to be readily achieved within our virtual learning environment.
3. Servomechanism Experiment The implementation of an interactive servo-mechanism experiment, analogous to a single joint on the robotic manipulator, was used to verify the virtual laboratory concept and highlight potential problems before implementing the complete system. The student’s task was to optimise the response of a closed loop servo system against changes in applied forcing function and load conditions by tuning the proportional, integral and derivative gains within a discretised version of an analogue three term PID controller algorithm. The servo apparatus was chosen from commercially available educational hardware, having been previously used for teaching control and instrumentation on our undergraduate courses. Before invoking the hardware, desired controller gains are obtained from data posted to the MuMaTE laboratory via a HTML form on the user’s web browser. The experiment is then run for a fixed duration which is sufficient to observe the dynamic response of the servo, capturing the transient response over several cycles. Once complete, sampled data from the experiment is returned to the user along with a Java visualisation applet so that the user can study the results from their remote location.
3.1 Servo Control & WWW Protocol The servomechanism consists of a mechanical unit with servo motor, drive and sensing electronics, and a digital unit which contains analogue to digital conversion, signal multiplexing, data latches, and other support functions. The digital unit is normally interfaced to a simple stand alone computer which executes the software required to implement data acquisition and servo control. However, because the MuMaTE project makes this apparatus available as a networked resource the role taken by the stand alone computer has been replaced by the project WWW server. We utilised C++ and an existing Common Gateway Interface function library [7] to link the protocols of the WWW with the low level assembly language operations required to access the computers interface hardware and servo drive electronics. The Common Gateway Interface (CGI) is a standard method for interfacing external application programs with information servers, overcoming some of Java’s limitations. Before controlling the actual hardware this CGI process extracts the required operating parameters for the experiment from the data posted within a HTML form from the
user’s WWW browser. Figure 2 illustrates the processes involved. Once invoked, the CGI process controlling the experiment applies the requested forcing function to the servo. Servo input and feedback signals are digitised before computing the position error and applying the discretised three term controller equation. The updated drive signal is passed through a digital to analogue converter and power amplifier before energising the motor. The experiment is run for a fixed duration which is sufficient to observe the dynamic response of the servo to a chosen forcing function, capturing the transient response of the servo and its settling down to a steady state value over several cycles. Sampled data from the experiment is stored for later analysis, as an ascii text file within a WWW visible directory on the project server. The CGI program’s final task is to return the data file of the experiments results to the user, along with a Java applet. This applet, shown in Figure 3, allows the user to analyse the data using an interactive graph which can be scaled, zoomed and scrolled to focus on areas of interest. WWW browser will typically cache all documents so that it doesn’t have to reconnect to the originating server when a user requests a page they have recently seen, instead the browser reloads a copy of the data from the users local system. A method must therefore be devised to ensure that the results delivered to a user are updated each time the experiment is run. Our solution was to append an incremental numeric file extension to the filename of the logged results and update the uniform resource locator (URL) which passed as a parameter to the graph drawing applet, to point to the correct file, thus forcing the browser to download the latest data file instead of a previously stored local copy of an earlier file. While this experiment was successful in allowing a remote user to configure and control this laboratory hardware from a remote site, the concurrent execution of multiple programs on the project server’s single microprocessor leads to aperiodic signal sampling when performing the real time data acquisition and computations necessary to control the response of the servo system. Having highlighted this problem the complete implementation of the virtual robotics laboratory is adopting a distributed control approach to partition the real time control tasks away from the project WWW server.
4. Virtual Robotics Laboratory Following the success of the on-line servo experiment we are now completing the development of an improved human computer interface, integrating Java and VRML within a
non immersive desktop virtual reality environment to help improve the realism and sense of presence the user Remote web browser environment
user sets controller gains, sampling clock, duration of experiment
receive html document
transmit html document
server returns Java graph analysis applet, status report, & data file
Network layer - hypertext transfer protocol
MuMaTE project server http://mumate.lboro.ac.uk
data acquisition control system
common gateway interface interpret user request initiate experiment log data return graph drawing applet terminate experiment
log file held on www server
Fig. 2. Network server processing
Fig. 3. Viewing the response of the servo system feels when programming the manipulators. This simulation tool will allow the kinematic and dynamic behaviour of the system to be studied, and permit research into task planning, process synchronisation and the communications issues involved with the control of tightly coupled manipulators. A robotic workcell has also been constructed to enable the performance of these novel control paradigms to be studied within a real world environment. The additional processes which are executed by the MuMaTE server are shown in Figure 4. The virtual simulation tools are used to build a robot task file, which after validation is transmitted to the MuMaTE server for scheduling and subsequent execution by the online robot. The task file takes the form of a sequential list
of intermediate operations or ‘steps’, which specify all workcell and manipulator control parameters together with joint position data for the current operation. The file structure and syntax for the compiled task has been kept as simple as possible to allow the validation program to quickly parse through the contents of the task file and identify erroneous and inhibit potentially dangerous controller settings. The workcell utilises the MA2000 six axis robotic arm supplied by TecQuipment Ltd. It is designed to be driven from a host computer which then passes configuration and position information for the robots posture to a separate motor control system as each step within the robots programmed task is executed. The motor control system is based around an 8 bit microprocessor (Rockwell 6502) and is responsible for implementing PID servo control for each joint, communication with the host to obtain updated position set points and controller gains, acquisition of joint positions and the current status of peripheral process devices within the workcell. The separate robot control system solves the earlier timing problem experienced by the on-line servomechanism experiment as the project server no longer controls the resource directly, but instead passes a block of parameters to a dedicated robot controller. Thus, effectively delegating the robots low level sampling and control tasks, leaving the server free to concentrate on the WWW interface and the servicing of external browser requests.
environments was achieved by exploiting the External Authoring Interface [8]. Network layer - hypertext transfer protocol
intercept task file Robot workcell authenticate user process validation job scheduling data acquisition
real time control kernel
return results
Fig. 4. Robot interface to MuMaTE server
4.1 Simulation Environment Although the VRML language specification allows behavioural program code to be embedded directly within a scene, this approach is not particularly efficient or feasible for complex applications. Until recently the Java and VRML environments were treated as separate entities, running isolated applications solely within their own domain. However greater functionality and performance can be achieved if these two complimentary environments can be combined, allowing data to pass between them. In addressing the needs of the robot simulator the calculations necessary to compute the inverse kinematics of the robot, or determine the trajectory the end effector should follow are performed using the richer and more powerful Java language. Data corresponding to specific joint coordinates and rotation angles are then passed to the VRML environment which allows a three dimensional model of the robot to be efficiently rendered and animated. Figure 5 illustrates the students view of the robot model and its associated ‘virtual’ teach pendant. The integration between the Java and VRML
Fig. 5. Virtual teach pendant & robot model
The External Authoring Interface (EAI) is a programming extension developed by Silicon Graphics for the ‘Cosmoplayer’ VRML application to allow Java applets and VRML scene geometry to interact on a dynamic basis. In Figure 5 the user can modify the joint angles of individual links within the rendered VRML model of robot arm using the Java based teach pendent. Program listings, source code and supporting documentation for this example are available from the MuMaTE server [1]. In providing two way exchange of data, this approach has the added benefit that it now becomes possible to reverse engineer a task by using the robot to acquire a series of teach points within the workcell,
returning the data to the remote user for off-line optimisation in the virtual world.
5. Conclusions An on-line servo mechanism experiment has been successfully implemented to demonstrate the concept of a virtual engineering laboratory, allowing both interactive simulation and remote experimentation with real world devices via the World Wide Web. A distributed control methodology has been adopted within the networked workcell to allow additional devices to be incorporated and shared within the virtual environment.
Acknowledgements This project is funded under the Joint Information Systems Committee’s technology applications program which exists to develop and promote an awareness of emerging technology within the UK’s higher education community. Robotic and control resources were kindly donated by TecQuipment Ltd and Feedback Instruments Ltd.
References [1] http://mumate.lboro.ac.uk [2] R. Riding, S. Rayner, “The information superhighway and individualised learning,” Educational Psychology, Vol. 15 no. 4, 1995. [3] http://www.w3.org [4] http://java.sun.com [5] http://www.vrml.org [6] ISO/IEC 14772-1, “The virtual reality modelling language (vrml) part1: functional specification and utf-8 encoding,” 1997. [7] T.Boutell, “Cgic an ansi c library for programming,” http://www.boutell.com/cgic/ [8] http://cosmosoftware.com/developer/eai.html
cgi