getting started with openrtm-aist in 10 minutes! (1.2 series)

✏️ Edit this page on GitHub

#contents The latest version, OpenRTM-aist-1.2.1-RELEASE, installs the C++, Python, and Java editions as well as OpenRTP. In addition, rtshell is installed at the same time.

Preparation

Installing Python

If Python is not installed, OpenRTM-aist cannot be installed. Please install Python before installing OpenRTM-aist. Supported versions are “3.7”, “3.6”, and “2.7”.

For downloading Python, see OpenRTM-aist-1.2.1-RELEASE.

For Python 3.6 or 3.7, both installation options [Install Now] and [Customize installation] are supported. For Python 2.7, only the default [Install for all users] setting is supported.

Configure the search path automatically using the following method. This adds the directory containing python.exe and the Scripts directory to Path.
(Example: Path=C:\Python27;C:\Python27\Scripts;…)

  • When installing Python 3.6 or 3.7, check [add python *** to PATH] at the bottom of the first screen.
  • When installing Python 2.7, set [Add python.exe to Path] to [Will be installed on local hard drive] on the following screen.

Installing OpenRTM-aist

This section introduces the installation procedure using the 64-bit installer OpenRTM-aist-1.2.1-RELEASE_x86_64.msi on Windows 10.

For downloading the installer, see OpenRTM-aist-1.2.1-RELEASE.

[Installation Procedure]

  1. Launch the installer. If the [Windows protected your PC] screen appears, click [More info] to display the [Run] button, then click [Run]. (This screen appears when installing applications that are not registered with Microsoft Corp. on certain Windows versions. Since this software is not registered, this screen is displayed.)
  2. Click [Next].


  1. This is the license agreement page. Accept the software license terms and click [Next].


  1. Select the installation type. Click [Next] with the default settings.


  1. Select the Visual Studio version.
    • Set the Visual Studio version used by the C++ edition in the system environment variables.
    • Select the installed Visual Studio version and click [Next].
    • For downloading Visual Studio, see OpenRTM-aist-1.2.1-RELEASE.
    • The Visual Studio version can be changed after installation using the VCVerChanger tool. (How to use VCVerChanger)
    • This setting is irrelevant for the Python and Java editions, so click [Next] with the default settings.


  1. Select the setup type. If [Typical] is selected, the OpenRTM-aist C++, Java, and Python editions, OpenRTP, RTSystemEditorRCP, RTShell, runtime libraries for OpenRTM-aist C++ editions from Visual Studio 20010 to 2019, and runtime libraries for OpenRTM-aist versions 1.0.0 through 1.2.1 will be installed. If you have no specific reason to change it, click [Typical].


  1. Click [Install] to start the installation.



  1. Installation is complete. Click [Finish] to exit the installer.


Running Sample Components

Preparation

  • Although not required, many applications registered in the Start Menu will be launched from this point onward. Since navigating through the Start Menu every time can be cumbersome, display the Start Menu from the Start button, right-click [OpenRTP] under [OpenRTM-aist 1.2.1 x86_64], and select [Open file location].
Open file location



Start Menu folder


  • In this way, the Start Menu folder opens, making it easier to access the applications registered in the menu.

Starting the Naming Service

  • Double-click Start Naming Service. A console window similar to the following will appear.
Start Naming Service


Sample Components

Using ConsoleInComp and ConsoleOutComp

ConsoleInComp and ConsoleOutComp are samples demonstrating how to use DataInPort and DataOutPort. Numbers entered on the ConsoleIn side are displayed on the ConsoleOut side. Here, these two components are used to verify operation.

Starting the Sample Components

  • Double-click ConsoleIn.bat and ConsoleOut.bat in the [OpenRTM-aist 1.2.1 x86_64]>[C++_Example] folder. If the [Windows Security Alert] screen appears, check [Private networks (such as my home or work network)] and click [Allow access]. Console windows similar to the following will appear.
;
;
ConsoleIn.bat and ConsoleOut.bat


&aname(openrtp_start);

