Install OpenRTM-aist-1.1 for Python

Packages and installers for the Python edition of OpenRTM-aist are provided for many operating systems and distributions to allow easy installation. OpenRTM-aist can also be installed by downloading and compiling the source directly.

The following pages describe installing the Python edition of OpenRTM-aist in various environments.

Installation on Windows

Openrtm.org provides an MSI package for installing the Python edition of OpenRTM-aist, its prerequisites such as omniORBpy, and the RTSystemEditor tool all at once on Windows.

Installation by msi package

Download the msi package from download site of openrtm.org. The msi package contains tools such as omniORBpy and RTSystemEditor that are required, but Python needs to be installed in advance. From version 1.1.2, all 3 languages (C++, Java, Python) + tools (Eclipse + rtshell) are bundled with one Windows installer. We recommend that you uninstall the older version in advance. Also, please see the notation of deficit notation in download site.

Invoking the installer

For the procedure, OpenRTM-aist in 10 minutes! page.

Installation details

Work contents of installer

The installer performs the following tasks.

  • Copy various files under the installation directory (default is C:\Python<version>)
  • Copy various files to the installation directory (default is C:\Program Files)
  • Start Menu Create an OpenRTM-aist folder below and set various shortcuts
  • Setting environment variables
  • Setting when using msi for 32 bit
 RTM_BASE=C:\Program Files (x86)\OpenRTM-aist\
 RTM_ROOT=C:\Program Files (x86)\OpenRTM-aist\1.1.2\
 RTM_VC_VERSION=vc12
 RTM_JAVA_ROOT=C:\Program Files (x86)\OpenRTM-aist\1.1.2\
 OMNI_ROOT=C:\Program Files (x86)\OpenRTM-aist\1.1.2\omniORB\4.2.1_vc12\
 OpenCV_DIR=C:\Program Files (x86)\OpenRTM-aist\1.1.2\OpenCV2.4.11\
 OpenRTM_DIR=C:\Program Files (x86)\OpenRTM-aist\1.1.2\cmake\
  • Additional setting to PATH
    • Setting when using msi for 32 bit

 C:\Program Files (x86)\OpenRTM-aist\1.1.2\bin\vc12\ 
 C:\Program Files (x86)\OpenRTM-aist\1.1.2\omniORB\4.2.1_vc12\bin\x86_win32\ 
 C:\Program Files (x86)\OpenRTM-aist\1.1.2\OpenCV2.4.11\x86\vc12\bin\ 

We provide a script to check the setting of the installation environment. We will explain how to use the script and what you can check on the following page.

- Installation checking script

Files to be installed

The file is installed with the following structure.
Executing script to check the above setting of the installation environment saves the directory where Python is installed by the tree command and the OpenRTM-aist directory structure under Program Files to the log file As you do, you can check the details.

 <python_install_dir>
   + omniORB dll, various commands
   + rtcd, rtcprofile etc. OpenRTM-aist related commands
   |
   + Lib
   |  + site-packages
   |     + OpenRTM_aist: OpenRTM-aist Python module
   |        + RTM_IDL: IDL file
   |
   |     + omniORB related Python module

 <install_dir>
   + OpenRTM-aist
      + 1.x.x  :Old version runtime
      + <version>
         + bin: dll, lib, various commands
         + cmake: OpenRTMConfig.cmake
         + coil: coil header file
         + Components
            + CXX:
               + Examples: C ++ sample components
               + OpenCV: OpenCV C ++ Sample Component
            + Java: Java sample component
            + Python: Python sample component
         + etc: rtc.conf sample
         + ext: ComponentObserverConsumer
         + jar:
         + jre: OpenJDK JRE
         + omniORB
         + OpenCV
         + rtm: OpenRTM-aist header file
            + idl: OpenRTM-aist header file...
         + util
            + OpenRTP:
            + RTSystemEditor:
            + rtc-template:

When installation is finished, proceed to operation check.

How to use windows_installer_test.bat?

(G)** What is windows_installer_test.bat

(G)This is a script to check the Windows environment settings where OpenRTM-aist is installed. It was created to check the OpenRTM-aist 1.1.2 version installation environment, but it can also be used in environments where previous versions are installed.
(G)The result is output to the log file just by executing the script by double-clicking, and the following contents can be confirmed.

  • (G)Confirmation of OpenRTM-aist installation
    • (G) If installed, write the directory structure by tree command to another file
  • (G)Check system environment variables
  • (G)Path confirmation
  • (G)Confirm installation of OpenRTM-aist-Python and rtshell
    • (G)If installed, write the directory structure by tree command to another file
  • (G)Check custom installation list

(G) Download

(G)You can download from the following location.

(G) windows_installer_test.bat | http://svn.openrtm.org/openrtm-msi-buildtool/trunk/openrtm_msi/test_scripts/windows_installer_test.bat |

(G)execute

(G)Double-click the downloaded windows_installer_test.bat file. The command prompt screen will be displayed during execution, but it will disappear when it is finished.

(G) Custom execution (using Cygwin)

(G)The installed directory structure is written to the log file using the tree command. & br; (G)If the Cygwin tree command is installed in the environment, adjust the following settings at the beginning of the script to the environment. If% CYGWIN_DIR% \ bin \ tree.exe does not exist, use the standard Windows tree command.

(G)When the Cygwin tree command is installed, the log “yymmdd-hhmmss_'Python directory'-dir.tree” of the installation directory structure of OpenRTM-aist-Python and rtshell becomes compact. This is because you can specify how many levels down the directory in the output specification. (G)Since the standard tree command for Windows cannot specify the hierarchy, all the structures from the top of the Python directory where OpenRTM-aist-Python is installed are targeted. Therefore, only the directory name is output to the log.

 set CYGWIN_DIR=C:\Cygwin64

