Interaction Interface for Networked Robots Present

Uploaded from authorPOINT Lite
Download as
 PPT
Presentation Description 

No description available

authorSTREAM Premium Service
What's up on authorSTREAM?
Views: 112
Like it  ( Likes) Dislike it  ( Dislikes)
Added: January 04, 2008 This Presentation is Public 
Presentation Category : Entertainment All Rights Reserved
Presentation Transcript

Providing an ’Interaction Interface' for networked robots using Squeak: Providing an ’Interaction Interface' for networked robots using Squeak ITB844 Bachelor Project Presentation by Svein-Magnus Sørensen (n4607048) Supervised by Joaquin Sitte


Objectives and Goals: Objectives and Goals Project objectives: Create a generic robot interaction interface in Squeak, based on the Java-implementation by Erik Berglund. It should enable the passing of messages to remote objects and execute them. Use the Agora Distributed Object-architecture as a basis for message passing to remote objects over any TCP/IP network. Install and run the Squeak VM on the Koala PC/104 system. Using the generic interface, implement and test a specific controller for the K-Team ’Koala’-robot. Learning goals: Learn to use and become familiar with the Squeak-environment and Smalltalk for application development. Become familiar with the K-Team ’Koala’-robot and its extension, the PC/104 architecture running Linux. Be able to perform and manage a medium sized programming project for on time delivery.


Smalltalk: Smalltalk What is it? A programming language and development environment developed by Alan Kay in the 1960s. The first pure object oriented environment created. A very simple but powerful language. Can usually do three times as much as conventional languages with the same amount of code, and is grammatically comparable to English. What is it? A Smalltalk-80 implementation with all source code available for changing on the fly, where everything is written in Squeak itself, including the Virtual Machine! Squeak


Why Squeak ?: Interactive programming with a late-bound protocol shortens the Edit-Compile-Test-Debug cycle considerably. Effective programming in a simple but powerful language that is fully object oriented. Highly portable. Ports are available for many different platforms, and can easily be ported to new platforms when needed. The Virtual Machine gives completely bit-identical running of any Squeak applications on any available platform. It is fast. Comparable in speed to programs written in C. It is small. The image can be shrunk to just a few hundred kilobytes which allows it to run on small mobile devices. Extendable. Supports C primitives to run drivers for almost any kind of hardware. It is available for free with a liberal license. Why Squeak ?


K-Team’s Koala-robot: K-Team’s Koala-robot Is a powerful mid-sized robot designed for real-world applications. It rides on 6 wheels for indoor all-terrain operation. Sports 16 infra-red and ambient light sensors arranged around the robot in all directions. It is modular, and a range of other sensors and various utilities can be added to improve its functionality. Supports serial-communication over a wired or wireless RS232 link following aschii sequences of the SerCom-protocol. Extensions to the Koala robot provided by Smart Devices Laboratory at QUT-FIT: A PC/104 computer running Linux A optical pan-tilt turret-camera Wireless network capabilities


PC/104 Architechture: PC/104 Architechture A IEEE standard for PC compatible embedded systems. Has a compact form factor and rugged connectors. Uses a unique self-stacking bus to eliminate the need for backplanes and card cages. A relaxed bus drive gives very low power requirements. PC/104+ incorporates the PCI-bus into the PC/104 form factor. The Koala-addon PC/104 from K-Team features: Pentium MMX 266mhz CPU 64mb RAM Onboard video and Ethernet controllers. Ultra Slim 20gb Hard-drive


Agora: Agora A highly modular and easy maintainable system for point-to-point communication between microcomputers. Inspired by the Transputer, it is an extension of the same ideas about modular systems for smart appliances. Provides transparent and dynamic usage of remote objects in a consistent way over any architecture. An implementation in Squeak was created last year by Johannes Jansson at QUT’s Smart Devices Laboratory.


How it all works together: How it all works together A robot and a client-computer must both be running a Squeak-VM with all the necessary Robot and Agora classes installed. An Agora-server must be started in the Squeak-VM on the robot to accept incoming connections from clients. The client must instantiate and start a RemoteClient object on the local Squeak-VM. The starting client tries to make an Agora-connection to the specified AgoraServer at the specified or default port (40000). When a connection is established, the client tries to instantiate a RobotController on the remote VM through the Agora architecture, and a local ProxyObject is also created. Now the client can transparently send messages to, and receive return-values from, the ProxyObject like with any other local object, while the execution of the messages are taking place in the actual RobotController object on the Robot-Server. Any control-functions or sensor-values from the robot can now be accessed directly from the ProxyObject in a uniform manner. The values can then be processed on the client, lowering the CPU and memory requirements of the robot itself.


How it all works with the Koala:: TCP/IP Network How it all works with the Koala: Instance of class ”KoalaRemoteClient” on client-computer Understands messages from the generic control protocol. The control message in turn sends the relevant SerCom message. AgoraORB ”RobotController” Passes messages transparently through a network AgoraController on PC/104 Instance of class ”KoalaRobotController” Connects to the Koala processor through a serial-link and passes SerCom-commands and return-values between the Koala and the AgoraController SerCom command SerCom return value Koala processor Understands and replies to SerCom commands Connects to AgoraController and creates a local ProxyObject Creates instance of RobotController K-Team Koala Robot system Client system


