ebook img

Improving the lifecycle of robotics components using Domain-Specific Languages PDF

0.63 MB·English
Save to my drive
Quick download
Download
Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.

Preview Improving the lifecycle of robotics components using Domain-Specific Languages

Improving the lifecycle of robotics components using Domain-Specific Languages A. Romero-Garce´s, L.J. Manso, Marco A. Gutie´rrez, R. Cintas, P. Bustos * RoboLab, Computer and Communication Technology Deptartment, University of Extremadura, Ca´ceres, Spain. [email protected] Abstract—Thereiscurrentlyalargeamountofroboticssoft- Model-Driven Architecture (MDA) [4]. This methodology 3 ware using the component-oriented programming paradigm. keeps the system specification (model) separated from the 1 However, the rapid growth in number and complexity of com- 0 system implementation. MDA models are structured by lay- ponentsmaycompromisethescalabilityandthewholelifecycle 2 ers with different levels of abstraction. With this structure, ofroboticssoftwaresystems.Model-DrivenEngineeringcanbe n usedtomitigatetheseproblems.Thispaperdescribeshowusing we can build platform-independent models (PIM) which a Domain-Specific Languages to generate and describe critical provide high-level designs, and platform-specific models J partsofroboticsystemshelpsdeveloperstoperformcomponent (PSM) which contain those elements that depend on the 5 managerial tasks such as component creation, modification, final system implementation. Transformations from PIM to 2 monitoringanddeployment.FourdifferentDSLsareproposed PSM are described in MDA so developers can obtain their inthispaper:i)CDSLforspecifyingthestructureofthecompo- ] nents,ii)IDSLforthedescriptionoftheirinterfaces,iii)DDSL low-level designs from high-level ones. Languages in MDA O for describing the deployment process of component networks are called meta-models and are described using a common R and iv) PDSL to define and configure component parameters. root meta-metamodel: the Meta Object Facility (MOF) [5]. Their benefits have been demonstrated after their implemen- The main advantage of MOF is that, once metamodels have . s tation in RoboComp, a general-purpose and component-based been created, developers can benefit from model to model c robotics framework. Examples of the usage of these DSLs are [ shown along with experiments that demonstrate the benefits transformations (M2M) or model to text transformations they bring to the lifecycle of the components. (M2T) to obtain source code in an automatic way. 1 In this paper we describe the introduction of MDAs v I. INTRODUCTION 2 conceptsinthedesignoftheRoboComproboticsframework 2 Much effort has been placed in developing tools that [6]. RoboComp is a component-oriented framework built 0 provide better software reusability and scalability. When around a component model, a communications middleware, 6 it comes to robotics software, the need for these tools is a repository structure and a set of tools used for develop- . 1 even higher due to the multidisciplinary and heterogeneous ing and deploying components. After six years of steady 0 nature of the programs that are built. Component-oriented development, the repository holds more than one hundred 3 programming, which to some point can be seen as an components, covering functionalities of different robotics 1 extension of object-oriented programming, is a promising and artificial vision topics. However, the original design : v direction towards achieving these goals. Components are of the framework, which is not MDA-oriented, presented i X software modules -usually standalone programs- providing several problems related to the life-cycle of the components. an interface for interaction with other components. This Our group has identified and tracked those issues of the r a structure makes them a more autonomous and reusable components life-cycle that where responsible for most of concept than classes. However, components have a lifecycle non-productivedevelopingtime.Theseissuescanbegrouped that can become quite complex, especially in robotics envi- in two classes: those related to code development, and those ronments [1][2]. The lifecycle of a component includes all relatedtodeployment.Maincodingissuesarethecreationof commonactivitiesthatarepresentduringthelifecycleofany newcomponents,additionanddeletionofproxiestoexisting program:requirementsanalysis,design,implementation,unit components and modifications in the interface definitions. testing, system integration, verification and validation, oper- Deployment issues are mainly due to wrong values in the ation support, maintenance and disposal. However, due to configuration parameters of the components and unresolved the ever-changing requirements typical of robotics software, dependencies among them. In Section III more details are the lifecycle of robotics components is extremely active. To presented that justify the need for redesigning specific parts help developers in these tasks, specific tools are required. of the RoboComp architecture. Model-Driven Engineering has proven to mitigate this At the end, all these issues come from the need to situation [3]. In particular, it is worth noting the OMGs manually rewrite parts of the components that could be automatically modified. This process is readily prone to *This work has been partially supported by project TSI-020301-2009- errors if done by humans. The solution adopted was to 2 funded by the Spanish Government and Feder funds, by the Junta de ExtremaduraprojectsIB10062,PRI09A037,PDT09A59andPDT09A044 redesign the component model, dividing it in two different parts: a generic one generated automatically from DSLs, algorithms(algorithmic view).Twoof theseviews arebased and a specific one written by the user. Four domain-specific on UML [12]: 1) the coordination view uses a simplified languages (DSLs) have been created as part of the new version based on UML state machines in order to model design: first, a Component Description Specific Language the different states of a component and 2) the algorithmic -CDSL- for describing the main characteristics of the com- view, based on UML activity diagrams, executes a specific ponents; second, an Interface Description Specific Language behavior depending on the current state of the component. -IDSL- to specify component interfaces independently of The structural view is used to define components and their theunderlyingcommunicationsmiddleware;third,aDeploy- dependencies by specifying both its required and provided ment Description Specific Language -DDSL- to describe the interfaces. Once users model the system using these three deployment process of robotic components networks; and views, it is possible to perform M2M to reduce the level of finally, a Parameter Description Specific Language -PDSL- abstractionandM2Ttransformationstoautomaticallyobtain todescribetheconfigurationparametersandtheirvalues,that the final source code. determine the run-time behavior of the components. The SmartSoft [13] robotics framework also provides an The rest of the paper is organized as follows. Section II MDA tool based on a UML profile implementation. The provides an overview of the related works. Section III development process starts modeling an idea at a high-level introduces the RoboComp framework and why it was found of abstraction. This model is then refined through several necessary to incorporate DSL technologies to it. Next, the transformations to obtain the software components source RoboComp Domain-Specific Languages are described in code. First, developers have to describe the system in a section IV. Finally, the case study and the conclusions are model independent platform (PIM) where information about detailed in sections V and VII, respectively. middleware, operating system, programming languages and other properties are unknown. Then the PIM is transformed II. RELATEDWORK to a platform-specific model (PSM), where details about Software development for robots can benefit from the use middleware or operating systems are specified. This PIM is of MDA-based tools. The CoSMIC visual toolkit [7] is an alsotransformedtoaplatform-specificimplementation(PSI) interesting example of this. It is a complete open source where developers can add their code and libraries. The next MDA tool that allows the visual design, deployment and stepistodeploythecomponents.InthisveinSmartSoftuses configuration of components based on the CORBA Com- the platform description model (PDM) to define the target ponentModel(CCM)[8].However,CCManditsassociated platformproperties.Themodelisextendedwiththisplatform specificationsarenotwidelyused.Inspiteofthat,theOMG information and finally the system can be run following aims at their future adoption within the robotics community the specified deployment model. During the development by standardizing its novel Robotic Technology Component processuserscanguidethetransformationsinordertoobtain Specification (RTC) [9], which focuses on the structural a specific component by selecting the desired real-time and and behavioral features required by robotics software as a QoS properties of the component and the communication supplement to a general component model. In this vein, it is middlewareitwilluse.Asetofwell-definedcommunication worthnotingOpenRTM-aist[10],afreeRTCimplementation patterns provides the necessary abstraction from the final that has appeared recently. OpenRTM-aist is a framework communicationmodelanditsreferenceimplementation.Cur- for robotics that provides developers with a set of tools rently,itsupportstheACE[14](SmartSoft/ACE)andACE/- to create and manage components. Two of these tools are TAO [15] (SmartSoft/CORBA) communication middlewares Eclipse-based GUI tools: RTBuilder and RTSystemEditor. andprovidesotherinterestingfeatures,suchasamechanism RTBuilder allows developers to create components defining to guarantee real-time properties using an external scheduler their names, connectors (ports), parameters, programming analyzer or dynamic wiring for components. language or their operating system. This tool can then Formanyyears,visualmodelingtools(suchasUML)have be used to automatically generate source code templates. beenusedtospecify,designanddocumentcompletesystems. RTSystemEditorprovidesamechanismtoeditandconfigure These visual paradigms are intuitive for users (analysts, components which are registered on a known name service. designers, etc) and are easier to understand for clients than RTSystemEditorcanstart,stoporresetcomponents,addand textual models. Despite these advantages, expert developers remove links and use introspection capabilities to monitor on a particular domain sometimes feel more comfortable components at run time. with textual representations, that allows them to build their Another interesting tool is the 3-View Component Meta- models as if they were working with common programming Model (V3CMM) [11]. It is a platform-independent model- languages. OpenRTM, V3CMM and SmartSoft also provide ing language for component-based applications that makes graphicaltoolstocreateandmanagevisualmodelsbutthese use of MOF-based metamodels. V3CMM provides three tools do not have the ability to use textual ones. Thus, views that are loosely coupled and allow users to design a we decided to create the DSLs as textual models because complete system. With V3CMM it is possible to model the they can be automatically exchanged with visual ones (i.e., static structure of components (named as structural view), developers can choose at any moment how to develop their the behavior of these components (coordination view) and systems,usingtextualorvisualrepresentations)andbecause tomodelthefunctionalityofthesecomponents,describedas its edition can also be assisted by the DSL editor (i.e., pointing to syntax and semantic errors). towards a middleware-independent framework, with several reference implementations. The first step in this direction is III. THENEEDOFDSLSINROBOCOMP the definition of an IDL that can act as a bridge between RoboComp is a distributed, component-oriented, tool- the IDLs of the final middlewares and RoboComp. This enhanced, robotics framework in development since new IDL provides a syntax for construction of data types 2005 [6]. RoboComp currently holds dozens of components and procedures that can be safely used inside RoboComp spanning a hardware abstraction layer, basic navigation code without relying on external dependencies of third party skills, SLAM, visual processing algorithms, planning, providers. manipulatorcontrol,3Dobjectrecognitionandmanyothers. Finally, the last source of repetitive errors is related to It is being used by several research groups and companies. the deployment of components. The two main reasons are As mentioned before, components are processes with wrong or inadequate configuration values and unresolved structured interfaces [1], [2]. Each component encapsulates dependencies found when deploying connected components. a specific functionality and can communicate with others, Mostofthefirsttypeoferrorscanbesolvedifconfiguration giving rise to complex behaviors sustained by their dynamic parametersaredescribedinamorestructuredway,including interactions. rangevaluesdefinitionandchecking.Moreover,theplanning Like other robotics frameworks, RoboComp provides a of a correct and safe deployment can be simplified if a wide set of tools aimed at reducing the required effort to structured description language is available, along with the perform everyday tasks, such as component creation, mod- necessary tools to orderly execute the involved processes. ification and deployment. When dealing with large graphs All these issues can be easily tackled by separating the of processes containing more than a few components (e.g., code that can be potentially generated automatically from when controlling mobile manipulators endowed with ex- the code produced by developers. This design choice makes pressive heads), the development team needs well designed possible to modify the generic properties of the components tools targeted at reducing the time wasted in common and without interfering with what was manually changed since repetitive errors. By these errors we mean those made when the creation of a component. Moreover, this isolation would insertingorchangingcodenotdirectlyrelatedtothebehavior facilitate the inclusion of new features that were previously of the component. To design useful tools and to improve not taken into account, such as the optional use of graphical the underlying architecture, the first step is to identify interfaces, internalstate-machines, auxiliary classesor third- error-prone tasks that could be automated or assisted. We party libraries. have identified five tasks as the most error-prone and time- consuming ones: IV. IMPROVINGROBOCOMPWITHDSLS 1) Creation of new components. We propose an MDA-based approach to mitigate the 2) Adding or removing proxies to existing components. problemspresentedintheprevioussectionprovidingahigher 3) Adding or changing existing data types or methods in levelofabstraction.Inparticular,ourapproachproposesfour interface declarations. DSLs: CDSL, IDSL, PDSL and DDSL. These DSLs enable 4) Errors in configuration parameters that determine the users to work with RoboComp components in an intuitive run-time behavior of the components. way, improving the management of their lifecycle. 5) Unresolved dependencies when deploying graphs of ThetoolsdevelopedforthispurposearebasedonEclipse, connected components. which provides a powerful framework for developing MDA- Although there were some tools and scripts written to basedtools.Inthisvein,wehaveusedthefollowingEclipse mitigatetheseissues,theylackedofthenecessarygenerality MDA based plugins: EMF [18] (Eclipse Modeling Frame- to adapt to the continuous evolution of the component work) which is a basic MOF implementation; Xtext [19] model. For instance, at some point, the model was modified which is a framework to create textual representations and so new components implemented a generic introspection notations from visual models and metamodels; and MOF- interface. This interface is served by an internal thread that, Script [20], which provides a template language to perform at start, reads and checks the configuration parameters and, M2T transformations. It was decided to work with textual afterwards, parsimoniously monitors the execution of the model representations because it allows developers to build working thread. These changes in the model are difficult their DSLs as they usually do when working with any to incorporate in the component creation scripts if they otherprogramminglanguages,textually,andswitchtovisual are designed as simple template transformation processes. models when necessary. Xtext is a recent tool that facilities Moreover,onceacomponentiscreated,introducingchanges the creation of new DSLs and provides some interesting and is even more difficult, specially when several versions of useful characteristics such as code completion, syntax error the components coexist in the system. Despite middleware- checking and syntax highlighting among others. Moreover, independency is underway [16], RoboComp currently uses its integration with EMF allows Xtext models to be repre- Ice[17]asitsmaincommunicationmiddleware.Iceisanex- sentedasGraphicalModelingFramework[21]visualmodels tremely robust RPC-oriented technology that supports a rich at any moment. variety of communication resources, including a push/pull These DSLs help developers to quickly understand the data-oriented mechanism. Our goal is to evolve RoboComp structure of a component, design it or even modify it at any time in its lifecycle. Along with the languages, some tools to take advantage of them have also been developed. The RoboCompDSLEditorprovidesuserswithanEclipse-based tool to create and manage the proposed DSLs and integrates MOFScript in order to generate code automatically. The componentmanager,namedRCControlManager,deploysthe necessary components using DDSL models. Section V will provide a case study covering all of the proposed DSLs and an experiment carried out to quantify the benefits of this technology in the developing time of RoboComp components. A. CDSL RoboComp provides both client/server and publish/sub- scribe communication models. In order to establish com- munication, components must perform different operations. Fig.1. DevelopmentprocessofCDSL,DDSL,IDSLandPDSL For example, if a component is required to perform remote calls to other components, its code needs to: a) include the definitionoftheproxyclassescorrespondingtotheinterfaces it is going to connect to; b) read from the configuration file how to reach the remote component; c) create the proxy object using the previously read configuration; d) provide the proxy object to the classes that will be using it. Similar scenarios exist when providing new interfaces, subscribing or publishing new topics (see [6] for more details). In RoboComp,thiscodeisautomaticallygeneratedbyaPython script when the component is created for the first time. However, until the adoption of MDA-based techniques, if the requirements of a component changed after its creation (a considerably common scenario), it had to be manually done. All these situations made it difficult to maintain several components because their source code depends on these Fig.2. StructureofRoboCompcomponents. parameters. To solve these problems, we have developed a DSL to create and modify component properties. This DSL is called Component Description Specific Language communication, the general structure of the components (CDSL) and allows users to create and maintain their (e.g., main program and threads, source directory structure, component descriptions from a textual model. CDSL files documentation rules or configuration parameters) and some contain information about communication parameters such introspection and self-monitoring capabilities. This generic as proxies, interfaces and topics used by the components, functionality is implemented with abstract classes that are their dependencies with external classes and libraries, the inherited and extended by the user-specific code to achieve optionalsupportofQtgraphicalinterfaces,theprogramming the final working component. Thus, a component can be languageofthecomponent,andanoptionalSCXMLfilepath divided in two parts by a line separating the generic from for embedding a state machine in the component. thespecific.Thespecificcomponentcodeisgeneratedbythe Figure 1 shows the development process to obtain the RoboComp DSL Editor only the first time, but the generic CDSL. First, a meta-model defining the CDSL entities and code is always generated when regeneration from CDSL theirrelationsiscreatedusingEMF.Thenitisautomatically models occur. This way, users can be sure that their specific translated to an Xtext grammar. Once the Xtext grammar code will never be deleted and, at the same time, they are is created, users can create their own CDSL models using abletomodifyanycomponentproperty.Thisorganizationis the RoboComp DSL Editor, which performs code genera- oneofthemostimportantdesigndecisions.Figure5provides tion using M2T transformations. Because components need an example of the RoboComp DSL Editor while modifying interfaces or topics to communicate with other components, a CDSL file. CDSL files can import data types, topics and interfaces The properties that are contemplated in CDSL are the defined in IDSL models (as shown in section IV-B). following: ThesourcecodeofthecomponentsgeneratedfromCDSL canbedividedintwoparts:thespecificandthegeneric(see • Component name. Figure2).Thegenericpartcontainsthelogicofinterprocess • InterfacesanddatatypesdefinedinexternalIDSLfiles. • Client/Server communication model: required and pro- representation language. The Deployment Description Spe- vided interfaces. cific Language was developed as the underlying language to • Publish/Subscribecommunicationmodel:topicsthatthe make this management task easier. component will publish or subscribe to. With DDSL, users are able to describe which components • Graphical interface support. will be used, where they should be executed and which • State machine support. configuration to use. This makes it possible to automatically • Dependences with external classes and libraries. deploy RoboComp components in a certain computer or • Programming language of the component. computer network. DDSL has been designed to simplify the system deployment and integration. Figure 1 shows the de- B. IDSL velopmentprocessoftheDDSL.ItisdefinedusinganEMF- based meta-model which is translated to an Xtext grammar. RoboComp used the Ice Interface Definition Language Once the Xtext DDSL grammar is created, developers can (Slice by ZeroC) to define component interfaces. This createandmanagetheirDDSLmodelsusingtheRoboComp language provides developers with a mechanism to cre- DSL Editor. ate structured interfaces regardless of the platform and In order to define a component network, the following the programming language. Unfortunately, this language is parameters have to be specified for each component: middleware-dependent,so,ifRoboComphadtobeintegrated with another middleware, all Slice files should be adapted. • Component: the CDSL file path of the component to Moreover, any change in the Slice language would require execute. modifying the RoboComp interfaces already defined. • Path to the executable file of the component. To solve these problems, we developed the Interface De- • IP address and port. scription Specific Language (IDSL). IDSL has been initially • Path to the configuration file. designed as a subset of the Slice features, mainly data types With the information in this file, all component depen- andproceduresdefinition,andavoidinginterfaceinheritance, dences can be precomputed. Thus, the DSL editor can warn to facilitate future transformations among third party IDLs. users of basic configuration errors while editing the file and Figure1showsthedevelopmentprocesstoobtaintheIDSL, prior to the actual deployment. whichissimilartoCDSL.FirsttheIDSLisdefinedusingan D. PDSL EMF-basedmeta-model.Thenthemeta-modelisimportedto Xtext to generate the IDSL language. Users can define their The Parameter Definition Specific Language provides a own interfaces using the IDSL language, which is integrated genericstructurefortheconfigurationparametersthatdefine intheRoboCompDSLEditor.Finally,theycangeneratethe the run-time behavior of the components. This DSL guides specificIDLusingthecodegeneratorwhichisalsointegrated developers in writing the necessary configuration files in a intheRoboCompDSLEditor.Figure9providesascreenshot standardized way within the framework. The file format that oftheRoboCompDSLEditorwhilemodifyinganIDSLfile. was previously used lacked of hierarchical structure, being Currently, IDSL supports the following features: just a list of <attribute,value> pairs. When a component • Interfaces and topics definition. requiredanestedrelationofparameters,suchasalistoflists, • Basic data types, such as integer and real numbers or the component had to parse the corresponding configuration strings. string. Figure 3 -particularly its last two lines- provides an • Enumerated types. example of this situation. • Customstructuresanddatatypessuchassequencesand maps. # Endpoint JointMotorComp.Endpoints=tcp −p 10067 • Exceptions. # Parameters JointMotor.NumMotors=2 C. DDSL JointMotor.Handler = Dunkermotoren JointMotor.Device = /dev/ttyUSB0 Components are independently executed programs that JointMotor.BaudRate = 115200 interact with each other. When using a component-oriented JointMotor.BasicPeriod = 220 # Motor: name,id ,invertedSign ,min,max,zero ,vel robotics framework, a robotic software system is composed JointMotor.M0 = dunker0 ,A,true ,−3.14,3.14,0,.9 ofseveralinterconnectedcomponents,representingacompo- JointMotor.M1 = dunker1 ,B,true ,−1.7,1.7,0,.9 nent network. These components can be executed manually, but as the number of components grows, it becomes in- Fig. 3. Example of the structureless configuration file format used creasingly difficult to manage them appropriately. Robots of previouslybyRoboComp. middle complexity (e.g., mobile robots equipped with stereo heads)andhighcomplexityrobots(e.g.,mobilemanipulators WithPDSL,theconfigurationparameterscanbeorganized with expressive heads) are controlled by graphs containing in nested lists and the editor can check that the introduced dozens of components running on several computers. The values are within the predefined ranges. After the code gen- configuration and management of these networks of pro- eration process, the component can access the configuration cesses suggest the combination of a graphical tool and a informationbyusingmethodsdefinedinthegenericclasses. Fig.4. DefinitionoftheparametersusingthePDSL Fig. 5. Screenshot of the RoboComp DSL Editor while modifying the CDSLmodelinthecasestudy. This way, the programmer can safely access and modify the configuration values, according to their predefined value ranges. Figure 1 shows the development process of the PDSL. The dotted lines show that it is work in progress. Currently, PDSL supports the following parameter types: • Component: the CDSL file path of the component to execute. • Basic data types, such as integer, booleans and real numbers or strings. • Enumerated types. • List types and nested lists. • Default values. • Optional variables. • Rangeofpossiblevaluesofbasicandenumeratedtypes. Fig. 6. Screenshot of the RoboComp DSL Editor while modifying the V. CASESTUDY PDSLmodelinthecasestudy. This section presents a real case study in which three common situations in component-oriented development are • Add a new entry in the Deployment Definition file to presented:theinclusionofanadditionalproxyinanexisting include the component MouthComp. component, the insertion of a new configuration parameter • Optionally, add a new method in the interface of andtheinclusionofanewmethodintoanexistinginterface. SpeechComp to activate/deactivate in run-time the Thesesituationsareframedinthefollowingroboticcontext: mouth synchronization. starting with a speech synthesis component, the goal is The first step to introduce an additional proxy to the to communicate it with another component that controls Speech component is to change its CDSL file (i.e., the file a robotic mouth. The final configuration should be able describing the generic properties of the component). This to synthesize text and to move the mouth synchronously. canbedoneusingtheRoboCompDSLEditor(seeFigure5). Figure 8 shows all the components involved as seen from Afterre-generatingthegenericcode,thespecificclasseswill the RCControlManager deployment utility. As introduced in automatically have access to the new proxy (no changes in section III, before making RoboComp DSL-based, to com- the specific classes are needed for it). plete these changes it was required to make several changes AftermodifyingtheCDSLfile,andonlyiftheconnection in the source code manually. In this section we will show to the Mouth component is going to be optional, the PDSL how the use of DSLs reduces the time to introduce these file must be updated to include the corresponding variable. changes, avoids unwanted errors in the code and improves In this case, we created a new boolean parameter named the user experience. The steps required to perform all the mouthSynchronization as shown in Figure 6. modifications are: Once the code has been re-generated and the Speech- • ModifytheComponentDescriptionfiletoincludeanew Comp configuration parameters have been configured, the proxy to MouthComp. component is ready to work. However, since it depends • Include a new parameter in the Parameters Definition on the execution of MouthComp, this component must be file of SpeechComp to specify if the connection to previously executed. Deployment can be done manually, but MouthComp will be used. itisahardtaskwhenthecomponentnetworkiscomposedof Fig. 7. Screenshot of the RoboComp DSL Editor while modifying the Fig. 9. Screenshot of the RoboComp DSL Editor while modifying the DDSLmodelinthecasestudy. IDSLmodelinthecasestudy. Dependencesmaybeassignedbydraggingnodesovertarget nodes. Deployment files are created very quickly using this technology. Even though it may not be actually necessary, the devel- opermightwanttoincludeanewmethodintheSpeechComp interface in order to activate/deactivate the synchronization with the robotic mouth on-line. In this case, there are three steps to take: a) use the RoboComp DSL Editor to include the line corresponding to the new method (see Figure 9); b) re-generate the IDSL file in order to obtain the new IDL implementation; c) re-generate the SpeechComp CDSL to include the new function in the generic code. It is very important to note that this is the only step in which users need to modify the specific code manually. VI. EXPERIMENTALRESULTS Fig.8. ScreenshotoftheRCControlManagertool.Thethreecomponents involved in the component network are shown. Once the user requests to An experiment was conducted in order to provide em- runtheSpeechcomponent,itsdependenciesareautomaticallysatisfied. pirical evidences supporting the claims made in the pa- per. Twelve roboticists who were already familiar with the framework were asked to perform five of the most com- more than a few components. The RoboComp DSL Editor mon repetitive tasks they have to face when developing can be used to specify different deployment scenarios. In and managing robotics components. In particular, they were this case the network is composed by only three com- asked to make the following changes and operations with ponents: SpeechComp, MouthComp and JointMotorComp an existing robotics component: a) to create a new proxy (which is a dependence of the MouthComp component). for a given interface; b) to make the component provide a RCControlManager, the component manager of RoboComp, new additional interface; c) to include a new method in the takes the DDSL file as input and manages the execution of previous interface; d) to include a new library and a new the components and the dependencies among them. class in the component project; and e) to deploy a small Figures 7 and 8 provide screenshots of the RoboComp component network. DSL Editor while modifying the previous DDSL file and In order to be able to evaluate the benefits of the pro- the RCControlManager tool, respectively. posedapproach,theexperimentswereperformedtwice:first, RCControlManager reads the deployment file and gener- using the DSL technology and then, without it. For all the ates a visual graph. Components are shown as nodes and experiments two variables were measured: the time spent component dependencies as edges. Moreover, the deploy- performing the task and the lines of code written. In the ment file can be generated or modified graphically using case of the last task (deploying a component network), the this tool. When a new host is added, RCControlManager number of commands executed where measured instead of checks for the availability of any known component in that the lines of code written. machine and shows them in a list. A deployment configura- Thedataobtainedfromthetimeemployedandthelinesof tion is visually created dropping components from this list. code written is displayed in figures 10 and 11, respectively. Fig.10. Graphshowingthecorrespondingboxplotsforthetimesassociated Fig.11. Graphshowingthecorrespondingboxplotsforthelinesofcode with the five experiments. For each experiment E.n, it is shown the time associated with the five experiments. For each experiment E.n it is shown spentwithandwithoutusingtheDSL(beforeandnow,respectively). thelinesofcodewrittenwithandwithoutusingtheDSL(beforeandnow, respectively). Measurement data is represented as boxplots containing all measurements ranging between the first and third quartiles. a) for specifying general component properties (CDSL); Thelocationofthemedianofthemeasurementsisindicated b) for defining component interfaces (IDSL); c) for the byaredlinecrossingtherectanglevertically.Measurements deployment of components (DDSL); and d) to define and outside the box are considered outliers and are drawn using initialize component parameters (PDSL). green diamonds. Figure 10 shows the results regarding the time spent in CDSL allows components to be created and modified the experiments. It is worth mentioning that the only time even into different languages. It reduces the workload, so taken into account was the one in which the subject was developers can center their effort in the implementation typing code, not thinking. Since users need less time to of the behaviour of the components they are developing. think when using DSLs (i.e., there is no need to think IDSL is a first step to make RoboComp independent not which code pieces should they change) this plays against only of the architecture and the programming language, the use of DSLs. Inspite of this, it can be seen how using but also of the middleware. DDSL eases the deployment the DSL approach shorter times were achieved for all of the stage of the lifecycle of the components. It describes a experiments performed. network of components and their dependencies, as well Figure 11 shows the results regarding the lines of code as where and how should they be executed. This allows written while performing the experiments. As happened RCControlManager, the component manager of RoboComp, with time, the figure shows that, using the DSL approach, torunacomponentnetworkwithjustamouseclick.Finally, fewer lines of code were written for all of the experiments PDSLprovidesameanstostoretheconfigurationparameters performed. This is not a surprise, since small changes in the of the components in a structured and less error-prone way. DSLs might involve many changes in the generated code. TheseDSLshavebeenusedontheRoboCompframework Theonlyexperimentinwhichnoconsiderableimprovements toimproveitsflexibility,scalabilityandmaintenance,making were achieved (only a few seconds) was the experiment it possible to create and manage components in a higher number3.Thisisbecausetheframeworkwasalreadymaking level of abstraction. Moreover, developers can benefit from use of CMake features for the operations involved in the M2MandM2Tinordertoperformtransformationsbetween experiment, so the initial number of lines to modify was modelsandobtainthefinalsourcecodeautomatically.These already low. DSLs have been developed as textual models in order to reduce the development time, although they can be used in VII. CONCLUSIONSANDFUTUREWORKS conjunction with visual models. A. Conclusions All the software described in this paper is freely ThispaperhaspresentedfourDSLsbasedontheMDAap- available for download from the RoboComp site: proachusedtoimprovethelifecycleofroboticscomponents: http://robocomp.sf.net/DSLRob2011. B. Future Works [6] L.J. Manso, P. Bachiller, P. Bustos, P. Nun˜ez, R. Cintas and L. Calderita.”RoboComp:aTool-basedRoboticsFramework”.InProc. One of the limitations of many current robotics frame- of Int. Conf. on Simulation, Modeling and Programming for Au- works is that they are middleware dependent. Thus, compo- tonomousRobots,pp251-262.2010. nents can only communicate with those built using the same [7] D. C. Schmidt, A. Gokhale, B. Natarajan, S. Neema, T. Bapty, J. Parsons,C.Hall,A.NechypurenkoandN.Wang.”Cosmic:AnMDA framework or, in some cases, those using the same mid- GenerativeToolforDistributedReal-timeandEmbeddedComponent dleware. Although there are some efforts towards building MiddlewareandApplications”.InInformationSciences,pp.300-306. bridgesbetweenframeworks,itisnotclearhowthesebridges 2002. [8] R. W. Claus, N. Wang, D. C. Schmidt and C. ORyan, ”Overview will provide all the necessary functionality. To overcome of the CORBA Component Model”. In Component Based Software this limitation, efforts are currently being made towards EngineeringPuttingthePiecesTogether,pp1-16.2011. achieving middleware-independence and rely, instead, on [9] Object Management Group. ”Robot Technology Component Specifi- cation”.InTechnology.2008. different reference implementations. [10] N.Ando,S.Kurihara,G.Biggs,T.SakamotoandH.Nakamoto.”Soft- Despitethepowerfulcomponentandconfigurationmodels ware Deployment Infrastructure for Component Based RT-Systems”. provided by RoboComp, its wide adoption could be com- InJournalofRoboticsandMechatronics.Vol.23,no.3,pp.350-359. 2011. promised if it does not fit well the stringent real-time and performance requirements of a distributed real-time embed- [11] D. Alonso, C. Vicente-Chicote, F. Ortiz, J. Pastor and B. lvarez ”V3CMM: a 3-View Component Meta-Model for Model-Driven ded system. In this sense, transparent support for DDS [23] RoboticSoftwareDevelopment”.InJournalofSoftwareEngineering (OMG’sDataDistributionServiceforReal-Timesystems)is forRobotics,pp.3-17.2010. underway and initial encouraging results have already been [12] ObjectMangementGroup.”UnifiedModelingLanguage”.InHistory, pp2921-2928.2011. published[16].Thisstandardaddressestheneedforreal-time [13] C.Schlegel,A.Steck,D.BrugaliandA.Knoll.”DesignAbstraction andqualityofservicefeaturesindistributedapplicationsand andprocessesinRobotics:FromCode-DriventoModel-DrivenEngi- isbeingadoptedinmissionandbusiness-criticalapplications, neering”.InIn2ndInternationalConferenceonSimulation,Modeling andProgrammingforAutonomousRobots.2010. such as air traffic control, telemetry or financial trading [14] D. C. Schmidt and S. Huston. ”C++ Network Programming Volume systems. 2: Systematic Reuse with ACE and Frameworks”. Addison-Wesley. Another improvement we are working on is the hierar- 2003 [15] D. C. Schmidt, A. Gokhale, T. H. Harrison, D. Levine, and C. chical representation of groups of components. In ongoing Cleeland.”Tao:ahigh-performanceendsystemarchitectureforreal- work, one component is automatically created to act as a timecorba”.InCommunicationsMagazine,IEEE.1997. proxy for all incoming communications to the group. This [16] J.Martinez,A.Romero-Garces,L.MansoandP.Bustos.”Improving aroboticsframeworkwithreal-timeandhigh-performancefeatures”. rearrangement makes a group of components appear as a InProc.ofInt.Conf.onSimulation,ModelingandProgrammingfor singleonetotherest,atthecostofacertainincreaseindelay. AutonomousRobots,pp263-274.2010. Webelievethisadditionallevelofabstractionisnecessaryto [17] M. Henning and M. Spruiell. ”Distributed Programming with Ice”, ZeroC.2009. handle dozens of running components, a common situation [18] D. Steinberg, F. Budinsky, M. Paternostro and E. Merks. ”EMF: in future complex robotic scenarios. Eclipse Modeling Framework”. In Addison-Wesley Professional, pp. 7442008. REFERENCES [19] S.EfftingeandM.Vlter.”oAWxText:AframeworkfortextualDSLs”. InInEclipseconSummitEurope.2006. [1] D.BrugaliandP.Scandurra.”Component-basedRoboticEngineering. [20] J. Oldevik. ”MOFScript Eclipse Plug-In. Metamodel-Based Code PartI:Reusablebuildingblocks”.InIEEERoboticsandAutomation Generation”.InEclipseTechnologyWorkshop.2006. Magazine.2009. [21] GraphicalModelingProject.”GraphicalModelingFramework”.Avali- [2] D. Brugali and A. Shakhimardanov. ”Component-based Robotic En- gineering. Part II: Models and systems”. In IEEE Robotics and ableathttp://www.eclipse.org/modeling/gmp/.2011. AutomationMagazine.2010. [22] D. C. Burnett, J. Carter, J. Barnett, M. Bodell, R. J. Auburn and R. [3] DouglasC.Schmidt.”Model-DrivenEngineering”.InIEEEComputer Alkolkar. ”State Chart XML (SCXML): State Machine Notation for Magazine,vol.39,no.2,pp.25-31.2006. ControlAbstraction”. [4] A. W. Brown ”Model Driven Arquitecture: Principles and practice”. [23] Object Management Group. ”Data Distribution Ser- InSofwareandsystemsmodeling,pp.314-327.2004. vice for Real-time Systems (DDS)”. Available at [5] ObjectManagementGroup.”Meta-ObjectFacility(MOF)CoreSpec- http://www.omg.org/technology/documents/ddsspeccatalog.htm. ification”.Availableathttp://www.omg.org/mof/.2010. 2007.

See more

The list of books you might like

Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.