(G)logfile

(G)All execution results are output to the log file. The output destination is under the log folder (created automatically if there is none) in the same directory as the script.
(G)You can use this script by running it on a USB memory and checking the results on another PC.

(G) Log file name Description
(G)yymmdd-hhmmss.log Main log file
(G)yymmdd-hhmmss_pfile.tree This is output when C: \ Program Files \ OpenRTM-aist exists. You can check the OpenRTM-aist directory structure using the tree command. & br; Even if the 64-bit version of OpenRTM-aist has already been uninstalled, this log file will be output if the directory remains because there are files such as rtc ***. log. The
(G)yymmdd-hhmmss_pfile_x86.tree This is output when C: \ Program Files (x86) \ OpenRTM-aist exists. You can check the OpenRTM-aist directory structure using the tree command. & br; Even if the 32-bit version of OpenRTM-aist has already been uninstalled, this log file may be output for the same reason as the 64-bit version.
(G) yymmdd-hhmmss_'Python directory'-dir.tree This is output when OpenRTM-aist-Python is installed. You can check the Python directory structure (G)where OpenRTM-aist-Python and rtshell are installed using the tree command. & br; If the installation destination is C: \ Python27, the log file name will be yymmdd-hhmmss_Python27-dir.tree.

(G)Output details

(G)Main log file

(G)Confirmation of OpenRTM-aist installation (Check Program Files folder)

(G)The directory existence of “C: \ Program Files \ OpenRTM-aist” and “C: \ Program Files (x86) \ OpenRTM-aist” is checked. Even if OpenRTM-aist has already been uninstalled, the directory will remain if files (rtc ***. Log, etc.) generated after installation exist. Even if the directory is “exist!”, If C ++, Python, Java Examples are “not installed”, this case can be considered. Check the tree file.

  • (G)Output example when 1.1.2 version is installed
    • (G) The result below shows that only 32bit version is installed
    • (G) The destination file of the directory structure of C: \ Program Files (x86) \ OpenRTM-aist is log \ 20160906-141617_pfile_x86.tree
    • (G)Version number 1.1.2 is obtained from RTM_ROOT setting

 *-*-*-*-*-*-* check OpenRTM-aist installed directory *-*-*-*-*-*-* 
 [[check]] "C:\Program Files\OpenRTM-aist" directory 
 --- not exist! 
 
 [[check]] "C:\Program Files (x86)\OpenRTM-aist" directory 
 --- exist! 
 --- RTM_VERSION = 1.1.2 
 
 Result ⇒ log\20160906-141617_pfile_x86.tree 
 --- C++ Examples (1.1.2) ⇒  installed 
 --- Python Examples (1.1.2) ⇒  installed 
 --- Java Examples (1.1.2) ⇒  installed 

  • (G)Output example in an environment where only the 1.1.1 version is installed

 *-*-*-*-*-*-* check OpenRTM-aist installed directory *-*-*-*-*-*-* 
 [[check]] "C:\Program Files\OpenRTM-aist" directory 
 --- not exist! 
 
 [[check]] "C:\Program Files (x86)\OpenRTM-aist" directory 
 --- exist! 
 --- RTM_VERSION = 1.1 
 
 Result ⇒ log\20160906-133745_pfile_x86.tree 
 --- C++ Examples (1.1) ⇒  installed 
 --- Python Examples (1.1) ⇒  installed 
 --- Java Examples (1.1) ⇒  not installed 

  • (G)Output example in 32bit OS environment
    • (G)In this environment, the path of `` C: \ Program Files (x86) does not exist, so `` This PC is 32bit OS.

 *-*-*-*-*-*-* check OpenRTM-aist installed directory *-*-*-*-*-*-* 
 [[check]] "C:\Program Files\OpenRTM-aist" directory 
 --- exist! 
 --- RTM_VERSION = 1.1.2 
 
 Result ⇒ log\20160907-104846_pfile.tree 
 --- C++ Examples (1.1.2) ⇒  installed 
 --- Python Examples (1.1.2) ⇒  installed 
 --- Java Examples (1.1.2) ⇒  installed 
 
 --- This PC is 32bit OS. 

(G)Check system environment variables

  • (G)Output example when 1.1.2 version is installed
 *-*-*-*-*-*-* check system environment variables *-*-*-*-*-*-* 
 RTM_BASE=C:\Program Files (x86)\OpenRTM-aist\
 RTM_ROOT=C:\Program Files (x86)\OpenRTM-aist\1.1.2\
 RTM_VC_VERSION=vc12
 RTM_JAVA_ROOT=C:\Program Files (x86)\OpenRTM-aist\1.1.2\
 OMNI_ROOT=C:\Program Files (x86)\OpenRTM-aist\1.1.2\omniORB\4.2.1_vc12\
 OpenCV_DIR=C:\Program Files (x86)\OpenRTM-aist\1.1.2\OpenCV2.4.11\
 OpenRTM_DIR=C:\Program Files (x86)\OpenRTM-aist\1.1.2\cmake\
  • (G)Output example in an environment where only the 1.1.1 version is installed
    • (G)It can be confirmed that environment variables added in version 1.1.2 are not set in version 1.1.1