Starting OpenRTP

  • Launch it by clicking the desktop shortcut. From the Start Menu, select [OpenRTM-aist 1.2.1 x86_64] > [OpenRTP]. You can also start it by double-clicking OpenRTP from the folder opened earlier.
    • Specify any appropriate location for the workspace.
Selecting a Workspace


  • The “Welcome” screen is not needed, so click the [×] button on the [Welcome] tab in the upper-left corner to close it.
Screen at Initial Startup


Using RTSystemEditor

  • Click [Open Perspective] in the upper-right corner of the screen. In the displayed dialog, select [RT System Editor] and click [Open] to start RTSystemEditor.
;
;
Switching Perspectives


  • Components are displayed in [NameServiceView]. Initially they are collapsed and not visible, but by clicking [>] to expand the tree, you can confirm the ConsoleIn and ConsoleOut components.
Confirming Component Startup


  • If the name server is not displayed in NameServerView, add localhost manually. Click [Add Name Server] in the image to display the dialog. Enter “localhost” and click [OK] to add it. If it still does not start, close all console windows and retry the procedure beginning from starting the Naming Service.
;
;
Adding a Name Server


  • Click [Open New System Editor] from the toolbar to display the [System Diagram].
Displaying the System Diagram


  • Drag and drop the ConsoleIn and ConsoleOut components from [NameServiceView] onto the [System Diagram]. They will be displayed as shown below.
Drag and Drop Components


  • Connect the components by dragging and dropping between the data ports. Afterward, a dialog prompting for connection information will appear. Click [OK].
;
;
Connecting Components


  • The connection will be established as shown in the image below.
Connection Complete


  • Change the component state to Active. Click [All Activate]. If the component color changes from blue to light green, the operation was successful. Components can also be activated individually by selecting them and right-clicking. (If [All Activate] is not displayed, try restarting OpenRTP. Alternatively, activate the components individually.)


Activation Complete


Verifying Operation in the Component Console Windows

  • Next, verify operation in the console windows. After connecting in RTSystemEditor, “Please input number:” is displayed in the ConsoleIn window.
"Please input number:" Displayed


  • Enter any numeric value in the ConsoleIn window and press [Enter]. The value will be displayed in the ConsoleOut window.
;
;
Operation Verification


  • Entering non-numeric values or excessively large values may cause abnormal behavior. In that case, stop the batch file with the Ctrl-C key and restart from launching the batch files again.

  • To terminate the components, click [All Deactivate] from the toolbar. Then right-click each component and select [Exit].

    • If deactivation takes a long time, ConsoleIn is waiting for numeric input. In that case, enter any number.
Deactivating Components


Terminating Components


  • This completes the operation verification using ConsoleIn and ConsoleOut.

Using rtshell

rtshell is installed by default in OpenRTM-aist-1.2.1. By using rtshell, you can activate, deactivate, and terminate RTCs from the command line.

  • When the 64-bit version is installed, it may not function correctly due to missing DLLs. In that case, run Windows Update.

Operating RTCs

Start the sample components, then use rtshell to connect data ports and activate, deactivate, and terminate RTCs from the command line.

Starting rtm-naming

  • Double-click Start Naming Service in the [OpenRTM-aist 1.2.1 x86_64] folder.

Starting the Sample Components

First, start the sample components and operate them using rtshell.

  • Click ConsoleIn.bat and ConsoleOut.bat in the [OpenRTM-aist 1.2.1 x86_64] > [Python_Examples] folder to launch the console windows. If the [Windows Security Alert] screen appears, check [Private networks (such as my home or work network)] and click [Allow access]. At this point, the console windows only display the startup command for the Python program. The displayed output differs from that of the previously executed C++ Example.

Operation from the Command Prompt

  • Next, launch [Command Prompt] from [Windows System Tools] in the Start Menu.
Starting the Command Prompt


  • If C:\Python27\Scripts has not been added to the PATH, configure it using the following command.

Next…

Please refer to the links below.

  • Try running more samples   &t;: Sample Components
  • Try creating a component   &t;: Case Study
  • Learn OpenRTM from the basics &t;: Developer’s Guide
  • Join the community     &t;: Community
  • Browse published components &t;: Projects(No corresponding English project page available.)