After the installation or build is done successfully, test it in action with the included sample components. Sample components can usually be found at
Check that OpenRTM-aist is built and installed correctly using the sample component set SimpleIO.
This sample set consists of RT-components ConsoleIn and ConsoleOut. ConsoleIn is a component that outputs numbers input from the console to the OutPort, and ConsoleOut is a component that displays the numbers input from the InPort on the console. These are just simple examples to use the I/O (input and output). It works by making a connection from the OutPort of ConsoleIn to the InPort of ConsoleOut and activating (Activating) the two components.
The following explanation assumes that you have installed OpenRTM-aist with the MSI installer and start various programs from the Start menu.
Follow the steps below to start the RTSystemEditor and name servers.
After the name server start, start the appropriate sample components.
For Windows 10, open the sample folder by typing Java_Examples in the [Type here to search] field at the bottom right.
In this example, double-click on "ConsoleIn.bat" and "ConsoleOut.bat" to launch the two components. When it starts, two console screens will open, as shown below.
If the component does not start, there are several possible causes.
The problem may occur if the environment variables RTM_ROOT and RTM_JAVA_ROOT are not set correctly. If you installed it with the msi installer, rebooting the OS may solve the problem.
Also, there is a problem with the setting of rtc.conf and it cannot be started in some cases. Please open [rtc.conf for examples] in the start menu folder above and check the settings. For example, if a setting such as corba.endpoint/corba.endpoints has a mismatch with the host address of the currently running PC, CORBA will terminate abnormally.
Please try setting it to the minimum rtc.conf like the following.
corba.nameservers: localhost
If you click [>] in the tree view of the RTSystemEditor, you will see that the two components you just launched are registered.
Open an editor to edit the system. Click [Open New System Editor] button in the top to open the editor in the middle pane.
Drag and drop the two components shown by the icon into the name service view on the left to the editor in the center.
The right side of the ConsoleIn0 component has OutPort where data is output, and the left side of the ConsoleOut0 component has InPort where data is input.
These InPort/OutPort (called data port) are connected. When you drag and drop from OutPort to InPort (or InPort to OutPort), a dialog like the one shown in the following figure appears, so click the [OK] button with the default settings.
A connecting line appears between the two components. Next, click the [Activate Systems] button on the top menu of the editor to activate these components. When activated, the component changes to green.
When the components are activated, the ConsoleIn component console will prompt with:
Please input number:
Enter an appropriate number (within the range of short int: 32767 or less) and press the Enter key. Then, on the ConsoleOut side, the entered values are displayed. It indicates that the data has been transferred from the ConsoleIn component to the ConsoleOut component.
This completes the confirmation of the basic operation of the component.
The installer comes with a few other sample components as well. You can try these components by launching them in the same way, connecting and activating the ports in RTSystemEditor.
The following is a list of the attached batch files for component start-up and a brief description of the components that are invoked by them.
ConsoleInComp.bat | Starts a component that outputs numbers input from the console to OutPort and is used by connecting with ConsoleOutComp.class. |
ConsoleOutComp.bat | Starts a component that displays the numbers entered in InPort to the console and is used by connecting with ConsoleInComp.class. |
SeqInComp.bat | Starts a component that outputs random numbers (Short, Long, Float, Double and its sequence type) and is used in conjunction with SequenceOutComp.class. |
SeqOutComp.bat | Starts a component that shows the numbers (Short, Long, Float, Double and its sequence type) entered into InPort and is used in conjunction with SequenceInComp.class. |
MyServiceProviderComp.bat | Starts a component that provides services of type MyService and is used in connection with MyServiceConsumerComp.class. |
MyServiceConsumerComp.bat | Starts a component that provides services of type MyService and is used in connection with MyServiceProviderComp.class. |
ConfigurationSampleComp.bat | Start a configuration sample component to understand the behavior of the configuration function by changing the Configuration from RtcLink. |
ExtConsoleIn.bat | Starts the component to transfer input numerical value from the console to OutPort with being controlled by an external trigger. It is used by connecting to ExtTrigger/ConsoleOutComp.class. |
ExtConsoleOut.bat | Starts the component to show the data from InPort to the console with being controlled by an external trigger. It is used by connecting to ExtTrigger/ConsoleInComp.class. |
ExtConnector.bat | Starts a program to send external triggers to ExtTrigger/ConsoleInComp.class and ExtTrigger/ConsoleOutComp.class. |
GUIIn.bat | Start the GUI sample that outputs the position of the slider from Outport. |
Composite.bat | Start a composite component that contains three components.| |