You are on page 1of 4

IDL - International Digital Library Of

Technology & Research


Volume 1, Issue 5, Mar 2017 Available at: www.dbpublications.org

International e-Journal For Technology And Research-2017

Subscription based control system to automate


management of events for robots
Shruthi S
dept. of Computer Science and Engineering
CMRIT
Bangalore, India
e-mail : deepikaelectric@gmail.com

Abstract and client essentially is any device which connects to server


through the set of APIs
In Industrial Robots, a human machine interfaces (HMI) provide forming a full fledged Web Service. These services can be
means to command and control robots for various purposes. operated via various clients.
Generally, this is implemented in a reactive manner by using
polling (or pull) methodology to manage the events. This
Multiple bots can be manipulated by a single controller.
methodology restricts the possibilities of automation for reacting
to events thus requires a human operator to poll and react to the The prevailing operating framework use polling methodology
events based on the skill of the human operator. This sometimes to receive the events. Requirements for such HMI systems
causes non-optimal or wrong responses. This paper proposes a vary considerably depending on the application. Various
design methodology to dynamically tap the events using a different types of clients (REST, HMI devices, touchscreen
subscription based control system for event based management control systems, laptops, desktop PCs, etc.,) provide user-
of robots. This design enables the client to be light-weight, cost friendly interfaces and generally very familiar to users.
effective and makes the responses more reliable. The paper also
scrutinizes the alternative design options using semantic web for
multirobot coordinative activities.

Keywords- Human Machine Interface (HMI); polling;


subscription

I. INTRODUCTION
Robots play a pivotal role in improving the quality of the
work in a shorter time period by optimizing the costs and
quality yielding success. An industrial robot is a mechanical
system with a robot manipulator and a controller. It is an
intelligent agent that perceive inputs from the percepts and
send back the response actions through actuators. The behavior
of the robot agent is specified through agent function, which
maps the percepts to the response actions. Designing an
interface to a live robot agent is a complex engineering process, The Model View Controller architecture isolates the
hence online programming is used widely in product Business logic, HMI display and context based control from
development industries to mimic the actual hardware. each other to synchronously interact with each other.
1. View Component including the Icons, menu structure
II. EXISTING SYSTEM and the key handlers.
The communication between client and server is witnessed 2. Model component include analytic/domain knowledge
based on a specified analytic model, programmed in the for each context selected through keypress which corresponds
software. The server being Robot controller(Real/Virtual) its specific command.

IDL - International Digital Library 1|P a g e Copyright@IDL-2017


IDL - International Digital Library Of
Technology & Research
Volume 1, Issue 5, Mar 2017 Available at: www.dbpublications.org

International e-Journal For Technology And Research-2017


3. Robot Controller(Real/Virtual)- Server Module which Current design of the system is command based. On
responds to the command requested by Client HMI. demand basis client has to request (send a command GET) to
Pitfall associated with polling method is, dynamic response the server to retrieve/poll for any response. In long polling
cannot be expected for any event at server. technique, the client wait for a predefined time to hear from the
server. The reflex action for any request is completely
Communication API : The reliable communication is deterministic, based on the case specific analytics defined for
ensured by, HTTP, the Application layer protocol which is the system.
placed over TCP/IP layered architecture.
Server : Hosted on a particular port configured and listens III. PROPOSED SYSTEM DESIGN
to the client requests. The server module internally implements The envisaged system proposes a subscription based system
message passing and parsing in the stub which receives the developed using websocket which provide client effective, less
client requests and de-serialize the message, un- marshall it and expensive and hastlyfree access. The new design is similar to
dispatch the message to the appropriate control module. existing functionalities, but capable of controlling the robot
Clients : Real /Virtual manipulator stubs, which conceal with light weight design. The concepts which are already
the code for compiling and linking(locating the server, existing in the system is effectively utilized/reused to suit the
formatting the command, communicating to server module, requirements of the current work.
wait and receive the response from server).

Subscription Sequence

Command Based Polling Communication API: HTTP based on architectural style


REST providing reliable communication
Client : Send the request through client stub with
websocket connection.
Server : Send the response through server stub over
websocket connection.
Server Response Representation : Web Services supports
two type of representation: XML and JSON. XML is the
default representation. All resources in Web Services follow
the same pattern. When returning XML, the XML is in
accordance with the XHTML syntax, which uses the XHTML
elements.
Subscriptions : A client should first create a subscription
by specifying the resources of interest via HTTP POST request.
Once the subscription is created, the client can establish a web
Command Based Long Polling socket connection to receive updates on the subscribed

IDL - International Digital Library 2|P a g e Copyright@IDL-2017


IDL - International Digital Library Of
Technology & Research
Volume 1, Issue 5, Mar 2017 Available at: www.dbpublications.org

International e-Journal For Technology And Research-2017


