WO2014061516A1 - Method and device for generation of conversion module linking between different robot middleware types - Google Patents

Method and device for generation of conversion module linking between different robot middleware types Download PDF

Info

Publication number
WO2014061516A1
WO2014061516A1 PCT/JP2013/077419 JP2013077419W WO2014061516A1 WO 2014061516 A1 WO2014061516 A1 WO 2014061516A1 JP 2013077419 W JP2013077419 W JP 2013077419W WO 2014061516 A1 WO2014061516 A1 WO 2014061516A1
Authority
WO
WIPO (PCT)
Prior art keywords
file
functional element
source code
middleware
ros
Prior art date
Application number
PCT/JP2013/077419
Other languages
French (fr)
Japanese (ja)
Inventor
慧 岡田
斎藤 学
雅幸 稲葉
Original Assignee
国立大学法人東京大学
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 国立大学法人東京大学 filed Critical 国立大学法人東京大学
Publication of WO2014061516A1 publication Critical patent/WO2014061516A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/541Interprogram communication via adapters, e.g. between incompatible applications
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code

Definitions

  • the present invention virtualizes a program running on one middleware for interoperating robot middleware of different standards so that it can be controlled and communicated on another middleware.
  • the present invention relates to a technique for generating a conversion module called a bridge for converting information.
  • Such robot middleware is a technology for componentizing robot components (actuators and sensors) and robot control software as functional component modules. Simply combine the functional component modules according to the application.
  • Various robots can be developed. For example, in OpenRTM-aist, an OpenRTM project, when creating a robot system, a program is created for each functional element module (RTC: RT component) and the robot system is constructed by connecting RT components.
  • RTC RT component
  • the present invention provides a bridge module automatic generation method and apparatus based on analysis of middleware to be interoperated.
  • the technical means adopted by the present invention are: Method for automatically generating a conversion module for linking between a first middleware having a set of first-type robot functional element modules and a second middleware having a set of second-type robot functional element modules Because Analyzing a first interface definition of a first type robot functional element module to generate a second interface definition of a second type robot functional element module and an inter-middleware conversion source code; Using the second interface definition and the source code to generate a conversion module; Automatic generation method with Apparatus for automatically generating a conversion module for linking between first middleware having a set of first type robot functional element modules and second middleware having a set of second type robot functional element modules Because Means for analyzing a first interface definition of a first type robot functional element module and generating a second interface definition of a second type robot functional element module and an inter-middleware conversion source code; Means for generating a conversion module using the second interface definition and the source code; Is an automatic generation device.
  • the present invention is realized by cooperation between a computer (including an input unit, an output unit, a calculation unit, a storage unit, a display unit, etc.) as hardware and software that causes the computer to execute a predetermined function.
  • Files or programs are stored in a storage unit of one or more computers.
  • the present invention relates to a conversion module that cooperates between a first middleware having a set of robot function element modules of a first type and a second middleware having a set of robot function element modules of a second type. Is automatically realized as a computer program for causing a computer to function as a predetermined means.
  • generating the conversion module comprises: The source code; Source code generated from the first interface definition; Source code generated from the second interface definition; Is used to generate a conversion module.
  • the interface definition file is defined for each middleware, and is an IDL file in OpenRTM, and a message file and a service file in ROS. It is understood by those skilled in the art that other middleware also has interface definition files corresponding to these, and can be processed using these.
  • the “source code generated from the first interface definition” is “message file / service file generated by ROS compiler (ROS message service compiler) .py” in the flowchart (ROS ⁇ RTM) shown in FIG. 1A. In the flowchart (RTM ⁇ ROS) shown in FIG.
  • IDL is processed by an IDL compiler. Cpp, .h”.
  • the “source code generated from the second interface definition” is “IDL message generated by IDL compiler .py” in the flowchart (ROS ⁇ RTM) shown in FIG. 1A, and the flowchart (RTM ⁇ ROS shown in FIG. 1B). ) “Cpp, .h generated by processing a message file / service file with a ROS compiler (ROS message service compiler)”.
  • the input / output of the first type robot functional element module is defined by the first interface definition before executing the program of the first type robot functional element module, and the analysis Performed before program execution.
  • This is a so-called offline conversion method, in which a first interface definition file (for example, component IDL file) of a robot function element module is analyzed, and a corresponding second interface definition file (node message file, service file) is obtained therefrom.
  • a first interface definition file for example, component IDL file
  • a second interface definition file node message file, service file
  • the first middleware is OpenRTM (Open Robot Middleware), the first type robot functional element module is an OpenRTM component, and the first interface definition is an IDL file.
  • the second middleware is ROS (Robot Operating System), the second type robot functional element module is a node of ROS, and the second interface definition file is a message file or a service file. is there.
  • a bridge module that provides the ROS node program is generated from the OpenRTM component program.
  • the first type robot functional element module is a component of OpenRTM
  • the second type robot functional element module is a node of ROS, Analyzing the component IDL file to generate a node message file or / and a service file and source code; Generating a source code of the IDL file by an IDL compiler; Generating a source code of the message file or / and the service file by a ROS compiler, A conversion module is generated using the three source codes.
  • the input / output of the first type robot functional element module is specified when the program of the first type robot functional element module is executed, and the analysis is performed when the program is executed. Done.
  • a first interface definition file e.g., message file, service
  • a first type robot function element module e.g., node program
  • File and a corresponding second interface definition file (for example, IDL file) and a source code of the bridge module are generated.
  • the first middleware is a ROS (Robot Operating System)
  • the first type robot functional element module is a ROS node
  • the input / output is a message of the topic of the node being executed. It is obtained by analyzing a file or / and a service file of a service.
  • the second middleware is OpenRTM (Open Robot Middleware)
  • the second type robot function element module is an OpenRTM component
  • the second interface definition file is an IDL file.
  • a bridge module that provides an OpenRTM component program corresponding to the ROS node program is generated.
  • the first type robot functional element module is a ROS node
  • the second type robot functional element module is an OpenRTM component, Analyzing the message file or / and service file of the node to generate a component IDL file and source code; Generating a source code of the message file or / and the service file by a ROS compiler; Generating a source code of the generated IDL file by an IDL compiler, A conversion module is generated using the three source codes.
  • 5 shows a flowchart for generating a bridge module that provides an OpenRTM component program corresponding to a ROS node program.
  • 5 shows a flowchart for generating a bridge module that provides a ROS node program from an OpenRTM component program.
  • It is a diagram showing RT component architecture (quoted from http://www.openrtm.org/openrtm/ja/content/openrtm-aist-official-website). It is a figure which shows the concept of a node (cited from http://www.ros.org/wiki/). Indicates the navigation node of ROS.
  • the central ellipse is a node, and a plurality of rectangles around the node indicate topics. From the topic to the node is input (subscribe), and from the node to the topic is output (publish). Shows an RTM component that provides automatically generated ROS navigation capabilities. The central vertical rectangle is the component, with the input port on the left and the output port on the right. Shows how OpenRTM component bridges are automatically generated from ROS nodes. Shows how ROS nodes are automatically generated from OpenRTM components. An example of ROS node information is shown. An example of ROS node information is shown. An example of ROS node information is shown. An example of ROS node information is shown. An example of ROS node information is shown. An example of ROS node information is shown. An example of a program automatically generated by an automatic conversion program (main body part of a different middleware conversion source code) is shown.
  • An example of a program automatically generated by an automatic conversion program (main body part of a different middleware conversion source code) is shown.
  • An example of a program automatically generated by an automatic conversion program (main body part of a different middleware conversion source code) is shown.
  • An example of a program automatically generated by an automatic conversion program (main body part of a different middleware conversion source code) is shown.
  • An example of a program automatically generated by an automatic conversion program (main body part of a different middleware conversion source code) is shown.
  • An example of a program automatically generated by an automatic conversion program (main body part of a different middleware conversion source code) is shown.
  • An example of a program automatically generated by an automatic conversion program (main body part of a different middleware conversion source code) is shown.
  • An example of a program automatically generated by an automatic conversion program (main body part of a different middleware conversion source code) is shown.
  • An example of IDL automatically generated by the automatic conversion program is shown below.
  • An example of IDL automatically generated by the automatic conversion program is shown below.
  • An example of a program that generates two files of the source code (main) and IDL and creates an OpenRTM node using these two files is shown.
  • An example of a program that generates two files of the source code (main) and IDL and creates an OpenRTM node using these two files is shown.
  • An example of a program that generates two files of the source code (main) and IDL and creates an OpenRTM node using these two files is shown.
  • An example of a program that generates two files of the source code (main) and IDL and creates an OpenRTM node using these two files is shown.
  • An example of a program that generates two files of the source code (main) and IDL and creates an OpenRTM node using these two files is shown.
  • An example of a program that generates two files of the source code (main) and IDL and creates an OpenRTM node using these two files is shown.
  • An example of a program that generates two files of the source code (main) and IDL and creates an OpenRTM node using these two files is shown.
  • OpenRTM IDL An example of a program automatically generated by an automatic conversion program (main body part of a different middleware conversion source code) is shown.
  • An example of a program automatically generated by an automatic conversion program (main body part of a different middleware conversion source code) is shown.
  • An example of a program automatically generated by an automatic conversion program (main body part of a different middleware conversion source code) is shown.
  • An example of a program automatically generated by an automatic conversion program (main body part of a different middleware conversion source code) is shown.
  • An example of a program automatically generated by an automatic conversion program (main body part of a different middleware conversion source code) is shown.
  • An example of a program automatically generated by an automatic conversion program (main body part of a different middleware conversion source code) is shown.
  • An example of a program automatically generated by an automatic conversion program (main body part of a different middleware conversion source code) is shown.
  • An example of a program automatically generated by an automatic conversion program (main body part of a different middleware conversion source code) is shown.
  • An example of a program automatically generated by an automatic conversion program (main body part of a different middleware conversion source code) is shown.
  • An example of a program automatically generated by an automatic conversion program (main body part of a different middleware conversion source code) is shown.
  • An example of a service file automatically generated by an automatic conversion program is shown.
  • An example of a service file automatically generated by an automatic conversion program is shown.
  • An example of a service file automatically generated by an automatic conversion program is shown.
  • An example of a service file automatically generated by an automatic conversion program is shown.
  • An example of a service file automatically generated by an automatic conversion program is shown.
  • An example of a message file automatically generated by the automatic conversion program is shown.
  • An example of an automatic conversion program for generating the source code (main) and a message file / service file is shown.
  • An example of an automatic conversion program for generating the source code (main) and a message file / service file is shown.
  • An example of an automatic conversion program for generating the source code (main) and a message file / service file is shown.
  • An example of an automatic conversion program for generating the source code (main) and a message file / service file is shown.
  • An example of an automatic conversion program for generating the source code (main) and a message file / service file is shown.
  • An example of an automatic conversion program for generating the source code (main) and a message file / service file is shown.
  • An example of an automatic conversion program for generating the source code (main) and a message file / service file is shown.
  • An example of an automatic conversion program for generating the source code (main) and a message file / service file is shown.
  • An example of an automatic conversion program for generating the source code (main) and a message file / service file is shown.
  • An example of an automatic conversion program for generating the source code (main) and a message file / service file is shown.
  • An example of an automatic conversion program for generating the source code (main) and a message file / service file is shown.
  • An example of an automatic conversion program for generating the source code (main) and a message file / service file is shown.
  • Robot middleware is a software platform for constructing a robot system by combining a plurality of software modules of robot functional elements.
  • ROS Robot Operating System
  • projects such as Orocos and iCub / Yarp in Europe, and OpenRTM projects in Japan are known.
  • middleware developed by companies.
  • the present embodiment will be described by taking ROS and OpenRTM-aist as an example, but it will be understood by those skilled in the art that middleware to which the present invention is applied is not limited to ROS and OpenRTM-aist.
  • ROS Robot Operating System
  • a package is a set of folders or development files containing software that provides a set of functions.
  • the package is the main unit in ROS, and ROS software is organized in the package.
  • the package contains ROS runtime processes (nodes), ROS dependent libraries, datasets, configuration files, and other files that can be usefully organized.
  • a node is a process that performs computation, and is an executable file that can communicate with other nodes using ROS.
  • a node is a functional unit of software, that is, a robot functional element module.
  • the robot control system is composed of many nodes.
  • [Msg files] Message is a ROS data type used when subscribing or publishing a topic. Nodes communicate with each other by passing this message.
  • a message is a simple data structure that contains typed fields.
  • the data structure of the message is specified by a message file that is a simple text file.
  • the message file is a simple text file with a field type and a field name per line.
  • Field types include "int8, int16, int32, int64 (plus uint *)", “float32, float64", “string”, “time, duration”, “other msg files”, "variable-length array [] and fixed-length array [C] ".
  • Message files are used to generate source code for messages in different languages.
  • the message file is stored in the message directory of the package.
  • Message (msg) types (message type) is a message description stored in the package, and defines the data structure of the message transmitted in the ROS.
  • a service is defined using a service file, and the service file is compiled into source code by the ROS client library.
  • a service file describes a service and consists of two parts, a request and a response.
  • a service file is similar to a message file except that it contains two, a request and a response. Examples of service files are “int64 A”, “int64 B”, “int64 Sum ". A and B are requests, and Sum is a response.
  • the service file is stored in the package service directory.
  • Service (srv) types is a service description stored in a package, and defines a request data request and response data structure in the ROS.
  • Topic In ROS, data transmission / reception is performed using topics.
  • a topic is a named bus through which nodes exchange messages. Nodes send messages by publishing the message to a given topic.
  • the topic is a name that identifies the content of the message. Subscribers interested in certain data subscribe to the appropriate topic.
  • a publisher is a side that provides data, and a subscriber is a side that receives data.
  • a node may also publish and / or subscribe to multiple topics. In general, publishers and subscribers are unaware of each other's existence.
  • Logically, topics can be viewed as a strongly typed message bus. Each bus has a name, and anyone can connect to the bus and send and receive messages (with a predetermined type). The node accesses the required topic and receives data.
  • the topic is intended for one-way streaming communication, and the node that receives the response to the request uses the service.
  • Example code for Subscriber Node (extracted from the above website) rospy.Subscriber ("chatter", String, callback) declares that this node subscribes to the chatter topic of message type String.
  • the service is used when receiving a response to a certain operation (execution of a request / response) instead of sending and receiving data.
  • a service is defined by a pair of messages, a request and a reply.
  • the provided ROS node provides a service under the name, and the client calls the service by sending a request message and waits for a response.
  • a service is similar to a function call or remote procedure call.
  • OpenRTM-aist For details of OpenRTM-aist, you can refer to http://www.openrtm.org/openrtm/en/content/openrtm-aist-official-website. Here, some terms related to OpenRTM-aist necessary for understanding the present embodiment will be described. The following description includes the use of the description of the website.
  • RT component In OpenRTM-aist, the robot function elements that are made into software modules are called RT components (RT-Component: RTC).
  • the RT component has an interface called a port for exchanging data and communicating with other RT components.
  • RT component When creating a robot system, a program is created for each functional element (RT component), and the system is constructed by connecting RT components.
  • the RT system is constructed as a collection of RT component functions by connecting a plurality of RT component ports (endpoints for data communication).
  • RTC developers embed their own control algorithm code and existing library code (called core logic) in the RTC template code that is automatically generated by tools such as RTCBuilder and compile it (in script languages) RTC can be created.
  • the data port is a port for mainly transmitting / receiving continuous data between RTCs, a data port (OutPort) for transmitting data to other RTCs, and a data port for receiving data from other RTCs ( InPort).
  • One RTC has any number of data ports as required. For example, when creating a component that acquires data from a sensor, this component requires an OutPort to output at least one sensor data. Alternatively, when creating a component that drives a motor according to a specified torque value, this component requires an InPort that receives at least one torque value command. When creating a controller component for feedback control using these components, InPort that receives sensor data, InPort that receives command values (for example, speed command), and OutPort that outputs torque values Each of these is required.
  • Each data port has a specific type, and the definition of the data port type is defined by a language-independent interface definition language called IDL (Interface Definition Language). The same data type can be connected and communicated via the network even if the language and OS are different.
  • a command level (or function level)
  • the position and speed of the hand are data to be sent from a host application or component through a data port.
  • functions such as setCoordinationSystem (), setParameter (), setMode (), etc. are prepared for the manipulator object for various settings of the robot arm, coordinate system, control parameter, operation mode, etc. These functions are called at an appropriate timing as necessary.
  • the service port provides a mechanism for such exchange between command level components.
  • a service is a group of commands (also called functions, methods, operations, etc.) that are functionally related.
  • RT components can have any number of service ports as well as data ports. Also, any type and number of providers or consumers can be added to the service port. A provider and a consumer are collectively referred to as an interface or a service interface, and a port having these service interfaces is referred to as a service port. As with data ports, even if the language and OS are different, if the interface type is the same, you can connect and call functions. “Same type” means having the same interface definition.
  • IDL CORBA interface definition language
  • IDL provides a language-independent interface definition method, and by using an IDL compiler, codes (stubs and skeletons) corresponding to various languages are automatically generated.
  • a stub is a code for a proxy object for calling a remote object
  • a skeleton is a base code for implementing a provider.
  • calling between different languages can be performed seamlessly.
  • a provider implemented in C ++ can be easily called with Python or Java.
  • IDL definition used in the OpenRTM-aist sample (extracted from the above website).
  • module is equivalent to a C ++ namespace, which prevents interface name collisions.
  • typedef keyword as well as C language.
  • sequence dynamic array type
  • EchoList type is defined as a string (string type) type list
  • ValueList type as a float type list.
  • Five functions (operations) are defined in the MyService interface.
  • IDL adds an in, out or inout modifier before the argument declaration to clarify whether the argument is input or output.
  • IDL compilation Compiling with the IDL defined to the IDL compiler usually generates code for stubs and skeletons (sometimes called servers and clients).
  • a client that is, a service user uses a proxy (proxy) object defined as a stub by using stub code inclusion or the like to access a remote server function.
  • proxy proxy
  • Defining and compiling IDL automatically generates most of the code needed to define and use distributed objects. Since the IDL definition method itself can be relatively easily defined by those skilled in the art working on C language and Java, detailed description thereof is omitted.
  • [B] Conversion module for linking different types of robot middleware To enable control and communication of programs running on one middleware for interoperating robot middleware with different standards from another middleware Therefore, a conversion module called a bridge that virtualizes the program itself and converts information is generated. If the bridge module can be automatically generated, it is possible not only to work by one person at a time, but also to improve efficiency, and to quickly respond to middleware and program updates and changes.
  • a “bridge” is a device (including software) that exchanges information between two systems and structural units.
  • Such a bridge module is obtained by the cooperation of a computer (including an input unit, an output unit, a calculation unit, a storage unit, a display unit, etc.) as hardware and software that causes the computer to execute a predetermined function. Realized.
  • a method for automatically generating a bridge module based on analysis of middleware to be interoperated is provided. It shows that automatic conversion of robot functional element module can be solved by two methods of online method and offline method. When middleware with clear input / output of program is static (before program execution), online method is not. Adopts the offline method.
  • online conversion method and offline conversion method specifically, the online conversion method to check the input / output of the running program and generate the interface definition file and program corresponding to this
  • the specific procedure for this has not been clarified, but in this embodiment, it is shown that there are two methods of automatic generation of the bridge module, online and offline, which is determined by analysis of the target middleware. Proceed with the procedure of whether to adopt the method.
  • OpenRTM provides a "service port” and a "data port”.
  • the data port is a port for transmitting and receiving data.
  • a service port is considered to be a mechanism that allows a specific function to be executed remotely as well as data transmission and reception.
  • ROS provides “topics” and “services”.
  • a topic is intended for one-way streaming communication, and a message file that describes a message that specifies the content of the topic is used to generate source code for messages in different languages.
  • a node that executes reception of a response to a request uses a service.
  • a service file for specifying the contents of a service consists of two requests and a response, and is stored in the service directory of the package.
  • OpenRTM data port and ROS topic, OpenRTM service port and ROS service are the same in the sense that the former is one-way data flow (data transmission / reception) and the latter sends data and receives the result (function call) It is functioning.
  • ROS message files can be defined as data types in IDL, and ROS service files correspond to IDL function calls.
  • the online conversion method is a method for checking input / output of a running node program and generating a corresponding idl file and bridge module source code.
  • the online conversion method is an effective method for a system in which the input / output of the program of the robot functional element module of the robot middleware system is not clear until the program is executed.
  • the message interface definition file defines the input and output of data, but it is not specified which node program provides it, so the OpenRTM corresponding to the ROS node program is not specified.
  • FIG. 1A shows a flowchart for generating a bridge module that provides an OpenRTM component program corresponding to a ROS node program. Examples of conversion from ROS to OpenRTM are shown in FIGS. 5A to 8G.
  • FIG. 5A to FIG. 5C illustrate ROS node information.
  • 6A to 6H are source codes that are automatically generated using the automatic conversion program according to the present embodiment.
  • 7A and 7B are (rosbridge.idl) IDL files that are automatically generated using the automatic conversion program according to the present embodiment.
  • 8A to 8G (rtmros-data-bridge.py) generates the above two files (source code and IDL file) and uses these files to create an OpenRTM node (so to speak, Conversion program execution control source code).
  • the bridge module is generated by an automatic conversion program. Furthermore, it demonstrates with reference to FIG. 1A. (1) By analyzing and processing the ROS node msg, srv (msg file, srv file) with the automatic conversion program (FIGS. 8A to 8G), the “IDL file (FIGS. 7A, 7B)” and “Main” Source code (FIGS. 6A-6H) ”is generated simultaneously.
  • the main source code (Python file in the present embodiment) is a different middleware conversion source code (the main part), which is a middleware conversion core source code.
  • an interface source file (Python file) is generated.
  • a source code (Python file) of the “IDL file” is generated.
  • the above three source codes are processed using an automatic conversion program (FIGS. 8A to 8G) to generate a bridge program.
  • FIG. 3A shows a navigation node of ROS.
  • the central ellipse is a node, and a plurality of rectangles around the node indicate topics. From the topic to the node is input (subscribe), and from the node to the topic is output (publish).
  • FIG. 3B shows an RTM component that provides an automatically generated ROS navigation function.
  • the central vertical rectangle is the component, with the input port on the left and the output port on the right.
  • the left side is a two-dimensional navigation simulator ⁇ (top) where the ROS navigation tutorial is generated, and its sensor information display (bottom), and the right side is automatically generated from the navigation node of the ROS operating there.
  • the navigation component of OpenRTM is displayed, and the ROS navigation function can be used with OpenRTM input and output.
  • the offline conversion method analyzes an IDL file that is a component interface definition file, generates a corresponding interface definition file (message file, service file) from the IDL file, and generates the source code of the bridge module. Is a method for generating
  • the offline conversion method is an effective method when the input / output of the program of the robot functional element module of the robot middleware system is specified in the interface definition file.
  • an OpenRTM component program can understand what data port port and / or service port the component provides by analyzing the interface definition file corresponding to the component.
  • An off-line conversion method is appropriate when generating a bridge module that provides a ROS node program.
  • FIG. 1B A flow chart for generating a bridge module that provides a ROS node program from an OpenRTM component program is shown in FIG. 1B. Examples of conversion from OpenRTM to ROS are shown in FIGS.
  • FIG. 9 MyService.idl
  • FIGS. 9A to 9E MyServiceROSBridge.cpp
  • FIGS. 10A to 10C MyServiceROSBridge.h
  • FIGS. 11A and 11B are sources automatically generated using the automatic conversion program according to the present embodiment. Indicates the code (main).
  • Figure 12 (SimpleService_MyService_echo.srv), Figure 13 (SimpleService_MyService_get_echo_history.srv)
  • Figure 14 (SimpleService_MyService_get_value.srv)
  • Figure 15 (SimpleService_MyService_get_value_history.srv
  • Figure 16 (SimpleService_MyService_set_value.srv)
  • Figure 17 (StringMultiArray.msg)
  • 18A to 18L are automatic conversion programs (ie, conversion program execution control source code) that generate the above two files (source code and message file / service file) from the OpenRTM IDL file. is there. Furthermore, it demonstrates with reference to FIG. 1B.
  • the main source code in this embodiment, the cpp file and the h file
  • the main source code is a different middleware conversion source code (its main body part), that is, a middleware conversion core source code.
  • An interface source file (cpp file and h file) is generated by processing the IDL file of the RTM component with a known IDL compiler.
  • Fig. 4 the left figure is a humanoid simulation by OpenRTM, and the right figure shows the ROS node automatically generated from the input / output interface definition file of the OpenRTM component that is running there.
  • the humanoid simulation function of OpenRTM can be used.

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Devices For Executing Special Programs (AREA)
  • Stored Programmes (AREA)

Abstract

Provided are a method and a device for automatically generating a bridge module of middleware whereof interoperability is desired. The method comprises: a step of analyzing a first interface definition of a first type of robot function element module, and generating a second interface definition of a second type of robot function element module and inter-middleware conversion source code; and a step of generating a conversion module, using the second interface definition and the source code.

Description

異なるタイプのロボットミドルウェア間を連携する変換モジュールの生成方法及び装置Method and apparatus for generating conversion module for linking different types of robot middleware
本発明は、異なる規格からなるロボットミドルウェアの相互運用を行うための、あるミドルウェア上で稼働しているプログラムを、別のミドルウェア上からも制御・通信できるようにするために、プログラム自体を仮想化し情報を変換するブリッジと呼ばれる変換モジュールを生成する技術に関するものである。 The present invention virtualizes a program running on one middleware for interoperating robot middleware of different standards so that it can be controlled and communicated on another middleware. The present invention relates to a technique for generating a conversion module called a bridge for converting information.
従来、ロボット研究分野ではオープンソースのOSや開発環境を活用することはあっても、その研究のコアとなる知的な情報処理モジュールに関してはオープンになることは無かったが、ここ数年、ロボット分野においてもオープンソースソフトウェアが、特に海外を中心に急速に拡がりを見せている。ロボット用オープンソースプロジェクトとしては、米国のWillowGarage社が展開するROS(Robot Operating System)、欧州におけるOrocosやiCub/Yarp等のプロジェクト、日本におけるOpenRTMプロジェクトが知られており、それぞれロボットを開発するためのミドルウェアを提供している。 Traditionally, in the robot research field, although an open source OS and development environment have been utilized, the intelligent information processing module that is the core of the research has never been open. In the field, open source software is expanding rapidly, especially overseas. Known open source projects for robots include ROS (Robot Operating System) developed by Willow Garage in the United States, projects such as Orocos and iCub / Yarp in Europe, and OpenRTM projects in Japan. Provides middleware.
このようなロボットミドルウェアは、ロボットを構成する要素(アクチュエータやセンサ)やロボットを制御するソフトウェアを、機能要素モジュールとして部品化するための技術であり、用途に応じて機能要素モジュールを適宜組み合わせるだけで、様々なロボットを開発することができる。例えば、OpenRTMプロジェクトであるOpenRTM-aistでは、ロボットシステムを作る際に、機能要素モジュール(RTC:RTコンポー ネント) ごとにプログラムを作成し、RTコンポーネントを繋ぎ合わせることでロボットシステムを構築する。 Such robot middleware is a technology for componentizing robot components (actuators and sensors) and robot control software as functional component modules. Simply combine the functional component modules according to the application. Various robots can be developed. For example, in OpenRTM-aist, an OpenRTM project, when creating a robot system, a program is created for each functional element module (RTC: RT component) and the robot system is constructed by connecting RT components.
上述のように、規格の異なる複数のロボットミドルウェアが存在することから、従来は、ロボットミドルウェア毎に独立して開発が進められてきた傾向があり、これらを連携させる試みはあまり行われてこなかった。これらの異なるタイプのロボットミドルウェアを連携しようとする場合には、いわゆるブリッジモジュールを逐一手作業で開発することになり、ミドルウェアのバージョンアップや対象とするプログラムの機能更新、変更等が起こると、ブリッジモジュールが機能せず、再度、人手をかけて開発しなおす必要があった。 As described above, since there are multiple robot middlewares with different standards, there has been a tendency that development has been progressed independently for each robot middleware, and there have been few attempts to link these. . When these different types of robot middleware are to be linked, a so-called bridge module must be developed manually, and when the middleware is upgraded or the function of the target program is updated or changed, the bridge The module did not work, and it was necessary to re-develop it again by manpower.
ブリッジモジュールの生成を自動で行えれば、逐一人手による作業が発生せず効率化につながるばかりでなく、ミドルウェアやプログラムの更新や変更に迅速に対応できるようになるが、そのための方法論は明らかでなかった。特許文献は、データ中継用RTコンポーネント生成方法について開示するが、同じ規格のミドルウェアのコンポーネント間のミスマッチに対応するものである。
特開2011-86182号
If the generation of bridge modules can be done automatically, not only will it be possible to work manually, but it will not only lead to efficiency, but it will also be able to respond quickly to middleware and program updates and changes, but the methodology for that is clear. There wasn't. The patent document discloses a method for generating an RT component for data relay, but corresponds to a mismatch between middleware components of the same standard.
JP2011-86182A
 本発明は、相互運用したいミドルウェアの分析に基づいたブリッジモジュールの自動生成方法及び装置を提供するものである。 The present invention provides a bridge module automatic generation method and apparatus based on analysis of middleware to be interoperated.
 本発明が採用した技術手段は、
 第1のタイプのロボット機能要素モジュールのセットを備えた第1のミドルウェアと、第2のタイプのロボット機能要素モジュールのセットを備えた第2のミドルウェアとの間を連携する変換モジュールの自動生成法であって、
 第1のタイプのロボット機能要素モジュールの第1のインターフェース定義を解析して、第2のタイプのロボット機能要素モジュールの第2のインターフェース定義と、ミドルウェア間変換ソースコードと、を生成するステップと、
 前記第2のインターフェース定義と前記ソースコードを用いて、変換モジュールを生成するステップと、
 を備えた自動生成方法、ないし、
 第1のタイプのロボット機能要素モジュールのセットを備えた第1のミドルウェアと、第2のタイプのロボット機能要素モジュールのセットを備えた第2のミドルウェアとの間を連携する変換モジュールの自動生成装置であって、
 第1のタイプのロボット機能要素モジュールの第1のインターフェース定義を解析して、第2のタイプのロボット機能要素モジュールの第2のインターフェース定義と、ミドルウェア間変換ソースコードと、を生成する手段と、
 前記第2のインターフェース定義と前記ソースコードを用いて、変換モジュールを生成する手段と、
 を備えた自動生成装置、である。
 本発明は、ハードウェアとしてのコンピュータ(入力部、出力部、演算部、記憶部、表示部等を備える)と、コンピュータに所定の機能を実行させるようなソフトウェアとの協働によって実現され、各ファイルないしプログラムは1つあるいは複数のコンピュータの記憶部に記憶されている。
 本発明は、第1のタイプのロボット機能要素モジュールのセットを備えた第1のミドルウェアと、第2のタイプのロボット機能要素モジュールのセットを備えた第2のミドルウェアとの間を連携する変換モジュールを自動生成するために、コンピュータを所定の手段として機能させるためのコンピュータプログラムとして実現される。
The technical means adopted by the present invention are:
Method for automatically generating a conversion module for linking between a first middleware having a set of first-type robot functional element modules and a second middleware having a set of second-type robot functional element modules Because
Analyzing a first interface definition of a first type robot functional element module to generate a second interface definition of a second type robot functional element module and an inter-middleware conversion source code;
Using the second interface definition and the source code to generate a conversion module;
Automatic generation method with
Apparatus for automatically generating a conversion module for linking between first middleware having a set of first type robot functional element modules and second middleware having a set of second type robot functional element modules Because
Means for analyzing a first interface definition of a first type robot functional element module and generating a second interface definition of a second type robot functional element module and an inter-middleware conversion source code;
Means for generating a conversion module using the second interface definition and the source code;
Is an automatic generation device.
The present invention is realized by cooperation between a computer (including an input unit, an output unit, a calculation unit, a storage unit, a display unit, etc.) as hardware and software that causes the computer to execute a predetermined function. Files or programs are stored in a storage unit of one or more computers.
The present invention relates to a conversion module that cooperates between a first middleware having a set of robot function element modules of a first type and a second middleware having a set of robot function element modules of a second type. Is automatically realized as a computer program for causing a computer to function as a predetermined means.
 1つの態様では、 前記変換モジュールを生成するステップは、
 前記ソースコードと、
 前記第1のインターフェース定義から生成したソースコードと、
 前記第2のインターフェース定義から生成したソースコードと、
を用いて、変換モジュールを生成する。
 インターフェース定義ファイルは、各ミドルウェア毎に規定されており、OpenRTMでは、IDLファイルであり、ROSでは、メッセージファイル、サービスファイルである。他のミドルウェアにおいても、これらに対応するインターフェース定義ファイルが備わっており、これらを用いて処理できることが当業者に理解される。
 「前記第1のインターフェース定義から生成したソースコード」は、図1Aに示すフローチャート(ROS→RTM)では「メッセージファイル/サービスファイルをROSコンパイラ(ROSメッセージ・サービスコンパイラ)で生成した.py」であり、図1Bに示すフローチャート(RTM→ROS)では「IDLをIDLコンパイラで処理して生成した.cpp,.h」である。
 「前記第2のインターフェース定義から生成したソースコード」は、図1Aに示すフローチャート(ROS→RTM)では「IDLメッセーをIDLコンパイラで生成した.py」であり、図1Bに示すフローチャート(RTM→ROS)では「メッセージファイル/サービスファイルをROSコンパイラ(ROSメッセージ・サービスコンパイラ)で処理して生成した.cpp,.h」である。
In one aspect, generating the conversion module comprises:
The source code;
Source code generated from the first interface definition;
Source code generated from the second interface definition;
Is used to generate a conversion module.
The interface definition file is defined for each middleware, and is an IDL file in OpenRTM, and a message file and a service file in ROS. It is understood by those skilled in the art that other middleware also has interface definition files corresponding to these, and can be processed using these.
The “source code generated from the first interface definition” is “message file / service file generated by ROS compiler (ROS message service compiler) .py” in the flowchart (ROS → RTM) shown in FIG. 1A. In the flowchart (RTM → ROS) shown in FIG. 1B, “IDL is processed by an IDL compiler. Cpp, .h”.
The “source code generated from the second interface definition” is “IDL message generated by IDL compiler .py” in the flowchart (ROS → RTM) shown in FIG. 1A, and the flowchart (RTM → ROS shown in FIG. 1B). ) “Cpp, .h generated by processing a message file / service file with a ROS compiler (ROS message service compiler)”.
 1つの態様では、第1のタイプのロボット機能要素モジュールの入出力は、第1のインターフェース定義により当該第1のタイプのロボット機能要素モジュールのプログラム実行前に規定されており、前記解析は、当該プログラム実行前に行われる。
 いわゆるオフライン変換方式であり、ロボット機能要素モジュールの第1のインターフェース定義ファイル(例えば、コンポーネントのIDLファイル)を解析し、そこから対応した第2のインターフェース定義ファイル(ノードのメッセージファイル、サービスファイル)を生成し、ブリッジモジュールのソースコードを生成する方式である。
In one aspect, the input / output of the first type robot functional element module is defined by the first interface definition before executing the program of the first type robot functional element module, and the analysis Performed before program execution.
This is a so-called offline conversion method, in which a first interface definition file (for example, component IDL file) of a robot function element module is analyzed, and a corresponding second interface definition file (node message file, service file) is obtained therefrom. This is a method for generating the source code of the bridge module.
 1つの態様では、第1のミドルウェアは、OpenRTM (Open Robot Middleware)であり、第1のタイプのロボット機能要素モジュールはOpenRTMのコンポーネントであり、前記第1のインターフェース定義はIDLファイルである。
 1つの態様では、第2のミドルウェアは、ROS(Robot Operating System)であり、第2のタイプのロボット機能要素モジュールはROSのノードであり、前記第2のインターフェース定義ファイルはメッセージファイルないしサービスファイルである。
 この場合、OpenRTMのコンポーネントプログラムからROSのノードプログラムを提供するブリッジモジュールを生成する。
 より具体的な態様では、第1のタイプのロボット機能要素モジュールは、OpenRTMのコンポーネントであり、第2のタイプのロボット機能要素モジュールは、ROSのノードであり、
 前記コンポーネントのIDLファイルを解析して、ノードのメッセージファイルあるいは/およびサービスファイルと、ソースコードと、を生成するステップと、
 IDLコンパイラによって前記IDLファイルのソースコードを生成するステップと、
 ROSコンパイラによって前記メッセージファイルあるいは/およびサービスファイルのソースコードを生成するステップと、を備え、
 前記3つのソースコードを用いて、変換モジュールを生成する。
In one aspect, the first middleware is OpenRTM (Open Robot Middleware), the first type robot functional element module is an OpenRTM component, and the first interface definition is an IDL file.
In one aspect, the second middleware is ROS (Robot Operating System), the second type robot functional element module is a node of ROS, and the second interface definition file is a message file or a service file. is there.
In this case, a bridge module that provides the ROS node program is generated from the OpenRTM component program.
In a more specific aspect, the first type robot functional element module is a component of OpenRTM, the second type robot functional element module is a node of ROS,
Analyzing the component IDL file to generate a node message file or / and a service file and source code;
Generating a source code of the IDL file by an IDL compiler;
Generating a source code of the message file or / and the service file by a ROS compiler,
A conversion module is generated using the three source codes.
 1つの態様では、第1のタイプのロボット機能要素モジュールの入出力は、当該第1のタイプのロボット機能要素モジュールのプログラム実行時に特定されるようになっており、前記解析は、当該プログラム実行時に行われる。
 1つの態様では、いわゆるオンライン変換方式であり、起動している第1のタイプのロボット機能要素モジュール(例えば、ノードプログラム)の入出力を規定する第1のインターフェース定義ファイル(例えば、メッセージファイル、サービスファイル)を調べ、これに対応した第2のインターフェース定義ファイル(例えば、IDLファイル)並びにブリッジモジュールのソースコードを生成する方式である。
In one aspect, the input / output of the first type robot functional element module is specified when the program of the first type robot functional element module is executed, and the analysis is performed when the program is executed. Done.
In one aspect, a first interface definition file (e.g., message file, service) that is a so-called online conversion method and that defines input / output of a first type robot function element module (e.g., node program) that is running. File) and a corresponding second interface definition file (for example, IDL file) and a source code of the bridge module are generated.
 1つの態様では、第1のミドルウェアは、ROS(Robot Operating System)であり、第1のタイプのロボット機能要素モジュールはROSのノードであり、前記入出力は、実行されているノードのトピックのメッセージファイルあるいは/およびサービスのサービスファイルを解析することで取得される。
 1つの態様では、第2のミドルウェアは、OpenRTM (Open Robot Middleware)であり、第2のタイプのロボット機能要素モジュールはOpenRTMのコンポーネントであり、前記第2のインターフェース定義ファイルはIDLファイルである。
 この場合、ROSのノードプログラムに対応するOpenRTMのコンポーメントプログラムを提供するブリッジモジュールを生成する。
 より具体的な態様では、第1のタイプのロボット機能要素モジュールは、ROSのノードであり、第2のタイプのロボット機能要素モジュールは、OpenRTMのコンポーネントであり、
 前記ノードのメッセージファイルあるいは/およびサービスファイルを解析して、コンポーネントのIDLファイルと、ソースコードと、を生成するステップと、
 ROSコンパイラによって前記メッセージファイルあるいは/およびサービスファイルのソースコードを生成するステップと、
 IDLコンパイラによって前記生成されたIDLファイルのソースコードを生成するステップと、を備え、
 前記3つのソースコードを用いて、変換モジュールを生成する。