(G) Environment variable RTM_BASE is not defined (G) RTM_ROOT = C: \ Program Files (x86) \ OpenRTM-aist\1.1\ (G) RTM_JAVA_ROOT = C: \ Program Files \ OpenRTM-aist\1.1\

 OMNI_ROOT=C:\Program Files (x86)\OpenRTM-aist\1.1\omniORB\4.1.7_vc10\
 OpenCV_DIR=C:\Program Files (x86)\OpenRTM-aist\1.1\OpenCV2.4.9\
(G)Environment variable OpenRTM_DIR is not defined

(G)Confirmation of Path

  • (G)The parameters set by OpenRTM-aist and OpenCV settings are extracted
  • (G)Output example when 1.1.2 version is installed

 *-*-*-*-*-*-* check Path *-*-*-*-*-*-* 
 C:\Program Files (x86)\OpenRTM-aist\1.1.2\bin\vc12\ 
 C:\Program Files (x86)\OpenRTM-aist\1.1.2\omniORB\4.2.1_vc12\bin\x86_win32\ 
 C:\Program Files (x86)\OpenRTM-aist\1.1.2\OpenCV2.4.11\x86\vc12\bin\ 

  • (G)Output example when OpenCV is installed separately
    • (G)You can check the environment where OpenCV is installed (added to Path) prior to OpenRTM-aist
 *-*-*-*-*-*-* check Path *-*-*-*-*-*-*
 C:\distribution\opencv3.0.0\build\x86\vc10\bin 
 C:\Program Files (x86)\OpenRTM-aist\1.1\bin\ 
 C:\Program Files (x86)\OpenRTM-aist\1.1\omniORB\4.1.7_vc10\bin\x86_win32\ 
 C:\Program Files (x86)\OpenRTM-aist\1.1\OpenCV2.4.9\x86\vc10\bin

(G)Installation confirmation of Python, OpenRTM-aist-Python and rtshell

  • (G)Get the path where Python is installed from the registry and check if OpenRTM-aist-Python and rtshell are installed
  • (G)Environments with multiple versions of Python installed are also supported
  • (G)Output example when 1.1.2 version is installed
    • (G)If PYTHON_DIR \ omniidl.exe exists, it is determined that OpenRTM-aist-Python is installed
    • (G)If PYTHON_DIR \ Lib \ site-packages \ rtshell exists, rtshell is determined to be installed

 *-*-*-*-*-*-* check Python installed directory *-*-*-*-*-*-* 
 C:\Python27\ ----OpenRTM-aist-Python installed.  
 C:\Python27\ ----rtshell installed.  
 C:\Python27_x64\ ----OpenRTM-aist-Python not installed.  
 C:\Python27_x64\ ----rtshell installed.  
 C:\Python35_x64\ ----OpenRTM-aist-Python not installed.  
 C:\Python35_x64\ ----rtshell not installed.  
 C:\Python35\ ----OpenRTM-aist-Python not installed.  
 C:\Python35\ ----rtshell not installed.  

(G)Check the installation directory of OpenRTM-aist-Python and rtshell

  • (G)Outputs the Python directory structure where OpenRTM-aist-Python is installed.
  • (G)Output example when 1.1.2 version is installed
    • (G)According to the above result, OpenRTM-aist-Python is not installed in C: \ Python27_x64 \, but rtshell is installed. (G)This environment is not covered.

 *-*-*-*-*-*-* check OpenRTM-aist-Python installed directory *-*-*-*-*-*-* 
 Result ⇒ log\20160906-141617_Python27-dir.tree

  • (G)Output example in an environment where OpenRTM-aist-Python 1.1.0 is installed
    • (G)This version was compatible with Python 2.6 and 2.7, so if both are installed, each log file will be output

 *-*-*-*-*-*-* check OpenRTM-aist-Python installed directory *-*-*-*-*-*-* 
 Result ⇒ log\20160906-171616_Python26-dir.tree  
 Result ⇒ log\20160906-171616_Python27-dir.tree 

(G)Confirm custom installation

  • (G)When installing the installer, you can check the installation status when custom installation is selected
  • (G)Since version 1.1.2 or later is targeted, it will not be output to the log in the environment where only version 1.1.1 is installed.
  • (G)Output example when 1.1.2 version is installed
    • (G)If you select the default standard when running the installer, all modules from [1] to [15] will be installed. However, [12] is not installed when running the 64-bit version of the installer.
    • (G)When custom installation is performed, modules not selected are not output to the log
    • (G)Modules that are not selected for custom installation will still be installed

 *-*-*-*-*-*-* check Custom installed lists *-*-*-*-*-*-* 
 [1] C++ : Runtime Environment 
 [2] C++ : Development Environment 
 [3] C++ : Examples RTC 
 [4] C++ : OpenCV RTC 
 [5] OpenCV 
 [6] Python : Examples RTC 
 [7] Java : Runtime Environment 
 [8] Java : Examples RTC 
 [9] Tools : OpenRTP 
 [10] Tools : RTSystemEditorRCP 
 [11] Tools : JRE 
 [12] OpenRTM-aist old Runtime : 1.0.0 [x86 only] 
 [13] OpenRTM-aist old Runtime : 1.1.0 
 [14] OpenRTM-aist old Runtime : 1.1.1 
 [15] IDL 

(G) tree file

  • (G)A file that saves the tree command execution results
  • (G)The extension is just tree so that it can be easily distinguished from the main log file. Check the contents with a text editor.
  • (G)Output example when 1.1.2 version is installed

(G) List of folder paths (G) Volume serial number is 9CF9-3755

 C:\PROGRAM FILES (X86)\OPENRTM-AIST
 ├─1.0.0
 │  └─vc9
 │      └─bin
 │              coil.dll
   :
 └─1.1.2
     ├─bin
     │  │  cmakeconfgen.py