resources. with python version above 3 (3.4 and 3.5 used for current
testing).
The server side socket should include and support the
websocket module which can be downloaded from [8] (The
server compatible to the client version). The installation steps
can be referred from [9] using pip. Essentially the controller
component contains the server websocket enabler modules.
The client implementation vary depending on the
requirement and technology used for development.
One solution is to use Directly the client libraries like
POCO C++ Libraries that can be sourced and used from
opensource for C++ development [10]. It is a foundation
library which builds an abstraction layer containing huge utility
The above diagram is the Subscription Based System classes and stream classes. These libraries can either be built
proposed. from the command line or visual studio .net. Advantage of
using the library is that it is easy to develop and time to market
The service on a query will be responded by server over value is high if used in product development. The pitfall is that
the architectural style REST. The structured components of the it makes the design more complex and its heavy in terms of
system makes the system itself well or organized. memory if a small feature has to be used for any light weight
The subscription module opens up bidirectional connection client.
from HMI client to the Controller and break down if either one Another alternative is to use a light weight library at client
is not functioning. Connecting software with hardware can be side supporting the websocket like "libwebsockets C library"
solved by using industry standard APIs and SDKs through sourced from [11]. Advantage is the light weight library can be
which the windows program communicates with industrial used for light weight client development with a minimal
hardware devices. Proprietary tools are used for the virtual development time.
system creation.
Once the client and server spike solutions are ready,
IV. IMPLEMENTATION TECHNIQUE implement the best possible alternative by enhancing the
existing model to websocket based framework.
The server listen to clients on a standard port (say port 80
for http requests). Client sends a POST command to server
V. FUTURE EXTENSION
specifying the resources for which it expects the automatic
response. The RESTful client can send request through the The subscription model can be appended with the semantic
browser using the application layer HTTP protocol. The web concept which can be used for coordinated and
fundamental elements of HTTP protocol are the HTTP verbs - collaborated actions of robot.
GET,POST,PUT,DELETE. Thus Controller return response
The knowledge learning systems like RoboDB gathers
back through these verbs in XML or JSON format. response actions from various robots. And the same knowledge
For a new HMI client to utilize the websocket module, up- base can be integrated with the current framework at the server
gradation of socket type is essential. The resources for which end (central server for numerous clients) [1].
subscription is an asynchronous request from client where
In a multi robot operating environment [4], the task is
progress of the event is continuously monitored by an explicit
distributed among various robots and by executing the task
GET request from client. Thus, for the above set up HTTP executed by each robot, the entire action can be executed as a
protocol maintains session information through the cookies. whole. The co-ordination among the robots can be established
The cookies preserve the <name, value> pair over multiple by event based actions controlled at server end. When robot 1
Http requests. The proposed implementation stores the
completes its assigned task invokes a command and the robot
sessionId information in the cookie (instead of the entire which would have subscribed for the robot 1' s completion, will
information) and through that ID, retrieves the information
kick start automatically when the corresponding event/flag is
from server. A spike solution can be found at [5].
signaled. Similarly, after robot 2 completes, signals the
A sample REST client can be downloaded from [6] and successive collaborative actions which are controlled using the
used as the reference for debugging. A full-fledged python Semantic Web Service Ontologies. These Semantic web
client can be downloaded from [7] by following the steps service combines processes from one or more robots thus
mentioned. It is to be noted that websocket module can work automating multiple programs/processes to work in a
collaborative fashion.

IDL - International Digital Library 3|P a g e Copyright@IDL-2017


IDL - International Digital Library Of
Technology & Research
Volume 1, Issue 5, Mar 2017 Available at: www.dbpublications.org

International e-Journal For Technology And Research-2017


VI. CONCLUSION

The project finds its importance if it gets implemented for


the industrial robots which are currently getting operated with REFERENCES
polling functionality. The proposed module would provide
organizational success by being light weight HMI for
controlling the robot. The design considerations make the [1] Alex Juarez, Jun Hu, and Loe Feijs RoboDB: an application of
Semantic Web Technologies to robotics
system extensible and reuse the existing code and making the
[2] David Obdrzalek on Usage of real-world robotics in Semantic Web.
design cost effective.
[3] Zhengjie Fan1, Elisa Tosello2, Michele Palmia3, and Enrico Pagello2 on
, Applying Semantic Web Technologies to Multi-Robot Coordination
ACKNOWLEDGMENT [4] Yuichiro Mori, Yuhei Ogawa, Akatsuki Hikawa, and Takahira
Yamaguchi on , Multi-robot Coordination Based on Ontologies and
I am highly indebted to my Mentor and Project guide, Semantic Web Service
Principal and Professor, Computer Science and Engineering of
[5] https://docs.python.org/2/library/cookie.html
CMRIT, Mr. Sanjay Chitnis , Ph.D. (IISc) for their constant
[6] https://github.com/wiztools/rest-client
guidance and supervision as well as for providing necessary
[7] https://pypi.python.org/pypi/websocket-client
information regarding the work undertaken.
[8] https://pypi.python.org/pypi/websocket-server/0.4
[9] https://wiki.python.org/moin/CheeseShopTutorial
[10] https://pocoproject.org/
[11] https://libwebsockets.org/lws-api-doc-master

IDL - International Digital Library 4|P a g e Copyright@IDL-2017