Once the install has completed successfully, OpenRTM-aist-Java can be tested using the included sample components. These are typically stored in one of the following locations:
We will use the SimpleIO components to check that OpenRTM-aist has built and installed correctly.
This set contains the ConsoleInComp and ConsoleOutComp components. ConsoleInComp receives numbers as input from the console and sends them over an OutPort. ConsoleOutComp receives numbers via an InPort and prints them to the console. They use this very simple I/O to illustrate the basics of RT Components. Connect the OutPort of ConsoleInComp to the InPort of ConsoleOutComp and activate them.
The explanation below assumes OpenRTM-aist-Java has been installed using the MSI package and the sample components are available in the Start Menu. Right-clicking on the OpenRTM-aist entry in the Start Menu and selecting "Open" will make accessing these more convenient.
First, a name server that the components can register on must be started. Start it using the shortcut in the Start Menu at [OpenRTM-aist 1.1] > [Tools] > Start Naming Service.
A console like the following will open.
There are cases where the name server console screen does not open. In this case, there are several causes as below, so investigate the cause and take appropriate action.
"Start Java Naming Service" starts the name server (omniNames.exe) from the batch file in %RTM_ROOT%\bin\rtm-naming.bat. At this time, we use the environment variable OMNI_NAMES to refer to omniNames.exe. When installing OpenRTM-aist normally with the installer, the OMNI_ROOT environment variable is set automatically, but if the environment variable is invalid for some reason or you install it manually, the environment variable is set There is no thing.
After activating the name server, start the appropriate sample component. When you open [OpenRTM-aist1.1] > [Java] > [Components] > [Examples] in the start menu folder opened earlier, there are several components as shown in the figure.
Start ConsoleIn.py and ConsoleOut.py, causing two consoles to open.
Sometimes the component consoles do not open. There are several possible causes for this, described below.
There may be an error in the rtc.conf file, preventing the components from starting. Confirm the contents of the rtc.conf file "rtc.conf for examples" in the Start Menu. For example, the corba.endpoint/corba.endpoints settings should match the host address of the current computer.
Try creating a minimal rtc.conf, as below.
corba.nameservers: localhost
RTSystemEditor can be started from the Start Menu Folder: [OpenRTM-aist 1.1] > [Tools] > [RTSystemEditor].
Connect to the name server and browse the registered components. You can connect to a name server using the Name Service View on the left side of RTSystemEditor. Click the plug icon to connect to a name server and enter its address (localhost or localhost:2809) in the dialog box. The default port for omniNames and orbd is 2809.
The name server running on localhost will appear in the Name Service View. Open the tree branches by clicking the arrows to find the two components you started.
Open a system editor using the new system editor button in the toolbar . The editor will open in the central pane. Drag the components from the name service view into the editor.
The OutPort of ConsoleIn0 is displayed on its right-hand side . Drag from this to the InPort on the ConsoleOut0 component to connect these data ports. The connection dialog will be displayed. Click "OK" to accept the defaults and connect the components.
A line indicating the connection will appear between the two ports. Next, click the "Activate All" button in the toolbar. This will activate all components in the editor at once. Active components will appear green.
After connecting the ports of ConsoleInComp and ConsoleOutComp, the terminal for ConsoleInComp will display:
Please input number:
Enter a number and press enter. This number should fit within a short int. Look at the ConsoleOutComp terminal. The number you entered should have been printed out. If this is the case, OpenRTM-aist-Java is functioning correctly.
Other sample components are included in the installed OpenRTM-aist-Java. They can all be used in the same way as the above example.
ConsoleInComp.bat | Receive numbers from the console and send them over an OutPort. Connect it to ConsoleOutComp.exe to use. |
ConsoleOutComp.bat | Receive numbers over an InPort and print them in a console. Connect it to ConsoleInComp.exe to use. |
SequenceInComp.bat | A component to output various simple data types (short, long, float, double, and sequences). Connect it to SequenceOutComp.exe to use. |
SequenceOutComp.bat | Display various simple data types received over an InPort. Connect it to SequenceInComp.exe to use. |
MyServiceProviderComp.bat | Provides a simple service, MyService. Connect it to MyServiceConsumerComp.exe to use. |
MyServiceConsumerComp.bat | Consumes a simple service, MyService. Connect it to MyServiceProviderComp.exe to use. |
ConfigSampleComp.bat | Sample demonstrating configuration parameters. Modify the configuration parameters in RTSystemEditor or with rtconf to see the effect. |