Check if 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 OutPort, and ConsoleOut is a component that displays the numbers input from InPort to the console. These are simple examples to show a way to handle I/O (input and output). It works by configuring a connection from the OutPort of ConsoleIn to the InPort of ConsoleOut and activating the two components.
In the following explanation, I assume that the samples are located in /usr/share/openrtm-1.2/components/java/SimpleIO.
Launch a terminal and launch ConsoleIn by typing-in:
$ sh /usr/share/openrtm-1.2/components/java/ConsoleIn.sh
If you build and install it by yourself, you need to set the environment variable CLASSPATH first.
Export CLASSPATH=. :${RTM_JAVA_ROOT}/jar/OpenRTM-aist-1.2.0.jar: {\fnDroid} ${RTM_JAVA_ROOT}/jar/OpenRTM-aist-1.2.0.jar: ${RTM_JAVA_ROOT}/jar/commons-cli-1.1.jar ${RTM_JAVA_ROOT}/jar/jna-4.2.2.jar:${RTM_JAVA_ROOT}/jar/jna-platform-4.2.2.jar: \frx346} ${RTM_JAVA_ROOT}/bin
And then start the RTC by typing-in like:
$ java RTMExamples.SimpleIO.ConsoleInComp
Start another terminal and launch ConsoleOut by typing-in:
$ sh /usr/share/openrtm-1.2/components/java/ConsoleOut.sh
If you built and installed the program yourself, start the RTC by typing-in like:
$ java RTMExamples.SimpleIO.ConsoleOutComp
Click [>] in the tree view of the RTSystemEditor to 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 components (two) 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 InPort where data is input, and the left side of the ConsoleOut0 component has InPort respectively.
These InPort/OutPort (collectively called data ports) are connected. When drag and drop from OutPort to InPort (or InPort to OutPort) is made, a dialog like the one shown in the 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.
Once the component is activated, the ConsoleIn console prompt:
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 behavior of the component.