- Advance preparation
- Installation of Python
- Installing OpenRTM-aist
- Run the sample component
- Start Naming Service
- Sample component
- Start OpenRTP
- Using RTSystemEditor
- Use rtshell
The latest version OpenRTM-aist-1.2.２-RELEASE installs C++ version, Python version, Java version.
Also, rtshell will be installed at the same time.
Installation of Python
If Python is not installed, OpenRTM-aist can not be installed.
Please install Python before installing OpenRTM - aist.
The Python version corresponds to "3.8", "3.7", "3.6".
To download Python please see OpenRTM-aist-1.2.2-RELEASE.
For Python , check [add python *** to PATH] at the bottom of the first screen.
The Python installation destination corresponds to the [Customize installation] selection made during installation.
Set the search path automatically by the following method. This will add the directory where python.exe is located and the Scripts directory to Path.
(Example: Path=C:\Python38;C:\ Python38\Scripts;...）
- Launch the Python installer. To install Python 3.6, 3.7, 3.8, check [add python *** to PATH] at the bottom of the first screen and select [Customize installation].
- There are no changes on the next Optional Features screen. Select [Next] to proceed.
- On the [Advanced Options] screen, check [Install for all users] and set the installation destination in [Customize install location]. (Example: Path=C:\Python38;C:\ Python38\Scripts;...)
- Select Install to complete the installation.
Here, we will introduce the installation procedure using 64-bit installer OpenRTM-aist-1.2.2-RELEASE_x86_64.msi on Windows 10.
To download the installer please see OpenRTM-aist-1.2.2-RELEASE.
- インストーラーを起動します。[WindowsによってPCが保護されました]の画面が表示されたら[詳細情報]をクリックして[実行]ボタンを表示させて、[実行]をクリックします。(この画面はWindowsのあるバージョン以降でMicrosoft Corp.に登録されていないアプリケーションのインストール時に表示される画面で、本ソフトウエアは登録をしていないため、この画面が表示されます。)
- Then click Next.
- This is the page of the license agreement. Accept the software license terms and click Next.
- Select the installation type. Accept the default and click Next.
- Select the Visual Studio version.
- Set the version of Visual Studio used in the C++ version in the system environment variable.
- Select the installed version of Visual Studio and click Next.
- Select the setup type.
When [Standard] is selected, OpenRTM-aist C++ version, Java version, Python version, OpenRTP, RTSystemEditorRCP, RTShell, OpenRTM-aist-C++ version Visual Studio 2012 to 2019 runtime library, OpenRTM-aist-1.0. The runtime libraries from 0 to 1.2.2 are installed. If you have no particular reason to change it, click Standard. [標準]を選択した場合、OpenRTM-aistのC++版、Java版、Python版、OpenRTP、RTSystemEditorRCP、RTShell、OpenRTM-aist-C++版のVisual Studio 2012から2019までのランタイムライブラリ、OpenRTM-aist-1.0.0から1.2.2までのランタイムライブラリがインストールされます。特に変更理由がないようであれば[標準]をクリックします。(inaba:ランタイムのver確認)
- Click [Install] to start the installation.
- The installation is complete. Click Finish to exit the installer.
Run the sample component
- Although not required, start many applications registered in the start menu from here. It's hard to go from the start menu each time, so Display the start menu from the start button, right-click [OpenRTM-aist 1.2.2 x86_64]> [OpenRTP] and select [Open File Location]. スタートボタンからスタートメニューを表示させ[OpenRTM-aist 1.2.2 x86_64]>[OpenRTP]を右クリックして[ファイルの場所を開く]を選択してください。
Open file location
- In this way, the Start Menu folder will be opened and you can easily access the applications registered in the menu.
Start Naming Service
- Double-click Start Naming Service. The following console screen will be displayed.Start Naming Service
Use ConsoleInComp and ConsoleOutComp
ConsoleInComp and ConsoleOutComp are samples showing how to use DataInPort and DataOutPort. The number entered on the Console In side is displayed on the Console Out side. Here, use these two components to check the operation.
Launch the sample component
- Double-click ConsoleIn.bat and ConsoleOut.bat in the [OpenRTM-aist 1.2.2 x86_64]>[C++_Example] folder. If the [Important Windows Security Warning] screen is displayed, check [Private network (home network, corporate network, etc.)] and click [Allow access]. The following console screen will be displayed. ConsoleIn.bat and ConsoleOut.bat
- Click the desktop shortcut to launch it. In the start menu, select [OpenRTM-aist 1.2.2 x86_64]> [OpenRTP]. You can also start it by double-clicking OpenRTP from the folder screen you opened earlier.
- Please specify a suitable place for the workspace.Select Workspace
- Please specify a suitable place for the workspace.
- Since the "Welcome" screen is not required, click the [x] button on the [Welcome] tab in the upper left to close the screen.Initial startup screen
- Click [Open Perspective] at the top right of the screen. Select [RT System Editor] in the dialog that appears and click [Open] to start RT System Editor.Switching perspectives
- The component appears in the Name Service View. Initially it is not shown because it is collapsed, but if you click [>] to expand it, you can see the ConsoleIn and ConsoleOut components.Component startup confirmation
- If the name server is not displayed in NameServerView, add localhost manually. Click Add Name Server on the image to display the dialog. Type "localhost" and click OK to add it. If it still does not start, please close all console screens once and try the procedure from starting Naming Service again.Add Name Server
- Click Open New System Editor from the toolbar to display the System Diagram.Display System Diagram
- [NameServiceView]にあるConsoleIn、ConsoleOutのコンポーネントを[System Diagram]上にドラッグ＆ドロップすると、以下の画像のように表示されます。Drag and drop components
- Connect components by dragging and dropping between data ports. After that, a dialog box prompting you to enter the information required for connection will be displayed. Click [OK].Component connection
- It will be connected as shown in the image below.Connection completed
- Sets the component status to Active. Click [All Activate]. It is successful when the color of the component changes from blue to light green. It is also possible to individually activate each component by selecting it and right-clicking. (If [All Activate] is not displayed, try restarting Openrtp. Or you can activate each component individually.)
Checking the operation on the component console screen
- Then check the operation on the console screen. After connecting with RTSystemEditor, "Please input number:" is displayed on the Console In screen.Displayed as「Please input number:」
- Enter an arbitrary value on the Console In screen and press [Enter] to display the value on the Console Out screen.Operation check
- If you enter a non-numeric value or enter a too large value, the operation may be strange. In that case, stop the operation of the batch file with the Cntrl-C key, and start the batch file again.
- If you want to exit the component, click All Deactivate from the toolbar. Then right-click the component and select [Exit].
- If Deactivate takes a long time, it is stopped by entering a value in ConsoleIn. In that case, enter some value.''Deactivate component'
- If Deactivate takes a long time, it is stopped by entering a value in ConsoleIn. In that case, enter some value.
- This is the end of the operation check using ConsoleIn and ConsoleOut.
Use rtshellOpenRTM-aist-1.2.2 installs rtshell as standard.
By using rtshell, you can activate, deactivate, and terminate RTC from the command line.
- When 64-bit version is installed, it may not operate normally due to lack of dll. In that case, please execute Windows Update.
Start the sample component and connect the data port, activate, deactivate, and close the RTC from the command line using rtshell.
- Double-click Start Naming Service in the [OpenRTM-aist 1.2.2 x86_64] folder to start it.
Launch the sample component
First, start the sample component and operate the started component with rtshell.
- Click ConsoleIn.bat and ConsoleOut.bat in the [OpenRTM-aist 1.2.2 x86_64]>[Python_Examples] folder to launch the console screen. If the [Important Windows Security Warning] screen is displayed, check [Private network (home network, corporate network, etc.)] and click [Allow access]. At this point, the start command of the py program at startup is only displayed on the console screen, and the screen output is different from that of the C++ Example executed earlier.
Operation from command prompt
- Then start [Windows System Tools]> [Command Prompt] from the Start menu.Launch Command Prompt
- If the path is not set to C:\Python3.6\Scripts, set the path with the following command.
# If Python 3.6 is installed in the Python36 directory directly under C: set PATH=C:\Python36\Scripts;%PATH% # If Python 3.7 is installed in the Python37 directory under C:\Program Files set PATH=C:\Program Files\Python37\Scripts;%PATH%
※ When installing Python, please install it in the default path with administrator privileges. ※ Please note that it may be installed in a location such as C:\Users\<user name>\AppData\Local\Programs\Python if it is installed with the local directory of the account or Visual Studio. ..
- Next, connect the data port with the following command.
rtcon /localhost/ConsoleIn0.rtc:out /localhost/ConsoleOut0.rtc:in
- Then, the following strings will be displayed in ConsoleIn.py and ConsoleOut.py consoles.
------------------------------ Listener: ON_CONNECT Profile::name: outin Profile::id: 4d622f80-135f-11e6-b923-001c4231a7a3 ------------------------------
- Check with RTSystemEditor just in case.
- You can confirm that the data port is connected by dragging and dropping the [NameServiceView] component to the System Diagram.Check data port connection
- You can confirm that the data port is connected by dragging and dropping the [NameServiceView] component to the System Diagram.
- Next, activate RTC with the following command.
rtact /localhost/ConsoleIn0.rtc /localhost/ConsoleOut0.rtc
- If Activate succeeds, "Please input number:" will be displayed in ConsoleIn.py console. If you look at RTSystemEditor, you can see that RTC has been activated.Confirmation of Activate
- Then, enter the value on the ConsoleIn.py screen and press [Enter]. The value will be displayed on the ConsoleOut.py screen.ConsoleIn.py and ConsoleOut.py
- Deactivate the RTC with the following command.
rtdeact /localhost/ConsoleIn0.rtc /localhost/ConsoleOut0.rtc
- If ConsoleIn cannot be deactivated, enter a numerical value because it is stopped by entering a numerical value.
- Finally, terminate RTC with the following command.
rtexit /localhost/ConsoleIn0.rtc rtexit /localhost/ConsoleOut0.rtc
Please see the link below.