This sample is included with C ++, Python and Java versions of OpenRTM-aist.
This is a sample that shows how to use the composite component. Before activating a composite component, you must connect the child components that make up the composite component.
- The Composite component has three components, Sensor, Controller, and Motor.
- You can check the operation of the Composite component by connecting it to the ConsoleIn/ConsoleOut component.
- When the Composite component is executed, 4 component names are displayed in the Name Service View.
- PeriodicECShareComposite is a component that combines the three components of Controller, Motor, and Sensor. Drag and drop it into the System Editor. Composite execution example(drag&drop composite component)
Double-click PeriodicECShareComposite to display the inside of the composite component. It will show another editor view. Connect the components.
Here is an example of an operation when connecting with the ConsoleIn/ConsoleOut component.
If "111" is entered in ConsoleIn and "888" is displayed in ConsoleOut, the operation is correct. The child components that make up the composite component output twice the input value (the values displayed on the composite component screen).
How to use
In the sample of Composite, the value received from the input data port is doubled and output from output data port of each of the three child components, so the sample finally outputs the 8 times value from the output data port of Composite
- Start RTSystemEditor and open a new SystemEditor. See RTSystemEditor for details on how to use RTSystemEditor
- Start the Composite component. The startup of the component differs depending on the OS and the language of OpenRTM-aist, so start regarding the table below.
|Windows case||Linux case|
- Since PeriodicECShareComposite appears in Name Service View of RTSystemEditor, drag them onto SystemEditor.
- Double click PeriodicECShareComposite and tie the port between the child components
- Launch both ConsoleIn and ConsoleOut components and connect PeriodicECShareComposite to the corresponding port. (See Composite execution example above)
- Right-click on one of the components and select [Activate Systems].