This sample is bundled with C++ version, Python version, Java version of OpenRTM-aist.
A sample showing how to use composite component Composite. Before activating a composite component, you need to connect between the child components that make up the composite component.
The Composite component has three components, Sensor, Controller, Motor, in its child. The behavior of Composite components can be checked by connecting to the ConsoleIn / ConsoleOut component.
When you run the Composite component, the Name Service View displays the four component names. Since the component that decoded three of Controller, Motor, and Sensor is PeriodicECShareComposite, drag and drop it to System Diagram.
Double click on PeriodicECShareComposite in order to display inside the composite component, it will be displayed in another editor, so connect the components.
Here is an example of operation when connecting with the ConsoleIn / ConsoleOut component.
If you enter "111" in ConsoleIn, it will be correct if "888" is displayed in ConsoleOut. The child component that composes the composite component doubles the input value (the value displayed on the console screen) and outputs it.
(G)How to use
In the Composite sample, the value received from the input data port is outputted with the value of each of the three child components being doubled, so that the sample which is finally outputted eight times from the output data port of Composite is.
- Start RTSystemEditor and prepare SystemEditor. → For details on how to use RTSystemEditor, see [[RTSystemEditor]/node/1175]]
- Launch the Composite component. Since the startup of the component depends on the OS and the language of OpenRTM-aist, start it with reference to the following table.
|CENTER: Windows case||CENTER: Linux case|
- Since PeriodicECShareComposite appears in NameServiceView 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 either component and select "All Activate".