The Robot-Server: The Robot-Server AgoraController The primary component of the server functionality. Controls the networking functionality of the provided implementation of the Agora architecture. When instantiated it uses the AgoraLinkManager to start an Agora-server listening for TCP connections (default port is 40000). Closes the TCP-port and terminates when stopped. RobotController Is an AgoraObject usually instantiated remotely by a connected client. Contains the sendCommand interface between the native robot-control functions (eg. SerCom at the Koala) and Squeak-messages. KoalaRobotController Inherits the RobotControllers functionality of AgoraObjects. Implements the sending of SerCom commands over a serial link between the PC/104 and the Koala-chip through the sendSerComCommand message, and returns the responses from the Koala-chip.


UML Diagram: UML Diagram Robot-Server package AgoraController alm, port Class: new Class: startUp Class: shutDown init startController stopController RobotController Class: new init startController stopController sendCommand: (string) ; boolean KoalaRobotController serialPort, robotSerial Class: new startController stopController sendCommand: (string) ; string sendSerComCommand: (string) ; string Object – Basic Squeak Class AgoraObject – by Johannes Jansson In Squeak all methods (messages) are public and all attributes are private. Method Attributes in this font Methods in this font (method attribute) ; return value


The Robot-Client: The Robot-Client RemoteClient The primary component of the client functionality. When started it uses the AgoraLinkManager to connect to an existing Agora-server running on a specified address (default port is 40000). Instantiates a remote RobotController object on the server. Interfaces a series of general commands for robot-control. Destroys the RobotController and closes the TCP-port when stopped. SerComRemoteClient Extends the functionality of the RemoteClient, using SerCom specific control messages to implement many of its methods. Understands separate control-messages for the entire SerCom protocol. Implements some easy to use commands to control a compatible robot. KoalaRemoteClient Inherits all of the SerCom functionality from SerComRemoteClient. Initializes itself with control-values specific for the Koala


UML Diagram: UML Diagram Robot-Client package SerComRemoteClient actualMotorPositions, stepsPrDegree, stepsPrCentimeter halt , move: (int) , turn: (int) moveStraight: (int) ; boolean moveStraightCM: (int) ; boolean setSpeedControllerMaxSpeed:andAcceler ation: (int, int) ; boolean In addition implements each of the 18 defined commands of the SerCom-protocol as separate Squeakmessages. Also re-implements relevant Control-messages from class ’RemoteClient’ to use SerCom for their tasks. RemoteClient alm, robot, cr, tolerance, Class: new Init , stopClient , stop ; boolean startClientTo: (string) startClientTo:atPort: (string, int) getStepperPositions : boolean setAndWaitForStepperPositionsLeft: andRight: (int, int) ; boolean is:differentFrom: (OrderedCollection, OrderedCollection) ; boolean setPositionTolerance: (int) setSpeedControllerMaxSpeed: andAcceleration: (int, int) ; boolean turnDegrees: (int) ; boolean zeroMotorCounter ; boolean ... And many more for a total of 24 methods. KoalaRemoteClient Class: new Init , startClientTo:atPort: (server, port) Object – Basic Squeak Class


Changes to the Agora-classes: Changes to the Agora-classes The provided Agora software implementation by Johannes Jansson did not work as required out of the box, so I had to make the following changes to the code for it to be useable: Modified the AgoraTCPProtocol and AgoraSocket to support the changed Socket implementation in Squeak 3.6 Extended the AgoraLinkManager and AgoraTCPProtocol to allow for connections to custom ports and servers. Corrected some small inconsistencies in the code.


Achivements: Achivements Created generic RobotServer and RobotClient interfaces in Squeak, extendable to fit many kinds of embedded devices and robots. Made and is testing an implementation of the new interfaces for a ’Koala’-robot made by K-Team, extended with an PC/104 system. Used the ”Agora Distributed Object architecture” as a base for transparent message passing between the RobotServer and RobotClient over a TCP/IP network.


Evaluation: Evaluation Had some difficulty adapting to the way of doing things in Squeak when I was used to the language structure of C and Java. Development and debugging in Squeak was amazingly fast and easy once I got the hang of how things are done. Squeak is an excellent environment for embedded systems. Agora was a perfect base for interacting with robots in real-time. Due to its development model, Squeak programs can only be guaranteed to run on the version it was developed on, as the implementation of base classes can be changed without warning. The socket primitives has given me troubles during testing.


Ideas for future work: Ideas for future work Create a generic graphical interface for the RemoteClient in Squeak. Develop methods to handle sensor-input and video feeds at a higher and more intuitive level. Use several concurrent remote objects on the Robot-Server to perform time-critical tasks like collision detection and autonomous navigation.


More information: More information Online References: Squeak Central www.squeak.org Smalltalk: The Pure Object Enviroment www.smalltalk.org K-Team Corporation www.k-team.com PC/104 Consortium www.pc104.org Books and papers: The Agora Software Implementation, Johannes Jansson, 2003 Squeak: Object Oriented Design (...), Mark J. Guzdial, 2000


The End: The End Any Questions ?