Installation on Ubuntu/Debian

ubuntu_logo2.png

deb packages for installing the Python edition of OpenRTM-aist on Debian GNU Linux and Ubuntu Linux are available. The supported Debian/Ubuntu versions are listed on the download page. The Debian/Ubuntu versions may change without notice.

There are two methods available for installing:

  • Use the installer script provided by openrtm.org.
  • Use the apt-get or synaptic package manager.

Installer script

Download the pkg_install_python_ubuntu.sh or pkg_install_python_debian.sh install script provided on the download page of openrtm.org and execute it with root permissions. This script will install the necessary dependencies using apt-get.

Installing all the packages needed for development with OpenRTM-aist takes some work. For new users, using the install script is recommended. However, this will install all packages used by OpenRTM-aist, even though you may not need them. Expert users should consider installing manually using apt-get or synaptic.

Follow these steps to use the install script.

 > wget [pkg_install_python_???.sh download URL]
 > su
 # sh pkg_install1_python_ubuntu.sh
 // Answer "y" or "Y" to the questions to proceed.

Using apt-get

Edit sources.list

Openrtm.org provides a package repository for use with apt-get. This is not included in the default package repository, so it must be added to the apt-get settings by hand. Add one of the following lines to the file "/etc/apt/sources.list" (root permissions will be required):

 > su
 # vi /etc/apt/sources.list   # Edit "sources.list"

  deb http://www.openrtm.org/pub/Linux/ubuntu/ (code name) main
or
  deb http://www.openrtm.org/pub/Linux/debian/ (code name) main

"(code name)" is the code name of your version of Debian or Ubuntu Linux. It must be one of the following.

version code name
Debian GNU Linux
Debian 7.0 wheezy
Debian 8.0 jessie
Debian 9.0 stretch
Ubuntu
Ubuntu 14.04 trusty
Ubuntu 16.04 xenial
Ubuntu 16.10 yakkety
Ubuntu 17.04 zesty

Install with apt-get

Next, run these commands to install OpenRTM-aist.

 > su
 # apt-get update
 # apt-get install python
 # apt-get install omniORB-servers omniORBpy omniORBpy-devel omniORBpy-standarda
 # apt-get install OpenRTM-aist-Python OpenRTM-aist-Python-example

Answer "y" or "Y" to the questions to proceed.

It is possible to freeze OpenRTM-aist at the installed version. To do so, edit the file "/etc/apt/preferences" and append the following lines (this example is for version 1.0):

 Package: OpenRTM-aist-Python
 Pin: version 1.0.*

For more details, see http://www.debian.org/doc/manuals/apt-howto/ch-apt-get.en.html#s-pin.

Confirm installation

Check the install was successful using the following command.

 $ dpkg -l 'openrtm*'
 Desired=Unknown/Install/Remove/Purge/Hold
 | Status=Not/Inst/Cfg-files/Unpacked/Failed-cfg/Half-inst/trig-aWait/Trig-pend
 |/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
 ||/ Name                     Version            Description
 +++-==========================-==============================================================================================
 ri  openrtm-aist-python        1.0.0-release0             OpenRTM-aist, RT-Middleware distributed by AIST
 ri  openrtm-aist-python-exampl 1.0.0-release0             OpenRTM-aist, RT-Middleware distributed by AIST

Package details

The packages contain the following files.

OpenRTM-aist-Python