In one aspect, the first middleware is a ROS (Robot Operating System), the first type robot functional element module is a ROS node, and the input / output is a message of the topic of the node being executed. It is obtained by analyzing a file or / and a service file of a service.
In one aspect, the second middleware is OpenRTM (Open Robot Middleware), the second type robot function element module is an OpenRTM component, and the second interface definition file is an IDL file.
In this case, a bridge module that provides an OpenRTM component program corresponding to the ROS node program is generated.
In a more specific aspect, the first type robot functional element module is a ROS node, and the second type robot functional element module is an OpenRTM component,
Analyzing the message file or / and service file of the node to generate a component IDL file and source code;
Generating a source code of the message file or / and the service file by a ROS compiler;
Generating a source code of the generated IDL file by an IDL compiler,
A conversion module is generated using the three source codes.
本発明によってブリッジモジュールの生成を自動で行うことができ、逐一人手による作業が発生せず効率化につながるばかりでなく、ミドルウェアやプログラムの更新や変更に迅速に対応できるようになる。 According to the present invention, it is possible to automatically generate a bridge module, which does not require any single-handed work, leading to efficiency, but also being able to quickly respond to middleware and program updates and changes.
本実施形態に係るブリッジモジュールの概念図である。It is a conceptual diagram of the bridge module which concerns on this embodiment. ROSのノードプログラムに対応するOpenRTMのコンポーメントプログラムを提供するブリッジモジュールを生成するためのフローチャートを示す。5 shows a flowchart for generating a bridge module that provides an OpenRTM component program corresponding to a ROS node program. OpenRTMのコンポーネントプログラムからROSのノードプログラムを提供するブリッジモジュールを生成するためのフローチャートを示す。5 shows a flowchart for generating a bridge module that provides a ROS node program from an OpenRTM component program. RTコンポーネントアーキテクチャを示す図である(http://www.openrtm.org/openrtm/ja/content/openrtm-aist-official-websiteから引用)。It is a diagram showing RT component architecture (quoted from http://www.openrtm.org/openrtm/ja/content/openrtm-aist-official-website). ノードの概念を示す図である(http://www.ros.org/wiki/から引用)。It is a figure which shows the concept of a node (cited from http://www.ros.org/wiki/). ROSのナビゲーションノードを示す。中央の楕円はノードであり、ノードの周囲の複数の矩形はそれぞれトピックを示している。トピックからノードへ向かう→は入力(サブスクライブ)で、ノードからトピックへ向かう→は出力(パブリッシュ)である。Indicates the navigation node of ROS. The central ellipse is a node, and a plurality of rectangles around the node indicate topics. From the topic to the node is input (subscribe), and from the node to the topic is output (publish). 自動生成されたROSナビゲーション機能を提供するRTMコンポーネントを示す。中央の縦長方形がコンポーネントであり、左側に入力ポート、右側に出力ポートが備わっている。Shows an RTM component that provides automatically generated ROS navigation capabilities. The central vertical rectangle is the component, with the input port on the left and the output port on the right. ROSノードからOpenRTMコンポーネントブリッジを自動生成している様子を示す。Shows how OpenRTM component bridges are automatically generated from ROS nodes. OpenRTMコンポーネントからROSノードを自動生成している様子を示す。Shows how ROS nodes are automatically generated from OpenRTM components. ROSのノード情報の例を示す。An example of ROS node information is shown. ROSのノード情報の例を示す。An example of ROS node information is shown. ROSのノード情報の例を示す。An example of ROS node information is shown. 自動変換用プログラムによって自動生成されたプログラム(異ミドルウェア間変換ソースコードの本体部分)の例を示す。An example of a program automatically generated by an automatic conversion program (main body part of a different middleware conversion source code) is shown. 自動変換用プログラムによって自動生成されたプログラム(異ミドルウェア間変換ソースコードの本体部分)の例を示す。An example of a program automatically generated by an automatic conversion program (main body part of a different middleware conversion source code) is shown. 自動変換用プログラムによって自動生成されたプログラム(異ミドルウェア間変換ソースコードの本体部分)の例を示す。An example of a program automatically generated by an automatic conversion program (main body part of a different middleware conversion source code) is shown. 自動変換用プログラムによって自動生成されたプログラム(異ミドルウェア間変換ソースコードの本体部分)の例を示す。An example of a program automatically generated by an automatic conversion program (main body part of a different middleware conversion source code) is shown. 自動変換用プログラムによって自動生成されたプログラム(異ミドルウェア間変換ソースコードの本体部分)の例を示す。An example of a program automatically generated by an automatic conversion program (main body part of a different middleware conversion source code) is shown. 自動変換用プログラムによって自動生成されたプログラム(異ミドルウェア間変換ソースコードの本体部分)の例を示す。An example of a program automatically generated by an automatic conversion program (main body part of a different middleware conversion source code) is shown. 自動変換用プログラムによって自動生成されたプログラム(異ミドルウェア間変換ソースコードの本体部分)の例を示す。An example of a program automatically generated by an automatic conversion program (main body part of a different middleware conversion source code) is shown. 自動変換用プログラムによって自動生成されたプログラム(異ミドルウェア間変換ソースコードの本体部分)の例を示す。An example of a program automatically generated by an automatic conversion program (main body part of a different middleware conversion source code) is shown. 自動変換用プログラムによって自動生成されたIDLの例を示す。An example of IDL automatically generated by the automatic conversion program is shown below. 自動変換用プログラムによって自動生成されたIDLの例を示す。An example of IDL automatically generated by the automatic conversion program is shown below. 上記ソースコード(メイン)とIDLの2つのファイルを生成すると共に、これら2つのファイルを使ってOpenRTMノードを作るプログラムの例を示す。An example of a program that generates two files of the source code (main) and IDL and creates an OpenRTM node using these two files is shown. 上記ソースコード(メイン)とIDLの2つのファイルを生成すると共に、これら2つのファイルを使ってOpenRTMノードを作るプログラムの例を示す。An example of a program that generates two files of the source code (main) and IDL and creates an OpenRTM node using these two files is shown. 上記ソースコード(メイン)とIDLの2つのファイルを生成すると共に、これら2つのファイルを使ってOpenRTMノードを作るプログラムの例を示す。An example of a program that generates two files of the source code (main) and IDL and creates an OpenRTM node using these two files is shown. 上記ソースコード(メイン)とIDLの2つのファイルを生成すると共に、これら2つのファイルを使ってOpenRTMノードを作るプログラムの例を示す。An example of a program that generates two files of the source code (main) and IDL and creates an OpenRTM node using these two files is shown. 上記ソースコード(メイン)とIDLの2つのファイルを生成すると共に、これら2つのファイルを使ってOpenRTMノードを作るプログラムの例を示す。An example of a program that generates two files of the source code (main) and IDL and creates an OpenRTM node using these two files is shown. 上記ソースコード(メイン)とIDLの2つのファイルを生成すると共に、これら2つのファイルを使ってOpenRTMノードを作るプログラムの例を示す。An example of a program that generates two files of the source code (main) and IDL and creates an OpenRTM node using these two files is shown. 上記ソースコード(メイン)とIDLの2つのファイルを生成すると共に、これら2つのファイルを使ってOpenRTMノードを作るプログラムの例を示す。An example of a program that generates two files of the source code (main) and IDL and creates an OpenRTM node using these two files is shown. OpenRTMのIDLの例を示す。Here is an example of OpenRTM IDL. 自動変換用プログラムによって自動生成されたプログラム(異ミドルウェア間変換ソースコードの本体部分)の例を示す。An example of a program automatically generated by an automatic conversion program (main body part of a different middleware conversion source code) is shown. 自動変換用プログラムによって自動生成されたプログラム(異ミドルウェア間変換ソースコードの本体部分)の例を示す。An example of a program automatically generated by an automatic conversion program (main body part of a different middleware conversion source code) is shown. 自動変換用プログラムによって自動生成されたプログラム(異ミドルウェア間変換ソースコードの本体部分)の例を示す。An example of a program automatically generated by an automatic conversion program (main body part of a different middleware conversion source code) is shown. 自動変換用プログラムによって自動生成されたプログラム(異ミドルウェア間変換ソースコードの本体部分)の例を示す。An example of a program automatically generated by an automatic conversion program (main body part of a different middleware conversion source code) is shown. 自動変換用プログラムによって自動生成されたプログラム(異ミドルウェア間変換ソースコードの本体部分)の例を示す。An example of a program automatically generated by an automatic conversion program (main body part of a different middleware conversion source code) is shown. 自動変換用プログラムによって自動生成されたプログラム(異ミドルウェア間変換ソースコードの本体部分)の例を示す。An example of a program automatically generated by an automatic conversion program (main body part of a different middleware conversion source code) is shown. 自動変換用プログラムによって自動生成されたプログラム(異ミドルウェア間変換ソースコードの本体部分)の例を示す。An example of a program automatically generated by an automatic conversion program (main body part of a different middleware conversion source code) is shown. 自動変換用プログラムによって自動生成されたプログラム(異ミドルウェア間変換ソースコードの本体部分)の例を示す。An example of a program automatically generated by an automatic conversion program (main body part of a different middleware conversion source code) is shown. 自動変換用プログラムによって自動生成されたプログラム(異ミドルウェア間変換ソースコードの本体部分)の例を示す。An example of a program automatically generated by an automatic conversion program (main body part of a different middleware conversion source code) is shown. 自動変換用プログラムによって自動生成されたプログラム(異ミドルウェア間変換ソースコードの本体部分)の例を示す。An example of a program automatically generated by an automatic conversion program (main body part of a different middleware conversion source code) is shown. 自動変換用プログラムによって自動生成されたサービスファイルの例を示す。An example of a service file automatically generated by an automatic conversion program is shown. 自動変換用プログラムによって自動生成されたサービスファイルの例を示す。An example of a service file automatically generated by an automatic conversion program is shown. 自動変換用プログラムによって自動生成されたサービスファイルの例を示す。An example of a service file automatically generated by an automatic conversion program is shown. 自動変換用プログラムによって自動生成されたサービスファイルの例を示す。An example of a service file automatically generated by an automatic conversion program is shown. 自動変換用プログラムによって自動生成されたサービスファイルの例を示す。An example of a service file automatically generated by an automatic conversion program is shown. 自動変換用プログラムによって自動生成されたメッセージファイルの例を示す。An example of a message file automatically generated by the automatic conversion program is shown. 上記ソースコード(メイン)と、メッセージファイル/サービスファイル、を生成する自動変換用プログラムの例を示す。An example of an automatic conversion program for generating the source code (main) and a message file / service file is shown. 上記ソースコード(メイン)と、メッセージファイル/サービスファイル、を生成する自動変換用プログラムの例を示す。An example of an automatic conversion program for generating the source code (main) and a message file / service file is shown. 上記ソースコード(メイン)と、メッセージファイル/サービスファイル、を生成する自動変換用プログラムの例を示す。An example of an automatic conversion program for generating the source code (main) and a message file / service file is shown. 上記ソースコード(メイン)と、メッセージファイル/サービスファイル、を生成する自動変換用プログラムの例を示す。An example of an automatic conversion program for generating the source code (main) and a message file / service file is shown. 上記ソースコード(メイン)と、メッセージファイル/サービスファイル、を生成する自動変換用プログラムの例を示す。An example of an automatic conversion program for generating the source code (main) and a message file / service file is shown. 上記ソースコード(メイン)と、メッセージファイル/サービスファイル、を生成する自動変換用プログラムの例を示す。An example of an automatic conversion program for generating the source code (main) and a message file / service file is shown. 上記ソースコード(メイン)と、メッセージファイル/サービスファイル、を生成する自動変換用プログラムの例を示す。An example of an automatic conversion program for generating the source code (main) and a message file / service file is shown. 上記ソースコード(メイン)と、メッセージファイル/サービスファイル、を生成する自動変換用プログラムの例を示す。An example of an automatic conversion program for generating the source code (main) and a message file / service file is shown. 上記ソースコード(メイン)と、メッセージファイル/サービスファイル、を生成する自動変換用プログラムの例を示す。An example of an automatic conversion program for generating the source code (main) and a message file / service file is shown. 上記ソースコード(メイン)と、メッセージファイル/サービスファイル、を生成する自動変換用プログラムの例を示す。An example of an automatic conversion program for generating the source code (main) and a message file / service file is shown. 上記ソースコード(メイン)と、メッセージファイル/サービスファイル、を生成する自動変換用プログラムの例を示す。An example of an automatic conversion program for generating the source code (main) and a message file / service file is shown. 上記ソースコード(メイン)と、メッセージファイル/サービスファイル、を生成する自動変換用プログラムの例を示す。An example of an automatic conversion program for generating the source code (main) and a message file / service file is shown.
[A]ロボットミドルウェア
ロボットミドルウェアは、ロボット機能要素のソフトウエアモジュールを複数組み合わせてロボットシステムを構築するためのソフトウエアプラットフォームである。ロボットミドルウェアとしては、米国のWillowGarage社が展開するROS(Robot Operating System)、欧州におけるOrocosやiCub/Yarp等のプロジェクト、日本におけるOpenRTMプロジェクトが知られている。また、企業が独自に開発したミドルウェアも存在する。ここでは、ROSとOpenRTM-aistを例にとって、本実施形態を説明するが、本発明が適用されるミドルウェアは、ROSとOpenRTM-aistに限定されないことが当業者に理解される。
[A] Robot middleware Robot middleware is a software platform for constructing a robot system by combining a plurality of software modules of robot functional elements. As robot middleware, ROS (Robot Operating System) developed by Willow Garage in the US, projects such as Orocos and iCub / Yarp in Europe, and OpenRTM projects in Japan are known. There are also middleware developed by companies. Here, the present embodiment will be described by taking ROS and OpenRTM-aist as an example, but it will be understood by those skilled in the art that middleware to which the present invention is applied is not limited to ROS and OpenRTM-aist.
[A-1]ROS(Robot Operating System)
ROSの詳細については、http://www.ros.org/wiki/を参照することができる。ここでは、本実施形態の理解に必要なROSに関連する用語を幾つか説明する。以下の記載には、前記ウェブサイトの記載の翻訳に基づく記述が含まれる。
[A-1] ROS (Robot Operating System)
For more information on ROS, you can refer to http://www.ros.org/wiki/. Here, some terms related to ROS necessary for understanding the present embodiment will be described. The following description includes a description based on the translation of the description on the website.
[Package(パッケージ)]
パッケージ(package)は、まとまった機能を提供するソフトウェア群が含まれるフォルダないし開発用のファイルの集合である。パッケージはROSにおけるメインユニットであり、ROSのソフトウェアは、パッケージ内で組織化されている。パッケージには、ROSのランタイムプロセス(ノード)、ROS依存ライブラリ、データセット、コンフィギュレーションファイル、その他有用に組織化され得るファイルが含まれている。
[Package]
A package is a set of folders or development files containing software that provides a set of functions. The package is the main unit in ROS, and ROS software is organized in the package. The package contains ROS runtime processes (nodes), ROS dependent libraries, datasets, configuration files, and other files that can be usefully organized.
[Node(ノード)]
ノードは、計算の実行するプロセスであり、ROSを用いて他のノードと通信可能な実行ファイルである。ノードは、ソフトウェアの1つの機能単位、すなわち、ロボット機能要素モジュールである。ロボット制御システムは多くのノードから構成される。
[Node]
A node is a process that performs computation, and is an executable file that can communicate with other nodes using ROS. A node is a functional unit of software, that is, a robot functional element module. The robot control system is composed of many nodes.
[msg files(メッセージファイル)]
Message(メッセージ)は、トピックをサブスクライブあるいはパブリッシングする時に用いられるROSデータ型である。ノードは、このメッセージを渡すことによって互いに通信する。メッセージは、型付けられたフィールドを含むシンプルなデータ構造である。メッセージのデータ構造は、シンプルなテキストファイルであるメッセージファイルによって特定される。メッセージファイルは、1行につき、フィールド型とフィールドネームを伴うシンプルテキストファイルである。フィールド型としては、「int8, int16, int32, int64 (plus uint*)」、「float32, float64」、「string」、「time, duration」、「other msg files」、「variable-length
array[] and fixed-length array[C]」がある。メッセージファイルは、異なる言語におけるメッセージのためのソースコードの生成に用いられる。メッセージファイルは、パッケージのメッセージディレクトリに格納されている。Message(msg)types(メッセージ型)は、パッケージ内に格納されたメッセージ記述であり、ROS内で送信されるメッセージのデータ構造を定義する。
[Msg files]
Message is a ROS data type used when subscribing or publishing a topic. Nodes communicate with each other by passing this message. A message is a simple data structure that contains typed fields. The data structure of the message is specified by a message file that is a simple text file. The message file is a simple text file with a field type and a field name per line. Field types include "int8, int16, int32, int64 (plus uint *)", "float32, float64", "string", "time, duration", "other msg files", "variable-length
array [] and fixed-length array [C] ". Message files are used to generate source code for messages in different languages. The message file is stored in the message directory of the package. Message (msg) types (message type) is a message description stored in the package, and defines the data structure of the message transmitted in the ROS.
[srv files(サービスファイル)]
サービスは、サービスファイルを用いて定義され、サービスファイルは、ROSクライアントライブラリによってソースコードにコンパイルされる。サービスファイルは、サービスを記述し、リクエストとリスポンスの2つからなる。サービスファイルは、リクエストとリスポンスの2つを含むことを除いて、メッセージファイルと同様である。サービスファイルの例として、「int64 A」、「int64 B」、「int64
Sum」を示す。A、Bは要求(request)で、Sumは応答(response)である。サービスファイルは、パッケージのサービスディレクトリに格納されている。Service (srv)types(サービス型)は、パッケージ内に格納されたサービス記述であり、ROS内のサービスの要求(request)及び応答(response) データ構造を定義する。
[Srv files (service file)]
A service is defined using a service file, and the service file is compiled into source code by the ROS client library. A service file describes a service and consists of two parts, a request and a response. A service file is similar to a message file except that it contains two, a request and a response. Examples of service files are “int64 A”, “int64 B”, “int64
Sum ". A and B are requests, and Sum is a response. The service file is stored in the package service directory. Service (srv) types is a service description stored in a package, and defines a request data request and response data structure in the ROS.
[Topic(トピック)]
ROSでは、データの送受信はトピックを用いて実行される。トピックは、名前付けられたバスであり、それを通してノードがメッセージを交換する。ノード(publishers)は、メッセージを所与のトピックに対してパブリッシュすることによって当該メッセージを送信する。トピックはメッセージの内容を特定する名前である。あるデータに関心のあるノード(subscribers)は、適当なトピックに対してサブスクライブする。パブリッシャーはデータを提供する側で、サブスクライバーはデータを受け取る側である。1つのトピックに対して同時に多数のパブリッシャー及びサブスクライバーが存在し得る。また、1つのノードが多数のトピックに対してパブリッシュおよび/あるいはサブスクライブし得る。一般に、パブリッシャー及びサブスクライバーは互いの存在を認知しない。論理的には、トピックは、強固に型付けられたメッセージバスとして捉えることができる。各バスは名前を有しており、誰でもバスにコネクトしてメッセージ(所定の型を備えた)の送信・受信が可能である。ノードは必要なトピックにアクセスして、データを受け取る。トピックは、一方向のストリーミング通信を意図しており、リクエストに対する応答の受信を実行するノードは、サービスを用いることになる。
[Topic]
In ROS, data transmission / reception is performed using topics. A topic is a named bus through which nodes exchange messages. Nodes send messages by publishing the message to a given topic. The topic is a name that identifies the content of the message. Subscribers interested in certain data subscribe to the appropriate topic. A publisher is a side that provides data, and a subscriber is a side that receives data. There can be multiple publishers and subscribers simultaneously for a topic. A node may also publish and / or subscribe to multiple topics. In general, publishers and subscribers are unaware of each other's existence. Logically, topics can be viewed as a strongly typed message bus. Each bus has a name, and anyone can connect to the bus and send and receive messages (with a predetermined type). The node accesses the required topic and receives data. The topic is intended for one-way streaming communication, and the node that receives the response to the request uses the service.
Publisher Nodeのコード例を示す(上記ウェブサイトから抜粋)
Figure JPOXMLDOC01-appb-I000001
pub = rospy.Publisher("chatter", String)は、このノードが、メッセージ型Stringを用いてchatterトピックに対してパブリッシュすることを宣言している。
Sample code for Publisher Node (extracted from the above website)
Figure JPOXMLDOC01-appb-I000001
pub = rospy.Publisher ("chatter", String) declares that this node publishes to the chatter topic using the message type String.
Subscriber Nodeのコード例を示す(上記ウェブサイトから抜粋)
Figure JPOXMLDOC01-appb-I000002
rospy.Subscriber("chatter",String,callback)は、このノードが、メッセージ型Stringのchatterトピックをサブスクライブすることを宣言する。
Example code for Subscriber Node (extracted from the above website)
Figure JPOXMLDOC01-appb-I000002
rospy.Subscriber ("chatter", String, callback) declares that this node subscribes to the chatter topic of message type String.
[Service(サービス)]
サービスは、データの送受信ではなく、ある操作に対して、そのレスポンスを受け取るような場合(要求/応答の実行)に用いられる。サービスは、要求(request)と応答(reply)の一対のメッセージによって定義される。提供されるROSノードは、名前の下でサービスを提供し、クライアントは、リクエストメッセージを送信することでサービスを呼び、応答を待つ。サービスは関数の呼び出しないしremote procedure callに類似する。
[Service]
The service is used when receiving a response to a certain operation (execution of a request / response) instead of sending and receiving data. A service is defined by a pair of messages, a request and a reply. The provided ROS node provides a service under the name, and the client calls the service by sending a request message and waits for a response. A service is similar to a function call or remote procedure call.
Service Nodeのコード例を示す(上記ウェブサイトから抜粋)
Figure JPOXMLDOC01-appb-I000003
Service Node code example (extracted from the above website)
Figure JPOXMLDOC01-appb-I000003
Client Nodeのコード例を示す(上記ウェブサイトから抜粋)
Figure JPOXMLDOC01-appb-I000004
Client Node code example (extracted from the above website)
Figure JPOXMLDOC01-appb-I000004
[A-2]OpenRTM-aist
OpenRTM-aistの詳細については、http://www.openrtm.org/openrtm/ja/content/openrtm-aist-official-websiteを参照することができる。ここでは、本実施形態の理解に必要なOpenRTM-aistに関連する用語を幾つか説明する。以下の記載には、前記ウェブサイトの記載の援用が含まれる。
[A-2] OpenRTM-aist
For details of OpenRTM-aist, you can refer to http://www.openrtm.org/openrtm/en/content/openrtm-aist-official-website. Here, some terms related to OpenRTM-aist necessary for understanding the present embodiment will be described. The following description includes the use of the description of the website.
[RTコンポーネント(RTC)]
OpenRTM-aistでは、ロボット機能要素をソフトウエアモジュール化したものをRTコ ンポーネント(RT-Component:RTC)と呼ぶ。RTコンポーネントには、他のRTコンポーネントとデータをやり取りしたり、通信したりするためのポートと呼 ばれるインターフェースを備えている。ロボットシステムを作る際に、機能要素 (RTコンポーネント) ごとにプログラムを作成し、RTコンポーネントをつなぎ合わせることでシステムを構築する。RTシステムは、複数のRTコンポーネントのポート(データ通信用のエンドポイント)をつなぎ合わせ、それぞれのRTコンポーネント機能の集合体として構築される。RTC開発者は、自己が保有する制御アルゴリズムのコードや、既存のライブラリコード等 (コアロジックと呼ぶ) を、RTCBuilder等のツールによって自動生成されるRTCの雛型コードに埋め込み、コンパイル (スクリプト言語では不要) することで、RTCを作成することができる。
[RT component (RTC)]
In OpenRTM-aist, the robot function elements that are made into software modules are called RT components (RT-Component: RTC). The RT component has an interface called a port for exchanging data and communicating with other RT components. When creating a robot system, a program is created for each functional element (RT component), and the system is constructed by connecting RT components. The RT system is constructed as a collection of RT component functions by connecting a plurality of RT component ports (endpoints for data communication). RTC developers embed their own control algorithm code and existing library code (called core logic) in the RTC template code that is automatically generated by tools such as RTCBuilder and compile it (in script languages) RTC can be created.
[データポート]
データポートは主に連続的なデータをRTC間で送受信するためのポートであり、データを他のRTCへ送信するためのデータポート(OutPort)、他のRTCからデータを受信するためのデータポート(InPort)の2種類がある。1つのRTCは必要に応じて任意の数のデータポートを備える。例えば、 センサからデータを取得するコンポーネントを作る場合には、このコンポーネントは少なくとも一つのセンサデータを出力するためのOutPortが必要となる。あるいは、指定されたトルク値に従って、モータを駆動するコンポーネントを作る場合には、このコンポーネントは、少なくとも一つの一つのトルク値指令を受け取るInPortが必要になる。これらのコンポーネントを利用して、フィー ドバック制御を行うための制御器 (コントローラ) コンポーネントを作る場合には、センサデータを受け取るInPort、指令値 (例えば速度指令)を受け取るInPort、トルク値を出力するOutPortのそれぞれが必要となる。データポートにはそれぞれ特有の型があり、データポートの型の定義はIDL(Interface Definition Language)という言語非依存のインターフェース定義言語によって定められている。同じデータ型同士なら、言語やOSが異なっていても、ネットワークを介して接続・通信することができる。
[Data port]
The data port is a port for mainly transmitting / receiving continuous data between RTCs, a data port (OutPort) for transmitting data to other RTCs, and a data port for receiving data from other RTCs ( InPort). One RTC has any number of data ports as required. For example, when creating a component that acquires data from a sensor, this component requires an OutPort to output at least one sensor data. Alternatively, when creating a component that drives a motor according to a specified torque value, this component requires an InPort that receives at least one torque value command. When creating a controller component for feedback control using these components, InPort that receives sensor data, InPort that receives command values (for example, speed command), and OutPort that outputs torque values Each of these is required. Each data port has a specific type, and the definition of the data port type is defined by a language-independent interface definition language called IDL (Interface Definition Language). The same data type can be connected and communicated via the network even if the language and OS are different.
[サービスポート]
ロボットシステムを構築するためには、コンポーネント間のデータ通信に加えて、コマンドレベル(あるいは関数レベル)のコンポーネント間通信が必要となる。例えば、ロボットアームを制御するマニピュレータコンポーネントの場合、手先の位置や速度などは、上位のアプリケーションやコンポーネントからデータポートで送られるべきデータである。一方、ロボットアームの各種設定、座標系の設定、制御パラメータの設定、動作モードの設定、等については、マニピュレータオブジェクトに対して、setCoordinationSystem( )、setParameter( )、 setMode( )、等の関数を用意し、これらの関数を必要に応じて適切なタイミングで呼ぶ。サービスポートはこのようなコマンドレベルのコンポーネント間のやり取りを行うための仕組みを提供する。一般にサービスとは、機能的に関連のあるひとまとまりのコマンド(関数、メ ソッド、オペレーションなどとも呼ばれる) 群であり、OpenRTM-aistにおいては、この機能を提供する側をサービスプロバイダ(Service Provider)、機能を利用する側をサービスコンシューマ(Service Consumer)と呼ぶ。RTコンポーネントはデータポート同様、任意の数のサービスポートを持つことができる。また、サービスポートには、任意の種類、数のプロバイダまたはコンシューマを付加することができる。プロバイダおよびコンシューマをまとめてインターフェースまたは、サービスインターフェースと呼び、これらサービスインターフェースを持つポートをサービスポートと呼ぶ。データポート同様、言語、OSが異なって いてもインターフェース型が同じなら接続し関数を呼び出すことができる。「同じ型」とは同一のインターフェース定義を持つことである。
[Service Port]
In order to construct a robot system, in addition to data communication between components, communication between components at a command level (or function level) is required. For example, in the case of a manipulator component that controls a robot arm, the position and speed of the hand are data to be sent from a host application or component through a data port. On the other hand, functions such as setCoordinationSystem (), setParameter (), setMode (), etc. are prepared for the manipulator object for various settings of the robot arm, coordinate system, control parameter, operation mode, etc. These functions are called at an appropriate timing as necessary. The service port provides a mechanism for such exchange between command level components. Generally, a service is a group of commands (also called functions, methods, operations, etc.) that are functionally related. In OpenRTM-aist, the side that provides this function is the service provider, The side that uses the function is called a service consumer. RT components can have any number of service ports as well as data ports. Also, any type and number of providers or consumers can be added to the service port. A provider and a consumer are collectively referred to as an interface or a service interface, and a port having these service interfaces is referred to as a service port. As with data ports, even if the language and OS are different, if the interface type is the same, you can connect and call functions. “Same type” means having the same interface definition.
[インターフェース定義]
OpenRTM-aistでは、インターフェースはIDLと呼ばれるCORBAのインターフェー ス定義言語によって定義する。IDLは言語に依存しないインターフェース定義方法を提供し、またIDLコンパイラを利用することで、各種言語に対応したコード(スタブやスケルトン)が自動的に生成される。スタブは、リモートのオブジェクトを呼び出すためのプロキシオブジェクトのためのコードであり、スケルトンは、プロバイダを実装するためのベースとなるコードである。これら自動生成されるコードによって、異なる言語同士の呼び出しをシームレスに行うことができる。例えば、C++で実装されたプロバイダを、Pythonや Java等で容易に呼び出すことができる。
[Interface definition]
In OpenRTM-aist, the interface is defined by the CORBA interface definition language called IDL. IDL provides a language-independent interface definition method, and by using an IDL compiler, codes (stubs and skeletons) corresponding to various languages are automatically generated. A stub is a code for a proxy object for calling a remote object, and a skeleton is a base code for implementing a provider. With these automatically generated codes, calling between different languages can be performed seamlessly. For example, a provider implemented in C ++ can be easily called with Python or Java.
以下は、OpenRTM-aistのサンプルで使用されているIDL定義である(上記ウェブサイトから抜粋)。
Figure JPOXMLDOC01-appb-I000005
moduleはC++の名前空間に相当し、これによりインターフェース名の衝突を防ぐ。C言語等と同様にtypedefキーワードがある。上記例では、sequence(動的配列型)を定義している。1つは、string(文字列型)型のリストとしてEchoList型、もう1つはfloat型のリストとしてValueList型を定義している。次にinterfaceで始まる部分が実際のインターフェースの定義になる。MyServiceインターフェースには、5つの関数(オペレーション)が定義されている。C言語やJavaなどと類似の定義であるが、IDLでは引数が入力であるか出力であるかを明確にするために、引数宣言の前に、in, out またはinoutの修飾子が付く。
The following is the IDL definition used in the OpenRTM-aist sample (extracted from the above website).
Figure JPOXMLDOC01-appb-I000005
module is equivalent to a C ++ namespace, which prevents interface name collisions. There is a typedef keyword as well as C language. In the above example, sequence (dynamic array type) is defined. One defines an EchoList type as a string (string type) type list, and the other defines a ValueList type as a float type list. Next, the part that starts with interface is the actual interface definition. Five functions (operations) are defined in the MyService interface. Although it is a definition similar to C language or Java, IDL adds an in, out or inout modifier before the argument declaration to clarify whether the argument is input or output.
[IDLコンパイル]
定義されたIDLをIDLコンパイラに与えてコンパイルを行うと、通常スタブとスケルトン (またはサーバとクライアントと呼ぶ場合もある)のためのコードが生成される。クライアント、すなわちサービスを利用する側は、スタブコードのインクルード等により、スタブとして定義されているプロキシ(代理)オブジェクトを利用して、リモートにある、サーバの機能にアクセスする。IDLを定義して、コンパイルすることで、分散オブジェクトを定義し利用するのに必要な大半のコードが自動的に生成される。IDLの定義方法自体については、C言語やJavaに携わる当業者において比較的容易に定義できるので、詳細な説明は省略する。
[IDL compilation]
Compiling with the IDL defined to the IDL compiler usually generates code for stubs and skeletons (sometimes called servers and clients). A client, that is, a service user uses a proxy (proxy) object defined as a stub by using stub code inclusion or the like to access a remote server function. Defining and compiling IDL automatically generates most of the code needed to define and use distributed objects. Since the IDL definition method itself can be relatively easily defined by those skilled in the art working on C language and Java, detailed description thereof is omitted.
[B]異なるタイプのロボットミドルウェア間を連携する変換モジュール
異なる規格からなるロボットミドルウェアの相互運用を行うための、あるミドルウェア上で稼働しているプログラムを、別のミドルウェア上からも制御・通信できるようにするために、プログラム自体を仮想化し情報を変換するブリッジと呼ばれる変換モジュールを生成する。ブリッジモジュールの生成を自動で行えれば、逐一人手による作業が発生せず効率化につながるばかりでなく、ミドルウェアやプログラムの更新や変更に迅速に対応できるようになる。
[B] Conversion module for linking different types of robot middleware To enable control and communication of programs running on one middleware for interoperating robot middleware with different standards from another middleware Therefore, a conversion module called a bridge that virtualizes the program itself and converts information is generated. If the bridge module can be automatically generated, it is possible not only to work by one person at a time, but also to improve efficiency, and to quickly respond to middleware and program updates and changes.
「ブリッジ」とは、2つのシステムや構成単位の間で情報を交換する装置(ソフトウェアを含む)である。このような、ブリッジモジュールは、ハードウェアとしてのコンピュータ(入力部、出力部、演算部、記憶部、表示部等を備える)と、コンピュータに所定の機能を実行させるようなソフトウェアとの協働によって実現される。 A “bridge” is a device (including software) that exchanges information between two systems and structural units. Such a bridge module is obtained by the cooperation of a computer (including an input unit, an output unit, a calculation unit, a storage unit, a display unit, etc.) as hardware and software that causes the computer to execute a predetermined function. Realized.
本実施形態では、相互運用したいミドルウェアの分析に基づいたブリッジモジュールの自動生成方法を提供するものである。ロボット機能要素モジュールの自動変換はオンライン方式とオフライン方式の2つの方法で解決し得ることを示し、プログラムの入出力が静的(プログラム実行前)に明らかなミドルウェアではオンライン方式が、そうでない場合にはオフライン方式を採用する。ブリッジモジュールの自動生成として、オンラインの変換方式とオフラインの変換方式、具体的には、実行しているプログラムの入出力を調べこれに対応したインターフェース定義ファイルとプログラムを生成するオンラインの変換方式と、インターフェース定義ファイルの解析から対応するプログラムを生成するオフラインの変換方式と、を提案する。いずれの方式も、「インターフェース定義ファイル(広義)」と「ソースコード」を生成し、ブリッジモジュールを実現する。従来、そのための具体的な手続きは明らかになっていなかったが、本実施形態では、ブリッジモジュールの自動生成にはオンラインとオフラインの2つの方式があることを示し、対象となるミドルウェアの分析によりどちらの方法を採用すればよいかという、手続を与える。 In the present embodiment, a method for automatically generating a bridge module based on analysis of middleware to be interoperated is provided. It shows that automatic conversion of robot functional element module can be solved by two methods of online method and offline method. When middleware with clear input / output of program is static (before program execution), online method is not. Adopts the offline method. As an automatic generation of the bridge module, online conversion method and offline conversion method, specifically, the online conversion method to check the input / output of the running program and generate the interface definition file and program corresponding to this, We propose an offline conversion method that generates a corresponding program from the analysis of the interface definition file. Both methods generate “interface definition file (broad definition)” and “source code” to realize a bridge module. Conventionally, the specific procedure for this has not been clarified, but in this embodiment, it is shown that there are two methods of automatic generation of the bridge module, online and offline, which is determined by analysis of the target middleware. Proceed with the procedure of whether to adopt the method.
[B-1]OpenRTM-ROS自動相互運用システム
ROSのノードプログラムから自動的にROSとOpenRTMの間で情報を変換するブリッジコンポーネントないしブリッジモジュールを生成することができれば、簡便にROSノードプログラムをOpenRTMから利用できるだけでなく、将来ROSのノードプログラムの仕様に変更があった際にも、OpenRTM側で明示的に対応する必要なく、継続的にブリッジコンポーネントを利用することが出来るようになる。
[B-1] OpenRTM-ROS automatic interoperability system
If a bridge component or bridge module that automatically converts information between ROS and OpenRTM can be generated from the ROS node program, the ROS node program can be easily used from OpenRTM, and the specification of the future ROS node program. Even if there is a change in, the bridge component can be used continuously without having to deal explicitly with OpenRTM.
OpenRTMとROSを対比すると、ミドルウェアの構成単位(ロボット機能要素モジュール)は、前者がRTコンポーネントで、後者がノードであり、RTコンポーネントとノードが対応する。OpenRTMでは、「サービスポート」と「データポート」が提供される。データポートはデータを送受信するためのポートである。サービスポートはデータの送受信だけでなく、特定の関数をリモートから実行させる仕組みと考えられる。サービスのリクエストに対して、その成否結果を返すことができる。ROSでは、「トピック」と「サービス」が提供される。トピックは、一方向のストリーミング通信を意図しており、トピックの内容を特定するメッセージを記述するメッセージファイルは、異なる言語におけるメッセージのためのソースコードを生成することに用いられる。リクエストに対する応答の受信を実行するノードは、サービスを用いる。サービスの内容を特定するサービスファイルは、要求と応答の2つからなり、パッケージのサービスディレクトリに格納されている。OpenRTMのデータポートとROSのトピック、OpenRTMのサービスポートとROSのサービスが、前者は一方向のデータの流れ(データ送受信)、後者はデータを送りその結果を受け取る(関数呼び出し)、という意味で同じ機能をさしている。 Comparing OpenRTM and ROS, the middleware component unit (robot function element module) is that the former is an RT component, the latter is a node, and the RT component and node correspond. OpenRTM provides a "service port" and a "data port". The data port is a port for transmitting and receiving data. A service port is considered to be a mechanism that allows a specific function to be executed remotely as well as data transmission and reception. In response to a service request, the success / failure result can be returned. ROS provides “topics” and “services”. A topic is intended for one-way streaming communication, and a message file that describes a message that specifies the content of the topic is used to generate source code for messages in different languages. A node that executes reception of a response to a request uses a service. A service file for specifying the contents of a service consists of two requests and a response, and is stored in the service directory of the package. OpenRTM data port and ROS topic, OpenRTM service port and ROS service are the same in the sense that the former is one-way data flow (data transmission / reception) and the latter sends data and receives the result (function call) It is functioning.
OpenRTMのコンポーメントプログラムは、コンポーネントに対応したIDLファイルを解析することで、そのコンポーネントがどのようなデータポートポート、および/あるいは、サービスポートを提供するかわかる。一方、ROSのプログラムは、プログラムの中身を解析しない限り、プログラムがどのような入出力を持つかは分からない。より具体的には、稼働しているROSモジュールの入出力のトピック、サービスの種類と、そこでやりとりされるメッセージファイル(トピックの場合)、サービスファイル(サービスの場合)の種類を解析する必要がある。ROSのメッセージファイルはIDLのなかでデータ型として定義でき、ROSのサービスファイルはIDLの関数呼び出しに対応する。 By analyzing the IDL file corresponding to the component, the OpenRTM component program knows what data port port and / or service port the component provides. On the other hand, unless the ROS program analyzes the contents of the program, it does not know what input / output the program has. More specifically, it is necessary to analyze the input / output topics and service types of the operating ROS module and the types of message files (topics) and service files (services) exchanged there. . ROS message files can be defined as data types in IDL, and ROS service files correspond to IDL function calls.
オンライン変換方式によりROSのノードプログラムからOpenRTMのコンポーネントプログラムを生成するツールと、オフライン変換方式によりOpenRTMのコンポーネントプログラムからROSのノードプログラムを生成するツールと、を開発した。 We developed a tool that generates an OpenRTM component program from an ROS node program using an online conversion method, and a tool that generates an ROS node program from an OpenRTM component program using an offline conversion method.
[B-2]オンライン変換方式
オンライン変換方式は、起動しているノードプログラムの入出力を調べ、これに対応したidlファイル並びにブリッジモジュールのソースコードを生成する方式である。
[B-2] Online Conversion Method The online conversion method is a method for checking input / output of a running node program and generating a corresponding idl file and bridge module source code.
オンライン変換方式は、ロボットミドルウェアシステムのロボット機能要素モジュールのプログラムの入出力が、当該プログラムを実行するまで明らかでないようなシステムを対象とした場合に有効な方法である。例えば、ROSのノードプログラムにおいては、メッセージインターフェース定義ファイルはデータの入出力を定義するが、それがどのノードプログラムが提供するものなのかは明記されていないため、ROSのノードプログラムに対応するOpenRTMのコンポーメントプログラムを提供するブリッジモジュールを生成する場合は、オンライン変換方式が適切である。 The online conversion method is an effective method for a system in which the input / output of the program of the robot functional element module of the robot middleware system is not clear until the program is executed. For example, in the ROS node program, the message interface definition file defines the input and output of data, but it is not specified which node program provides it, so the OpenRTM corresponding to the ROS node program is not specified. When generating a bridge module that provides a component program, an online conversion method is appropriate.
 ROSのノードプログラムに対応するOpenRTMのコンポーメントプログラムを提供するブリッジモジュールを生成するためのフローチャートを図1Aに示す。
 ROSからOpenRTMへの変換例を図5A~図8Gに示す。
 図5A~図5C(rosnode.info.txt)ROSのノード情報を例示している。
 図6A~図6H(rosbridge_idl.py)は、本実施形態に係る自動変換用プログラムを用いて自動生成されたソースコードである。
 図7A、7Bは(rosbridge.idl)は、本実施形態に係る自動変換用プログラムを用いて自動生成されたIDLファイルである。
 図8A~図8G(rtmros-data-bridge.py)は、上記2つのファイル(ソースコードとIDLファイル)を生成し、また、これらのファイルを使ってOpenRTMノードを作る自動変換用プログラム(いわば、変換プログラム実行制御ソースコード)である。ブリッジモジュールは、自動変換用プログラムによって生成される。
 さらに、図1Aを参照して説明する。
(1) ROSノードのmsg、srv(msgファイル、srvファイル)を自動変換用プログラム(図8A~図8G)で解析し、処理することで、「IDLファイル(図7A、7B)」と「メインソースコード(図6A~6H)」が同時に生成される。メインソースコード(本実施形態ではPythonファイル)は、異ミドルウェア間変換ソースコード(の本体部分)であり、いわばミドルウェア変換コアソースコードである。
(2) ROSノードのmsg、srvファイルを公知のROSコンパイラで処理することで、インターフェースソースファイル(Pythonファイル)が生成される。
(3) (1)で生成された「IDLファイル」を公知のIDLコンパイラで処理することで、「IDLファイル」のソースコード(Pythonファイル)を生成する。
(4) 上記3つのソースコードを、自動変換用プログラム(図8A~図8G)を用いて処理してブリッジプログラムを生成する。
FIG. 1A shows a flowchart for generating a bridge module that provides an OpenRTM component program corresponding to a ROS node program.
Examples of conversion from ROS to OpenRTM are shown in FIGS. 5A to 8G.
FIG. 5A to FIG. 5C (rosnode.info.txt) illustrate ROS node information.
6A to 6H (rosbridge_idl.py) are source codes that are automatically generated using the automatic conversion program according to the present embodiment.
7A and 7B are (rosbridge.idl) IDL files that are automatically generated using the automatic conversion program according to the present embodiment.
8A to 8G (rtmros-data-bridge.py) generates the above two files (source code and IDL file) and uses these files to create an OpenRTM node (so to speak, Conversion program execution control source code). The bridge module is generated by an automatic conversion program.
Furthermore, it demonstrates with reference to FIG. 1A.
(1) By analyzing and processing the ROS node msg, srv (msg file, srv file) with the automatic conversion program (FIGS. 8A to 8G), the “IDL file (FIGS. 7A, 7B)” and “Main” Source code (FIGS. 6A-6H) ”is generated simultaneously. The main source code (Python file in the present embodiment) is a different middleware conversion source code (the main part), which is a middleware conversion core source code.
(2) By processing the msg and srv files of the ROS node with a known ROS compiler, an interface source file (Python file) is generated.
(3) By processing the “IDL file” generated in (1) with a known IDL compiler, a source code (Python file) of the “IDL file” is generated.
(4) The above three source codes are processed using an automatic conversion program (FIGS. 8A to 8G) to generate a bridge program.
図3Aは、ROSのナビゲーションノードを示す。中央の楕円はノードであり、ノードの周囲の複数の矩形はそれぞれトピックを示している。トピックからノードへ向かう→は入力(サブスクライブ)で、ノードからトピックへ向かう→は出力(パブリッシュ)である。図3Bは、自動生成されたROSナビゲーション機能を提供するRTMコンポーネントを示す。中央の縦長方形がコンポーネントであり、左側に入力ポート、右側に出力ポートが備わっている。図3Cにおいて、左側はROSのナビゲーションチュートリアルが生成される二次元のナビゲーションシミュレータ (上)と、そのセンサ情報表示 (下)あり、右図はそこで稼動しているROSのナビゲーションノードから自動的に生成されたOpenRTMのナビゲーションコンポーネントを表示している様子になっており、OpenRTMの入出力でROSのナビゲーション機能を利用できるようになっている。 FIG. 3A shows a navigation node of ROS. The central ellipse is a node, and a plurality of rectangles around the node indicate topics. From the topic to the node is input (subscribe), and from the node to the topic is output (publish). FIG. 3B shows an RTM component that provides an automatically generated ROS navigation function. The central vertical rectangle is the component, with the input port on the left and the output port on the right. In Fig. 3C, the left side is a two-dimensional navigation simulator 上 (top) where the ROS navigation tutorial is generated, and its sensor information display (bottom), and the right side is automatically generated from the navigation node of the ROS operating there. The navigation component of OpenRTM is displayed, and the ROS navigation function can be used with OpenRTM input and output.
[B-3]オフライン変換方式
オフライン変換方式は、コンポーメントのインターフェース定義ファイルであるIDLファイルを解析し、そこから対応したインターフェース定義ファイル(メッセージファイル、サービスファイル)を生成し、ブリッジモジュールのソースコードを生成する方式である。
[B-3] Offline conversion method The offline conversion method analyzes an IDL file that is a component interface definition file, generates a corresponding interface definition file (message file, service file) from the IDL file, and generates the source code of the bridge module. Is a method for generating
オフライン変換方式は、ロボットミドルウェアシステムのロボット機能要素モジュールのプログラムの入出力がインターフェース定義ファイルに明記されている場合に有効な方法である。例えば、OpenRTMのコンポーメントプログラムは、コンポーネントに対応したインターフェース定義ファイルを解析することで、そのコンポーネントがどのようなデータポートポート、および/あるいは、サービスポートを提供するかわかるため、OpenRTMのコンポーネントプログラムからROSのノードプログラムを提供するブリッジモジュールを生成する場合はオフライン変換方式が適切である。 The offline conversion method is an effective method when the input / output of the program of the robot functional element module of the robot middleware system is specified in the interface definition file. For example, an OpenRTM component program can understand what data port port and / or service port the component provides by analyzing the interface definition file corresponding to the component. An off-line conversion method is appropriate when generating a bridge module that provides a ROS node program.
 OpenRTMのコンポーネントプログラムからROSのノードプログラムを提供するブリッジモジュールを生成するためのフローチャートを図1Bに示す。
 OpenRTMからROSへの変換例を図9~図18に示す。
 図9(MyService.idl)は、OpenRTMのIDLファイルを例示する。
 図9A~図9E(MyServiceROSBridge.cpp)、図10A~図10C( MyServiceROSBridge.h)、図11A、11B(MyServiceROSBridgeComp.cpp)は、本実施形態に係る自動変換用プログラムを用いて自動生成されたソースコード(メイン)を示す。
 図12(SimpleService_MyService_echo.srv)、
 図13(SimpleService_MyService_get_echo_history.srv)、
 図14(SimpleService_MyService_get_value.srv)、
 図15(SimpleService_MyService_get_value_history.srv、
 図16(SimpleService_MyService_set_value.srv)、
 図17(StringMultiArray.msg)、
は、本実施形態に係る自動変換用プログラムを用いて自動生成されたサービスファイル、メッセージファイルである。
 図18A~18L(idl2srv.py)は、OpenRTMのIDLファイルから、上記2つのファイル(ソースコードと、メッセージファイル/サービスファイル)を生成する自動変換用プログラム(いわば、変換プログラム実行制御ソースコード)である。
 さらに、図1Bを参照して説明する。
(1) RTMコンポーネントのIDLファイルを自動変換用プログラムで解析し、処理することで、「メッセージ(msg)ファイル、サービス(srv)ファイル」と「ソースコード(Main) cppファイルとhファイル」が同時に生成される。メインソースコード(本実施形態ではcppファイルとhファイル)は、異ミドルウェア間変換ソースコード(の本体部分)であり、いわばミドルウェア変換コアソースコードである。
(2)RTMコンポーネントのIDLファイルを公知のIDLコンパイラで処理することで、インターフェースソースファイル(cppファイルとhファイル)が生成される。
(3)(1)で生成された「メッセージ(msg)ファイル、サービス(srv)ファイル」を公知のROSコンパイラで処理することで、「メッセージ(msg)ファイル、サービス(srv)ファイル」のソースコード(cppファイルとhファイル)を生成する。
 公知の処理の一部を以下に例示する。
 ./idl_gen/cpp/openrtm_ros_bridge/idl/MyServiceSkel.h
 ./idl_gen/cpp/openrtm_ros_bridge/idl/MyServiceSK.cc
 ./idl_gen/cpp/openrtm_ros_bridge/idl/MyService.hh
 ./idl_gen/cpp/openrtm_ros_bridge/idl/MyServiceDynSK.cc
 ./idl_gen/cpp/openrtm_ros_bridge/idl/MyServiceStub.h
 ./idl_gen/cpp/openrtm_ros_bridge/idl/MyServiceSkel.cpp
 ./idl_gen/cpp/openrtm_ros_bridge/idl/MyServiceStub.cpp
(4)上記3つのソースコードを、公知のC++コンパイラを用いて処理してブリッジプログラムを生成する。
A flow chart for generating a bridge module that provides a ROS node program from an OpenRTM component program is shown in FIG. 1B.
Examples of conversion from OpenRTM to ROS are shown in FIGS.
FIG. 9 (MyService.idl) illustrates an OpenRTM IDL file.
9A to 9E (MyServiceROSBridge.cpp), FIGS. 10A to 10C (MyServiceROSBridge.h), and FIGS. 11A and 11B (MyServiceROSBridgeComp.cpp) are sources automatically generated using the automatic conversion program according to the present embodiment. Indicates the code (main).
Figure 12 (SimpleService_MyService_echo.srv),
Figure 13 (SimpleService_MyService_get_echo_history.srv)
Figure 14 (SimpleService_MyService_get_value.srv),
Figure 15 (SimpleService_MyService_get_value_history.srv,
Figure 16 (SimpleService_MyService_set_value.srv),
Figure 17 (StringMultiArray.msg),
These are service files and message files that are automatically generated using the automatic conversion program according to the present embodiment.
18A to 18L (idl2srv.py) are automatic conversion programs (ie, conversion program execution control source code) that generate the above two files (source code and message file / service file) from the OpenRTM IDL file. is there.
Furthermore, it demonstrates with reference to FIG. 1B.
(1) By analyzing and processing the IDL file of the RTM component with the automatic conversion program, the "message (msg) file, service (srv) file" and "source code (Main) cpp file and h file" are simultaneously Generated. The main source code (in this embodiment, the cpp file and the h file) is a different middleware conversion source code (its main body part), that is, a middleware conversion core source code.
(2) An interface source file (cpp file and h file) is generated by processing the IDL file of the RTM component with a known IDL compiler.
(3) Source code of “message (msg) file, service (srv) file” by processing the “message (msg) file, service (srv) file” generated in (1) with a known ROS compiler (Cpp file and h file).
Some of the known processes are exemplified below.
./idl_gen/cpp/openrtm_ros_bridge/idl/MyServiceSkel.h
./idl_gen/cpp/openrtm_ros_bridge/idl/MyServiceSK.cc
./idl_gen/cpp/openrtm_ros_bridge/idl/MyService.hh
./idl_gen/cpp/openrtm_ros_bridge/idl/MyServiceDynSK.cc
./idl_gen/cpp/openrtm_ros_bridge/idl/MyServiceStub.h
./idl_gen/cpp/openrtm_ros_bridge/idl/MyServiceSkel.cpp
./idl_gen/cpp/openrtm_ros_bridge/idl/MyServiceStub.cpp
(4) The bridge program is generated by processing the three source codes using a known C ++ compiler.
図4において、左図はOpenRTMによるヒューマノイドシミュレーションであり、右図はそこで稼働しているOpenRTMコンポーネントの入出力インターフェース定義ファイルから自動生成したROSノードを示しており、ROSの入出力機能を利用して OpenRTMのヒューマノイドシミュレーション機能が利用できるようになっている。 In Fig. 4, the left figure is a humanoid simulation by OpenRTM, and the right figure shows the ROS node automatically generated from the input / output interface definition file of the OpenRTM component that is running there. The humanoid simulation function of OpenRTM can be used.
明細書に添付されたコードや図面として添付したコードから当業者が読み取れる事項は、本願明細書及び図面に記載した事項として扱うことができることが当業者に理解される。 Those skilled in the art will understand that matters that can be read by those skilled in the art from the code attached to the specification or the code attached as a drawing can be treated as matters described in the present specification and drawings.
ロボットのミドルウェアが現在多数の規格が存在し、また、従来からロボットの研究を行っている企業でも社内で類似のシステムを有している。一方で、各ミドルウェアにはそれぞれ有用なアプリケーションが存在し、それを利用したいと考えた場合に、アプリケーションを別のミドルウェア上に再実装するか、あるいはミドルウェア間のブリッジモジュールを個別に開発するしかないのが現状である。本発明を利用すれば、これらを自動的に生成することができるため、大幅な省力化を可能にする。

 
Numerous standards for robot middleware currently exist, and companies that have traditionally studied robots have similar systems in-house. On the other hand, each middleware has a useful application, and when you want to use it, you have to re-implement the application on another middleware or develop a bridge module between middleware individually. is the current situation. If this invention is utilized, since these can be produced | generated automatically, significant labor saving is attained.

Claims (21)

  1.  第1のタイプのロボット機能要素モジュールのセットを備えた第1のミドルウェアと、第2のタイプのロボット機能要素モジュールのセットを備えた第2のミドルウェアとの間を連携する変換モジュールの自動生成法であって、
     第1のタイプのロボット機能要素モジュールの第1のインターフェース定義を解析して、第2のタイプのロボット機能要素モジュールの第2のインターフェース定義と、ミドルウェア間変換ソースコードと、を生成するステップと、
     前記第2のインターフェース定義と前記ソースコードを用いて、変換モジュールを生成するステップと、
     を備えた自動生成方法。
    Method for automatically generating a conversion module for linking between a first middleware having a set of first-type robot functional element modules and a second middleware having a set of second-type robot functional element modules Because
    Analyzing a first interface definition of a first type robot functional element module to generate a second interface definition of a second type robot functional element module and an inter-middleware conversion source code;
    Using the second interface definition and the source code to generate a conversion module;
    Automatic generation method with
  2.  前記変換モジュールを生成するステップは、
     前記ソースコードと、
     前記第1のインターフェース定義から生成したソースコードと、
     前記第2のインターフェース定義から生成したソースコードと、
    を用いて、変換モジュールを生成する、請求項1に記載の方法。
    The step of generating the conversion module includes:
    The source code;
    Source code generated from the first interface definition;
    Source code generated from the second interface definition;
    The method according to claim 1, wherein the conversion module is generated using.
  3.  第1のタイプのロボット機能要素モジュールの入出力は、第1のインターフェース定義により当該第1のタイプのロボット機能要素モジュールのプログラム実行前に規定されており、前記解析は、当該プログラム実行前に行われる、請求項1または2に記載の方法。 The input / output of the first type robot functional element module is defined by the first interface definition before the execution of the program of the first type robot functional element module, and the analysis is performed before the execution of the program. The method according to claim 1 or 2, wherein:
  4.  第1のミドルウェアは、OpenRTM (Open Robot Middleware)であり、第1のタイプのロボット機能要素モジュールはOpenRTMのコンポーネントであり、前記第1のインターフェース定義はIDLファイルである、請求項1~3いずれか1項に記載の方法。 The first middleware is OpenRTM (Open Robot Middleware), the first type robot function element module is a component of OpenRTM, and the first interface definition is an IDL file. 2. The method according to item 1.
  5.  第2のミドルウェアは、ROS(Robot Operating System)であり、第2のタイプのロボット機能要素モジュールはROSのノードであり、前記第2のインターフェース定義はメッセージファイルないしサービスファイルである、請求項1~4いずれか1項に記載の方法。 The second middleware is ROS (Robot Operating System), the second type robot functional element module is a node of ROS, and the second interface definition is a message file or a service file. 4. The method according to any one of 4 above.
  6.  第1のタイプのロボット機能要素モジュールは、OpenRTMのコンポーネントであり、第2のタイプのロボット機能要素モジュールは、ROSのノードであり、
     前記コンポーネントのIDLファイルを解析して、ノードのメッセージファイルあるいは/およびサービスファイルと、ソースコードと、を生成するステップと、
     IDLコンパイラによって前記IDLファイルのソースコードを生成するステップと、
     ROSコンパイラによって前記メッセージファイルあるいは/およびサービスファイルのソースコードを生成するステップと、を備え、
     前記3つのソースコードを用いて、変換モジュールを生成する、
     請求項5に記載の方法。
    The first type of robot functional element module is a component of OpenRTM, the second type of robot functional element module is a node of ROS,
    Analyzing the component IDL file to generate a node message file or / and a service file and source code;
    Generating a source code of the IDL file by an IDL compiler;
    Generating a source code of the message file or / and the service file by a ROS compiler,
    A conversion module is generated using the three source codes.
    The method of claim 5.
  7.  第1のタイプのロボット機能要素モジュールの入出力は、当該第1のタイプのロボット機能要素モジュールのプログラム実行時に特定されるようになっており、前記解析は、当該プログラム実行時に行われる、請求項1または2に記載の方法。 The input / output of the first type robot functional element module is specified when the program of the first type robot functional element module is executed, and the analysis is performed when the program is executed. The method according to 1 or 2.
  8.  第1のミドルウェアは、ROS(Robot Operating System)であり、第1のタイプのロボット機能要素モジュールはROSのノードであり、前記入出力は、実行されているノードのトピックのメッセージファイルあるいは/およびサービスのサービスファイルを解析することで取得される、請求項7に記載の方法。 The first middleware is ROS (Robot Operating System), the first type robot functional element module is a node of ROS, and the input / output is a message file or / and service of the topic of the node being executed. The method according to claim 7, wherein the method is obtained by analyzing a service file.
  9.  第2のミドルウェアは、OpenRTM (Open Robot Middleware)であり、第2のタイプのロボット機能要素モジュールはOpenRTMのコンポーネントであり、前記第2のインターフェース定義はIDLファイルである、請求項7または8に記載の方法。 The second middleware is OpenRTM (Open Robot Middleware), the second type robot functional element module is a component of OpenRTM, and the second interface definition is an IDL file. the method of.
  10.  第1のタイプのロボット機能要素モジュールは、ROSのノードであり、第2のタイプのロボット機能要素モジュールは、OpenRTMのコンポーネントであり、
     前記ノードのメッセージファイルあるいは/およびサービスファイルを解析して、コンポーネントのIDLファイルと、ソースコードと、を生成するステップと、
     ROSコンパイラによって前記メッセージファイルあるいは/およびサービスファイルのソースコードを生成するステップと、
     IDLコンパイラによって前記生成されたIDLファイルのソースコードを生成するステップと、を備え、
     前記3つのソースコードを用いて、変換モジュールを生成する、
     請求項9に記載の方法。
    The first type robot functional element module is an ROS node, the second type robot functional element module is an OpenRTM component,
    Analyzing the message file or / and service file of the node to generate a component IDL file and source code;
    Generating a source code of the message file or / and the service file by a ROS compiler;
    Generating a source code of the generated IDL file by an IDL compiler,
    A conversion module is generated using the three source codes.
    The method of claim 9.
  11.  第1のタイプのロボット機能要素モジュールのセットを備えた第1のミドルウェアと、第2のタイプのロボット機能要素モジュールのセットを備えた第2のミドルウェアとの間を連携する変換モジュールの自動生成装置であって、
     第1のタイプのロボット機能要素モジュールの第1のインターフェース定義を解析して、第2のタイプのロボット機能要素モジュールの第2のインターフェース定義と、ミドルウェア間変換ソースコードと、を生成する手段と、
     前記第2のインターフェース定義と前記ソースコードを用いて、変換モジュールを生成する手段と、
     を備えた自動生成装置。
    Apparatus for automatically generating a conversion module for linking between first middleware having a set of first type robot functional element modules and second middleware having a set of second type robot functional element modules Because
    Means for analyzing a first interface definition of a first type robot functional element module and generating a second interface definition of a second type robot functional element module and an inter-middleware conversion source code;
    Means for generating a conversion module using the second interface definition and the source code;
    Automatic generation device with
  12.  前記変換モジュールを生成する手段は、
     前記ソースコードと、
     前記第1のインターフェース定義から生成したソースコードと、
     前記第2のインターフェース定義から生成したソースコードと、
    を用いて、変換モジュールを生成する、請求項11に記載の装置。
    The means for generating the conversion module includes:
    The source code;
    Source code generated from the first interface definition;
    Source code generated from the second interface definition;
    12. The apparatus of claim 11, wherein the conversion module is generated using
  13.  第1のタイプのロボット機能要素モジュールの入出力は、第1のインターフェース定義により当該第1のタイプのロボット機能要素モジュールのプログラム実行前に規定されており、前記解析は、当該プログラム実行前に行われる、請求項11または12に記載の装置。 The input / output of the first type robot functional element module is defined by the first interface definition before the execution of the program of the first type robot functional element module, and the analysis is performed before the execution of the program. 13. The device according to claim 11 or 12, wherein:
  14.  第1のミドルウェアは、OpenRTM (Open Robot Middleware)であり、第1のタイプのロボット機能要素モジュールはOpenRTMのコンポーネントであり、前記第1のインターフェース定義はIDLファイルである、請求項11~13いずれか1項に記載の装置。 The first middleware is OpenRTM (Open Robot Middleware), the first type robot function element module is a component of OpenRTM, and the first interface definition is an IDL file. The apparatus according to item 1.
  15.  第2のミドルウェアは、ROS(Robot Operating System)であり、第2のタイプのロボット機能要素モジュールはROSのノードであり、前記第2のインターフェース定義はメッセージファイルないしサービスファイルである、請求項11~14いずれか1項に記載の装置。 The second middleware is ROS (Robot Operating System), the second type robot functional element module is a node of ROS, and the second interface definition is a message file or a service file. 14. The apparatus according to any one of 14.
  16.  第1のタイプのロボット機能要素モジュールは、OpenRTMのコンポーネントであり、第2のタイプのロボット機能要素モジュールは、ROSのノードであり、
     前記コンポーネントのIDLファイルを解析して、ノードのメッセージファイルあるいは/およびサービスファイルと、ソースコードと、を生成する手段と、
     IDLコンパイラによって前記IDLファイルのソースコードを生成する手段と、
     ROSコンパイラによって前記メッセージファイルあるいは/およびサービスファイルのソースコードを生成する手段と、を備え、
     前記3つのソースコードを用いて、変換モジュールを生成する、
     請求項15に記載の装置。
    The first type of robot functional element module is a component of OpenRTM, the second type of robot functional element module is a node of ROS,
    Means for analyzing the IDL file of the component to generate a message file or / and a service file of the node and a source code;
    Means for generating source code of the IDL file by an IDL compiler;
    Means for generating a source code of the message file or / and the service file by a ROS compiler,
    A conversion module is generated using the three source codes.
    The apparatus according to claim 15.
  17.  第1のタイプのロボット機能要素モジュールの入出力は、当該第1のタイプのロボット機能要素モジュールのプログラム実行時に特定されるようになっており、前記解析は、当該プログラム実行時に行われる、請求項11または12に記載の装置。 The input / output of the first type robot functional element module is specified when the program of the first type robot functional element module is executed, and the analysis is performed when the program is executed. The apparatus according to 11 or 12.
  18.  第1のミドルウェアは、ROS(Robot Operating System)であり、第1のタイプのロボット機能要素モジュールはROSのノードであり、前記入出力は、実行されているノードのトピックのメッセージファイルあるいは/およびサービスのサービスファイルを解析することで取得される、請求項17に記載の装置。 The first middleware is ROS (Robot Operating System), the first type robot functional element module is a node of ROS, and the input / output is a message file or / and service of the topic of the node being executed. The apparatus according to claim 17, wherein the apparatus is obtained by analyzing the service file.
  19.  第2のミドルウェアは、OpenRTM (Open Robot Middleware)であり、第2のタイプのロボット機能要素モジュールはOpenRTMのコンポーネントであり、前記第2のインターフェース定義はIDLファイルである、請求項17または18に記載の装置。 The second middleware is OpenRTM (Open Robot Middleware), the second type robot functional element module is a component of OpenRTM, and the second interface definition is an IDL file. Equipment.
  20.  第1のタイプのロボット機能要素モジュールは、ROSのノードであり、第2のタイプのロボット機能要素モジュールは、OpenRTMのコンポーネントであり、
     前記ノードのメッセージファイルあるいは/およびサービスファイルを解析して、コンポーネントのIDLファイルと、ソースコードと、を生成する手段と、
     ROSコンパイラによって前記メッセージファイル、あるいは/および、サービスファイルのソースコードを生成する手段と、
     IDLコンパイラによって前記生成されたIDLファイルのソースコードを生成する手段と、を備え、
     前記3つのソースコードを用いて、変換モジュールを生成する、
     請求項19に記載の装置。
    The first type robot functional element module is an ROS node, the second type robot functional element module is an OpenRTM component,
    Means for analyzing the message file or / and service file of the node to generate a component IDL file and source code;
    Means for generating source code of the message file or / and service file by a ROS compiler;
    Means for generating source code of the IDL file generated by an IDL compiler,
    A conversion module is generated using the three source codes.
    The apparatus of claim 19.
  21.  第1のタイプのロボット機能要素モジュールのセットを備えた第1のミドルウェアと、第2のタイプのロボット機能要素モジュールのセットを備えた第2のミドルウェアとの間を連携する変換モジュールを自動生成するために、コンピュータを、請求項11~20のいずれか1項に記載の手段として機能させるためのコンピュータプログラム。

     
    A conversion module that cooperates between the first middleware having the first type of robot functional element module set and the second middleware having the second type of robot functional element module set is automatically generated. Therefore, a computer program for causing a computer to function as the means according to any one of claims 11 to 20.

PCT/JP2013/077419 2012-10-19 2013-10-09 Method and device for generation of conversion module linking between different robot middleware types WO2014061516A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2012-232391 2012-10-19
JP2012232391A JP2014085732A (en) 2012-10-19 2012-10-19 Method and device for generating conversion module linking between robot middleware of different types

Publications (1)

Publication Number Publication Date
WO2014061516A1 true WO2014061516A1 (en) 2014-04-24

Family

ID=50488084

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2013/077419 WO2014061516A1 (en) 2012-10-19 2013-10-09 Method and device for generation of conversion module linking between different robot middleware types

Country Status (2)

Country Link
JP (1) JP2014085732A (en)
WO (1) WO2014061516A1 (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE102015204751A1 (en) * 2015-03-17 2016-09-22 Robert Bosch Gmbh DEVICE AND METHOD FOR CREATING APPLICATIONS FOR APPLICATIONS FOR A COMMUNICATION BETWEEN A SERVER AND A CLIENT OF AN AUTOMATION PLANT
CN111198770A (en) * 2018-11-19 2020-05-26 北京图森智途科技有限公司 Communication method, device and system, conversion method and device of ROS1 message
CN114527982A (en) * 2020-11-23 2022-05-24 中移互联网有限公司 Middleware file generation method, middleware calling method, middleware file generation device, middleware calling device and electronic equipment
CN115134361A (en) * 2022-06-20 2022-09-30 中汽创智科技有限公司 Cross-platform communication method and device for automatic driving software platform

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101668441B1 (en) * 2014-05-13 2016-10-21 (주)큐센텍 Meddleware Interface System and Method for Data Collection of Heterogeneous Devices

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011129115A (en) * 2009-12-18 2011-06-30 Korea Electronics Telecommun Component integration apparatus and method for collaboration of heterogeneous robot

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011129115A (en) * 2009-12-18 2011-06-30 Korea Electronics Telecommun Component integration apparatus and method for collaboration of heterogeneous robot

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
JOHANNES WIENKE ET AL.: "A Middleware for Collaborative Research in Experimental Robotics", 2011 IEEE/SICE INTERNATIONAL SYMPOSIUM ON SYSTEM INTEGRATION (SII), 20 December 2011 (2011-12-20), pages 1187 *
KEI OKADA: "A Review of Robotics Open-Source Software and its Future Trends", SYSTEMS, CONTROL AND INFORMATION, vol. 56, no. 11, 15 November 2012 (2012-11-15), pages 25 - 27 *
NORIAKI ANDO: "The Robotic Technology Component (RTC) and Its Relevant Specifications Standardization Activities in OMG", JOURNAL OF THE ROBOTICS SOCIETY OF JAPAN, vol. 29, no. 4, 15 May 2011 (2011-05-15), pages 19 *

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE102015204751A1 (en) * 2015-03-17 2016-09-22 Robert Bosch Gmbh DEVICE AND METHOD FOR CREATING APPLICATIONS FOR APPLICATIONS FOR A COMMUNICATION BETWEEN A SERVER AND A CLIENT OF AN AUTOMATION PLANT
CN111198770A (en) * 2018-11-19 2020-05-26 北京图森智途科技有限公司 Communication method, device and system, conversion method and device of ROS1 message
CN111198770B (en) * 2018-11-19 2023-06-20 北京图森智途科技有限公司 Communication method, device and system, conversion method and device of ROS1 message
CN114527982A (en) * 2020-11-23 2022-05-24 中移互联网有限公司 Middleware file generation method, middleware calling method, middleware file generation device, middleware calling device and electronic equipment
CN115134361A (en) * 2022-06-20 2022-09-30 中汽创智科技有限公司 Cross-platform communication method and device for automatic driving software platform
CN115134361B (en) * 2022-06-20 2024-04-26 中汽创智科技有限公司 Cross-platform communication method and device for automatic driving software platform

Also Published As

Publication number Publication date
JP2014085732A (en) 2014-05-12

Similar Documents

Publication Publication Date Title
Buschmann et al. Pattern-oriented Software Architecture: a Pattern Language for Distributed Computing, Volume 4
US8190274B2 (en) Method and control device for controlling an automating system
Calisi et al. OpenRDK: a modular framework for robotic software development
Thramboulidis Development of distributed industrial control applications: The CORFU framework
WO2014061516A1 (en) Method and device for generation of conversion module linking between different robot middleware types
JP2011503682A (en) Automation device with control program and method for programming the control program
Fitzpatrick et al. A middle way for robotics middleware
JP2004530194A (en) Method and bridge for combining servers and clients of different object types
KR20160000542A (en) Method and apparatus for gernerating data distribution service application
Veiga et al. Experiments with service-oriented architectures for industrial robotic cells programming
US7398527B2 (en) Dispatching application steps of an application running on an application server in a client/server environment
Dai et al. Enabling plug-and-play software components in industrial cyber-physical systems by adopting service-oriented architecture paradigm
Wehner et al. Internet of things simulation using omnet++ and hardware in the loop
Blake et al. Robots on the web
US6321347B1 (en) Network testing system and method
US20030069998A1 (en) Motion services protocol accessible through uniform resource locator (URL)
Huang et al. Designing an agent synthesis system for cross-RPC communication
Jang et al. A heterogeneous coupling scheme of OPRoS component framework with ROS
Wu et al. Remote multi‐robot monitoring and control system based on MMS and web services
Grzelak et al. Towards a Software Architecture for Near Real-time Applications of IoT.
Gottardi et al. Run-time Adaptable Service Oriented Architecture in the Context of Repository Systems
JP2003076563A (en) Distributed object middleware connection method and recording medium with program recorded thereon and program
Cheng et al. Developing a web-enabled equipment driver for semiconductor equipment communications
Antolini et al. A framework for managing multiprocess applications based on distributed finite-state machine approach
JP2008077659A (en) Controller, controller management system and controller management method

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 13847856

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 13847856

Country of ref document: EP

Kind code of ref document: A1