OpenRTM-aist-Python includes the Python modules and several commands.

  • Commands
     /usr/bin/rtcprof_python
     /usr/bin/rtcd_python
  • Sample settings files
     /usr/lib/python<version>/dist-packages/OpenRTM_aist/examples/rtc.conf.sample
  • OpenRTM-aist Python modules
     /usr/lib/python<version>/dist-packages/OpenRTM_aist/*
  • OpenRTM-aist utility modules
     /usr/lib/python<version>/dist-packages/OpenRTM_aist/utils/rtcprof
     /usr/lib/python<version>/dist-packages/OpenRTM_aist/utils/rtcd
     /usr/lib/python<version>/dist-packages/OpenRTM_aist/utils/rtc-template
     /usr/lib/python<version>/dist-packages/OpenRTM_aist/utils/rtm-naming

openrtm-aist-python-example

openrtm-aist-python-example contains sample components.

  • Samples
     /usr/share/OpenRTM-aist/examples/python/SimpleIO/
     /usr/share/OpenRTM-aist/examples/python/SimpleService/
     ...

When installation is finished, proceed to operation check.

Installation on Fedora

An RPM package for installing the Python edition of OpenRTM-aist on Fedora Linux is available. The supported Fedora Linux versions are listed on the download page. The Fedora Linux versions may change without notice.

There are two methods available for installing:

  • Use the installer script provided by openrtm.org.
  • Use the yum package manager.

Fedora installer script

Download the pkg_install_python_fedora.sh install script provided on the download page of openrtm.org and execute it with root permissions. This script will install the necessary dependencies using apt-get.

Installing all the packages needed for development with OpenRTM-aist takes some work. For new users, using the install script is recommended. However, this will install all packages used by OpenRTM-aist, even though you may not need them. Expert users should consider installing manually using yum.

Follow these steps to use the install script.

 > wget [pkg_install_python_fedora.sh download URL]
 > su
 # sh pkg_install1_python_fedora.sh
 // Answer "y" or "Y" to the questions to proceed.

Using yum

Create /etc/yum.repos.d/openrtm.repo

Openrtm.org provides a package repository for use with apt-get. This is not included in the default package repository, so it must be added to the apt-get settings by hand. Create a file called /etc/yum.repos.d/openrtm.repo (root permissions will be required), and add the following lines to it.

 [openrtm]
 name=Fedora $releasever - $basearch
 failovermethod=priority
 baseurl=http://www.openrtm.org/pub/Linux/Fedora/releases/$releasever/Fedora/$basearch/os/Packages
 enabled=1
 gpgcheck=0
 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora file:///etc/pki/rpm-gpg/RPM-GPG-KEY
/etc/yum.repos.d/openrtm.repo

Install

After making the file above, execute these commands to install with yum. Answer y to the questions to proceed.

 > su
 # yum install python
 # yum install omniORB-servers omniORBpy omniORBpy-devel omniORBpy-standard
 # yum install OpenRTM-aist-Python OpenRTM-aist-Python-example

Confirm installation

Check the install was successful using the following command.

 # rpm -qa | grep  OpenRTM-aist-Python
 OpenRTM-aist-Python-example-1.0.0-RELEASE.fcx.i386
 OpenRTM-aist-Python-1.0.0-RELEASE0.fcx.i386

Package details

The packages contain the following files.

OpenRTM-aist-Python

OpenRTM-aist-Python includes the Python modules and several commands.

  • Commands
     /usr/bin/rtcprof_python
     /usr/bin/rtcd_python
  • Sample settings files
     /usr/lib/python<version>/dist-packages/OpenRTM_aist/examples/rtc.conf.sample
  • OpenRTM-aist Python modules
     /usr/lib/python<version>/dist-packages/OpenRTM_aist/*
  • OpenRTM-aist utility modules
     /usr/lib/python<version>/dist-packages/OpenRTM_aist/utils/rtcprof
     /usr/lib/python<version>/dist-packages/OpenRTM_aist/utils/rtcd
     /usr/lib/python<version>/dist-packages/OpenRTM_aist/utils/rtc-template
     /usr/lib/python<version>/dist-packages/OpenRTM_aist/utils/rtm-naming

OpenRTM-aist-Python-example

OpenRTM-aist-Python-example contains sample components.

  • Samples
     /usr/share/OpenRTM-aist/examples/python/SimpleIO/
     /usr/share/OpenRTM-aist/examples/python/SimpleService/
     ...

When installation is finished, proceed to operation check.

Installation on Vine Linux

RPM packages for installing the Python edition of OpenRTM-aist on Vine Linux are available. The supported Vine Linux versions are listed on the download page. The Vine Linux versions may change without notice.

There are two methods available for installing:

  • Use the installer script provided by openrtm.org.
  • Use the apt-get or synaptic package manager.

Vine Linux installer script

Download the pkg_install_python_vine.sh install script provided on the download page of openrtm.org and execute it with root permissions. This script will install the necessary dependencies using apt-get.

Installing all the packages needed for development with OpenRTM-aist takes some work. For new users, using the install script is recommended. However, this will install all packages used by OpenRTM-aist, even though you may not need them. Expert users should consider installing manually using apt-get or synaptic.

Follow these steps to use the install script.

 > wget [pkg_install_python_vine.sh download URL]
 > su
 # sh pkg_install1_python_vine.sh
 // Answer "y" or "Y" to the questions to proceed.

Using apt-get

Edit sources.list

Openrtm.org provides a package repository for use with apt-get. This is not included in the default package repository, so it must be added to the apt-get settings by hand. Add the following line to the file /etc/apt/sources.list (root permissions will be required):

 rpm http://www.openrtm.org/pub/Linux/Vine/apt x.x/$(ARCH) main

Replace x.x with your Vine Linux version. For example, use 5.0 for Vine 5.0:

 rpm http://www.openrtm.org/pub/Linux/Vine/apt 5.0/$(ARCH) main

Next, run these commands to install OpenRTM-aist.

 > su
 # apt-get update
 # apt-get install python
 # apt-get install omniORB-servers omniORBpy omniORBpy-devel omniORBpy-standarda
 # apt-get install OpenRTM-aist-Python OpenRTM-aist-Python-example

Answer y or Y to the questions to proceed. You can replace the apt-get command with the synaptic command.

Confirm installation

Check the install was successful using the following command.

 # rpm -qa | grep OpenRTM-aist-Python
 OpenRTM-aist-Python-example-1.0.0-RELEASE.vlXX
 OpenRTM-aist-Python-1.0.0-RELEASE0.vlXX

Package details

The packages contain the following files.

OpenRTM-aist-Python

OpenRTM-aist-Python includes the Python modules and several commands.

  • Commands
     /usr/bin/rtcprof_python
     /usr/bin/rtcd_python
  • Sample settings files
     /usr/lib/python<version>/site-packages/OpenRTM_aist/examples/rtc.conf.sample
  • OpenRTM-aist Python modules
     /usr/lib/python<version>/site-packages/OpenRTM_aist/*
  • OpenRTM-aist utility modules
     /usr/lib/python<version>/site-packages/OpenRTM_aist/utils/rtcprof
     /usr/lib/python<version>/site-packages/OpenRTM_aist/utils/rtcd
     /usr/lib/python<version>/site-packages/OpenRTM_aist/utils/rtc-template
     /usr/lib/python<version>/site-packages/OpenRTM_aist/utils/rtm-naming

OpenRTM-aist-Python-example

OpenRTM-aist-Python-example contains sample components.

  • Samples
     /usr/share/OpenRTM-aist/examples/python/SimpleIO/
     /usr/share/OpenRTM-aist/examples/python/SimpleService/
     ...

When installation is finished, proceed to operation check.

Building from source in Windows

For those who wish to install from a source package, it is possible to build OpenRTM-aist-python manually.

Source code for Windows

The OpenRTM-aist (Python version) source package for Windows is distributed separately from the source for Linux. The contents of the source code are exactly the same but the following parts are different.

  • Character code (Windows: Shift-JIS, Linux: EUC)

Source code organisation

Original is source code of subversion repository, from its source code, on Linux,

  • Source code distribution package for Linux/Unix
  • Source code distribution package for Windows

Two types,

On Windows,

  • Source code distribution package for Windows

It is configured to create only one type of.

Build environment

The necessary tools and libraries for building are:

  • Python
  • omniORBpy

Python

Python 2.7 is required. Please obtain the latest version from the following site and install it.

When launching the installer, there are some parts to select in the wizard, You can install by default.

omniORBpy

The omniORBpy library is necessary to build the Python edition of OpenRTM-aist. omniORBpy can be obtained from the link below. Source packages and binaries are available. However, openrtm.org provides a pre-built binary installer that may be more convenient.

When you unzip the ZIP file, the directory tree shown below should be expanded. Please place the files under each directory in the Python directory as indicated below. The version of omniORBpy is described as x.y, and the version of Python as X.Y.

 + omniPRBpy-x.y
  + bin
    + x86_win32 -> both exe and dll go directly under C:\PythonXY
  + doc -> may be deleted
  + examples -> may be deleted
  + idl -> may be deleted but it may be placed under C:\PythonXY\Lib\site-packages\omniORB\idl
  + lib
    + python -> directly below C:\PythonXY\Lib\site-packages directory and files
    + x86_win32 -> .pyd directly under C:\PythonXY\Lib\site-packages

Obtaining a source package.

Download a source package, named OpenRTM-aist-Python-X.X.X.zip, and extract it in a suitable directory.

Build

Start a command prompt and change to the directory where you extracted the source code. Execute the following commands.

 > OpenRTM-aist-Python-X.X.X
 > python setup.py build

Install

Once everything has built successfully, execute the following command to install it.

 > python setup.py install

This completes the installation of OpenRTM-aist.

Building from source in Linux

For distributions that do not yet have a pre-built package available, or for users who wish to alter the OpenRTM-aist source themselves, it is possible to build OpenRTM-aist from source.

Building the source

The Python edition of OpenRTM-aist uses the distutils module to build, allowing it to be built in a variety of environments.

Supported operating systems and distributions

OpenRTM-aist-Python has been tested and confirmed to work on the following distributions.

  • FreeBSD
  • Vine Linux
  • Fedora
  • Debian
  • Ubuntu

It should be possible to build and use OpenRTM-aist-Python on other versions of Linux/UNIX.

Dependencies

OpenRTM-aist-Python-1.0.0 depends on the folloowing environmental tools and libraries.

  • Python: required to use the build tool.
  • omniORBpy: Needed to compile the IDL files.

Install these dependencies according to their individual documentations. Installing them into standard locations such as /usr and /usr/local will make compiling OpenRTM-aist-Python easier.

Download the source

Download the OpenRTM-aist-Python source code from the download page.

Extract the source

Extract the source code from the OpenRTM-aist-Python-X.X.X.tar.gz file into a suitable location.

 $ tar xvzf OpenRTM-aist-Python-X.X.X.tar.gz
 $ cd OpenRTM-aist-Python-X.X.X

Build

OpenRTM-aist uses autotools for building. It can be built in the same way as any other distutils-based package.

 $ python setup.py build [options]

The usable options are listed in the help:

 $ python setup.py --help

Install

When the build completes successfully, use this command to install:

 $  su
 # python setup.py install

This completes the installation.

Building from the repository

The OpenRTM-aist-Python source code is stored in a publicly-available Subversion repository. This source code can be checked out and built.

Checkout the source

Checkout the source from the repository as below.

 $ svn co http://www.openrtp.jp/openrtm/svn/OpenRTM-aist-Python/trunk/OpenRTM-aist-Python
 A    OpenRTM-aist-Python/OpenRTM_aist
 A    OpenRTM-aist-Python/OpenRTM_aist/CorbaPort.py
 A    OpenRTM-aist-Python/OpenRTM_aist/__init__.py
 A    OpenRTM-aist-Python/OpenRTM_aist/Guard.py
 A    OpenRTM-aist-Python/OpenRTM_aist/RTM_IDL
 A    OpenRTM-aist-Python/OpenRTM_aist/RTM_IDL/RTC.idl
 A    OpenRTM-aist-Python/OpenRTM_aist/RTM_IDL/Manager.idl
 ...
 A    OpenRTM-aist-Python/installer/WixUI_es-es.wxl
 A    OpenRTM-aist-Python/installer/WixUI_fr-fr.wxl
 A    OpenRTM-aist-Python/installer/WixUI_de-de.wxl
 A    OpenRTM-aist-Python/installer/WixUI_cs-cz.wxl
 A    OpenRTM-aist-Python/installer/WixUI_da-dk.wxl
 Checked out revision 349.

Build

After checking out, a directory called OpenRTM-aist-Python will have been created. Change to this directory.

 $ ls 
 OpenRTM-aist-Python
 $ cd OpenRTM-aist-Python
 $ ls
 MANIFEST.in           OpenRTM-aist.pth  README      setup.py
 MANIFEST_examples.in  OpenRTM_aist/     installer/

Use setup.py to build and install.

 $ python setup.py build

Making a distributable source package

By executing the command shown below, a source package such as those available at openrtm.org can be created. In order to make a distribution package, some additional tools are necessary, such as doxygen, latex, and qkc.

 $ python setup.py sdist

 $ ls -l dist/OpenRTM-aist-Python-*
 -rw-rw-r-- 1 openrtm openrtm 2721202  2月 24 16:43 OpenRTM-aist-Python-1.1.0.tar.gz
 -rw-rw-r-- 1 openrtm openrtm 4686452  2月 24 16:43 OpenRTM-aist-Python-1.1.0.zip

The following packages are created:

  • OpenRTM-aist-Python-1.1.0.tar.gz: Generic source (gzipped)
  • OpenRTM-aist-Python-1.1.0.zip: Source for Windows

Testing operation in Windows

Sample component location

Once the installer has completed successfully, OpenRTM-aist can be tested using the included sample components. These are typically stored in one of the following locations:

  • The start menu: [Start] > [OpenRTM-aist 1.1] > [Python] > [Components] > [Examples]
  • C:\Program Files\OpenRTM-aist\1.1\examples\Python
  • OpenRTM-aist\examples (When building from source.)

We will use the SimpleIO components to check that OpenRTM-aist has built and installed correctly.

Test using sample (SimpleIO)

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-python 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.

win_start_menu_open2_en.png
Opening the OpenRTM-aist Start Menu folder.

Start the name server

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].

win_start_menu_open_tool2_en.png
The shortcut to the name server.

A console like the following will open.

win_naming_service2_en.png
The name server

When the console doesn't 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.

omniORBpy is not installed

The msi installer provided by openrtm.org contains omniORBpy, but if you select Custom installation you can also install OpenRTM - aist - Python without installing omniORBpy.

Also, if installing manually, omniORBpy may not be included, so please make sure omniORBpy is installed.

py file association is wrong

The file to start the name server is C:\Program Files (x86)\OpenRTM-aist\1.1\bin\rtm-naming.py. (When installing with 32 bit version msi)
Opening the console screen in this directory and running python rtm-naming.py will start up the name server, but if you can not start by double clicking rtm-naming.py, please check the python you are installing.
If you install both 32-bit and 64-bit Python, it seems that the one you installed earlier can be associated with a py file, so installing Python with the same architecture as the OpenRTM-aist-Python installer may be fixed first I do not.

Other

In rare cases, the host name or address settings of the machine may be incorrect, causing the name server to start incorrectly. Informing omniNames.exe of the correct IP can resolve this problem. Set the OMNIORB_USEHOSTNAME environment variable in the following way (the example assumes the host's IP is 192.168.0.11):

 Variable name: OMNIORB_USEHOSTNAME
 Variable value: 192.168.0.11

Start the sample components

After starting the name server, start some suitable components. The OpenRTM-aist-Python start menu folder contains a sub-folder called "Examples," which contains many components as shown below.

win_start_menu_comps2_en.png
Sample component folder

Start ConsoleIn.py and ConsoleOut.py, causing two consoles to open.

win_consoleinout_window2.png
The ConsoleIn component and the ConsoleOut component.

When the components don't start

Sometimes the component consoles do not open. There are several possible causes for this, described below.

The console opens and immediately closes

There may be an error in the rtc.conf file, preventing the components from starting. Confirm the contents of the rtc.conf file in C:\Program Files\OpenRTM-aist\1.0\examples\Python\SimpleIO. 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

Start RTSystemEditor (RTSE)

RTSystemEditor can be started from the Start Menu: [OpenRTM-aist] > [Tools] > [RTSystemEditor].

rtse_start_en.png
Starting RTSystemEditor

Browsing the name server

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 is 2809.

rtse_connect_dialog_en.png
Connecting to a name server

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.

rtse_ns_connected_en.png
Components registered on the name server.

Adding components to the system

Open a system editor using the new system editor button in the toolbar rtse_open_editor_icon.png. The editor will open in the central pane. Drag the components rtse_rtc_icon.png from the name service view into the editor.

rtse_dnd_rtcs_en.png
Adding components to the system

Connecting and activating

The OutPort of ConsoleIn0 is displayed on its right-hand side rtse_outport_icon.png. Drag from this to the InPort on the ConsoleOut0 component rtse_inport_icon.png to connect these data ports. The connection dialog will be displayed. Click "OK" to accept the defaults and connect the components.

rtse_portconnect_en.png
Connecting data ports.

rtse_portconnect_dialog_en.png
Data port connection dialog.

A line indicating the connection will appear between the two ports. Next, click the [Activate All] button rtse_all_activate_icon.png in the toolbar. This will activate all components in the editor at once. Active components will appear green.

rtse_activated_all.png
Activated components.

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 is functioning correctly.

Other samples

Other sample components are included in the installed OpenRTM-aist-Python. They can all be used in the same way as the above example.

ConsoleIn.py Receive numbers from the console and send them over an OutPort. Connect it to ConsoleOut.py to use.
ConsoleOut.py Receive numbers over an InPort and print them in a console. Connect it to ConsoleIn.py to use.
SequenceIn.py A component to output various simple data types (short, long, float, double, and sequences). Connect it to SequenceOut.py to use.
SequenceOut.py Display various simple data types received over an InPort. Connect it to SequenceIn.py to use.
MyServiceProvider.py Provides a simple service, MyService. Connect it to MyServiceConsumer.py to use.
MyServiceConsumer.py Consumes a simple service, MyService. Connect it to MyServiceProvider.py to use.
ConfigSample.py Sample demonstrating configuration parameters. Modify the configuration parameters in RTSystemEditor or with rtconf to see the effect.
TkMobileRobotSimulator.py Simple mobile robot simulator. Receive velocities via an InPort, provide position via an OutPort.
NXTRTC.py LEGO MindStorms interface component. Command velocities via an InPort, receive infra-red sensor information and odometry via an OutPort.
AutoControl.py Calculate velocities for a mobile robot. Receive robot odometry information via an InPort, calculate the speed and provide it via an OutPort.
Composite.py Sample composite component. Combines the Motor, Controller and Sensor components into a single composite component.
Motor.py Sample component for the composite component sample.
Controller.py Sample component for the composite component sample.
Sensor.py Sample component for the composite component sample.
Slider.py Sample GUI component using Tk. Provides the value of sliders over an OutPort.
TkMotorComp.py Sample GUI component using Tk. Displays the values received via an InPort in the GUI.
TkLRFViewer.py Sample GUI component using Tk. Draws laser data in the GUI.
TkJoystickComp.py Sample GUI component using Tk. Provides a virtual joystick.

Testing operation in Linux

Once the installer has completed successfully, OpenRTM-aist-Python can be tested using the included sample components. These are typically stored in one of the following locations:

  • /usr/share/openrtm-1.1/example/python
  • /usr/local/share/OpenRTM-aist/examples/python

If you built from source, they can also be found in the source directory:

  • OpenRTM_aist/examples/<sample component name>

We will use the SimpleIO components to check that OpenRTM-aist has built and installed correctly.

SimpleIO sample component set

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 the sample components are in /usr/share/openrtm-1.1/example/python.

Test using the sample components

Start the name server

First, a name server that the components can register on must be started. If omniORBpy was installed as a package in Linux, it will often add the name server as a system service. You can check if this is the case on your system using the ps command:

 $ ps ax | grep omni
 1550  ?        Sl     0:00 /usr/bin/omniNames -errlog /var/log/omniorb4-nameserver.log
 18418 pts/2    S+     0:00 grep --color=auto omni

If omniNames is not executing, the command will produce something like this (or no output at all):

 $ ps ax | grep omni
 18418 pts/2    S+     0:00 grep --color=auto omni

To start omniNames manually, use the rtm-naming command:

 $ rtm-naming
 Starting omniORB omniNames: ubuntu910:2809
 
 Thu Dec  3 18:52:14 2009:
 
 Starting omniNames for the first time.
 Wrote initial log file.
 Read log file successfully.
 Root context is  IOR:010000002b00000049444c3a6f6d672e6f72672f436f734e616d696e672f4e616d696e67436f6e746578744578743a312e30000001000000000000007400000001010200100000003139322e3136382e3130302e31323500942600000b0000004e616d6553657276696365000300000000000000080000000100000000545441010000001c0000000100000001000100010000000100010509010100010000000901010003545441080000004e8a174b01000fef
 Checkpointing Phase 1: Prepare.
 Checkpointing Phase 2: Commit.
 Checkpointing completed.

Create an rtc.conf

An RTC configuration file, rtc.conf, must be created for the test. First, make a suitable working directory. This example will create a directory called RTCwork below the home directory. Change to this directory and create a file called "rtc.conf".

 $ cd ~/RTCwork
 $ vi rtc.conf

Add the following lines to this file. Note that you cannot use the rtc.conf in share/OpenRTM-aist/examples/ for this example.

 corba.nameservers: localhost
 naming.formats: %h.host_cxt/%n.rtc
 logger.enable: NO
 example.ConsoleOut.config_file: consout.conf
 example.ConsoleIn.config_file: consin.conf
rtc.conf

If your system is configured to use IPv6, using localhost may not function correctly. In that case, use 127.0.0.1 instead.

Start ConsoleInComp

Open a new terminal and start ConsoleInComp, making sure it uses the rtc.conf you created.

 $ python /usr/share/OpenRTM-aist/examples/python/SimpleIO/ConsoleIn.py -f ~/RTCwork/rtc.conf 
 comp_args: ConsoleIn

If using the samples directly from a source directory:

 $ python <source_dir>/OpenRTM_aist/examples/SimpleIO/ConsoleIn.py -f ~/RTCwork/rtc.conf

Start ConsoleOutComp

In the same way, start ConsoleOutComp.

 $ python /usr/share/OpenRTM-aist/examps/python/SimpleIO/ConsoleOut.py -f ~/RTCwork/rtc.conf
 comp_args: ConsoleOut

If using the samples directly from a source directory:

 $ python <source_dir>/OpenRTM_aist/examples/SimpleIO/ConsoleOut.py -f ~/RTCwork/rtc.conf

Start RTSystemEditor

You can use RTSystemEditor to connect the two components and activate them. Download the all-in-one Eclipse package from here and extract it.

RTSystemEditor requires Java Development Kit 6. Install it according to the instructions below, or use an equivalent such as OpenJDK as provided by your distribution. Refer to this page for details on starting RTSystemEditor.

Please start RTSystemEditor referring to the page of here.

Browsing the name server

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 is 2809.

unix100_NameServer_en.png
Connecting to a name server

Drag the RT Components registered on the name server into the system editor. In the name service view, select the ConsoleIn0 and ConsoleOut0 items and drag them into the editor in the middle. Now click and drag between the small boxes at the side of each component, dragging from one component to the other and releasing. The connection dialog will appear. Accept it with all defaults to make a connection between the components.

unix100_oneditor_en.png
Editing a system with RTSystemEditor

Click the green [Play] button in the toolbar to activate all components in the system editor.

Confirming data transfer

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 is functioning correctly.