Build from the source code (C++)

If you want to modify OpenRTM-aist itself and use it on Windows, you can get the source code of OpenRTM-aist and build it. Since CMake is supported from 2.0 series, the procedure is different from 1.2 series.

Required software and libraries

Following software is required. For details, see Installation of OpenRTM-aist 2.0 series on Windows

  • Visual Studio
  • Python
  • CMake
  • Doxygen & Graphviz(If you also want to do a document build.)
You also need the omniORB library.
  • omniORB 4.2.5 (As of 2022/06)

The pre-built binary package provided by openrtm.org is available under the name omniORB-4.2.5-x64-vc14-pyXX.zip at the link below. Please replace it with the version of python to install XX, download the appropriate one, and extract it to a suitable location (C:\workspace\omniORB in the explanation below).

For more information on building with other libraries, see RT System Development (Advanced)・Build process of OpenRTM-aist(C++) by using CMake

Command procedure at build/installation

Get the source code. Check out the master branch for the latest OpenRTM-aist 2.0 source, and v2.0.0 for the 2.0.0 release source.

 git clone https://github.com/OpenRTM/OpenRTM-aist
 cd OpenRTM-aist
 git checkout -b v200-src refs/tags/v2.0.0

Specify the following in the CMake option and execute.
  • -DORB_ROOT : Downloaded and unzipped omniORB path
  • -G :Visual Studio version("Visual Studio 17 2022" "Visual Studio 16 2019" etc.)
  • -DCMAKE_INSTALL_PREFIX : Installation path from source

 mkdir build
 cd build
 cmake -DORB_ROOT=C:/workspace/omniORB-4.2.5-x64-vc14-py310 -G "Visual Studio 17 2022" -DCMAKE_INSTALL_PREFIX=C:/workspace/openrtminstall ..

Then execute the following command. Finally, if you see the following, the build is successful.

 cmake --build . --verbose --config Release 
 The build was successful.
     0 Warnings
     0 Error

If the build is successful, complete the installation with the following command:

 cmake --build . --config Release --target install

Batch processing with script

I will introduce a script (cxx_src_build.bat) that batch processes from download of omniORB to source build and installation. It is executed by placing it under the OpenRTM-aist directory that has been git cloned.

 cd OpenRTM-aist
 cxx_src_build.bat > 1.log

When executing the script, specify only the three items "Visual Studio version", "Python version", and "Installation destination" according to the environment.

 set CMAKE_GENERATOR="Visual Studio 16 2019"
 set PY_VERSION=39 ・・・ Specify one of 37, 38, 39, 310
 set INSTALL_PREFIX=C:\localRTM-test

cxx_src_build.bat

 @echo off
 @rem
 @rem ---------- Fit to the environment.   -------
 set CMAKE_GENERATOR="Visual Studio 16 2019"
 set PY_VERSION=39
 set INSTALL_PREFIX=C:\localRTM-test
 @rem ---------- Fit to the environment.  -------
 set OMNI_VERSION=4.2.5
 set VC_VERSION=vc14
 if exist %INSTALL_PREFIX% rmdir /s/q %INSTALL_PREFIX%
 @rem
 @rem Convert "\" in the path to "/"
 set current_dir=%~dp0
 set RTM_ROOT=%current_dir:\=/%
 set INSTALL_PREFIX=%INSTALL_PREFIX:\=/%
 @rem
 @rem omniORB download
 set base_omni_url="https://openrtm.org/pub/omniORB/win32/omniORB-%OMNI_VERSION%/"
 set OMNIORB_DIR=omniORB-%OMNI_VERSION%-x64-%VC_VERSION%-py%PY_VERSION%
 set OMNIORB_ZIP=%OMNIORB_DIR%.zip
 set OMNIORB_URL=%base_omni_url%/%OMNIORB_ZIP%
 if not exist %OMNIORB_ZIP% (
   powershell wget -O %OMNIORB_ZIP% %OMNIORB_URL%
 )
 if exist %OMNIORB_DIR% rmdir /s/q %OMNIORB_DIR%
 powershell Expand-Archive .\%OMNIORB_ZIP% -DestinationPath .\ 
 set OMNIORB_ROOT=%RTM_ROOT%/%OMNIORB_DIR%
 @rem
 @rem set cmake parameter
 set CMAKE_OPT=-DORB_ROOT=%OMNIORB_ROOT% ^
   -DCMAKE_INSTALL_PREFIX=%INSTALL_PREFIX% ^
   -G %CMAKE_GENERATOR% ^
   -A x64 ..
 call :CMAKE_Release
 exit /b
 @rem
 :CMAKE_Release
 if exist build-release rmdir /s/q build-release
 mkdir build-release
 cd build-release
 cmake %CMAKE_OPT% 
 cmake --build . --verbose --config Release
 cmake --install .
 cd ..
 exit /b

Reference:Build script for msi generation

Build script for creating msm (for vc2019, 2022) to be embedded in msi. I am using the following.
  • Boost libraryライブラリ 1.78.0
  • OpenSSL 3.0.1
  • Fluent Bit v1.8.9 Build from source

OpenRTM-aist has both Release/Debug builds. As for the binary of omniORB, there is no problem using the binary built with vc14, but the binary for vc16 is prepared and used.

 @echo off
 @rem
 set CMAKE_GENERATOR="Visual Studio 16 2019"
 set VC_VERSION=vc16
 set SSL_VC_VERSION=vc14
 set PY_VERSION=39
 set INSTALL_PREFIX=C:\localRTM
 set OMNI_VERSION=4.2.5
 set SSL_VERSION=3.0.1
 set BOOST_PATH=C:\local\boost_1_78_0
 set FLB_ROOT=C:\localFLB
 @rem
 if exist %INSTALL_PREFIX% rmdir /s/q %INSTALL_PREFIX%
 @rem ------------
 @rem Convert "\" in the path to "/"
 set current_dir=%~dp0
 set RTM_ROOT=%current_dir:\=/%
 set BOOST_PATH=%BOOST_PATH:\=/%
 set INSTALL_PREFIX=%INSTALL_PREFIX:\=/%
 set FLB_ROOT=%FLB_ROOT:\=/%
 @rem ------------
 @rem omniORB download
 set base_omni_url="https://openrtm.org/pub/omniORB/win32/omniORB-%OMNI_VERSION%/"
 set OMNIORB_DIR=omniORB-%OMNI_VERSION%-x64-%VC_VERSION%-py%PY_VERSION%
 set OMNIORB_ZIP=%OMNIORB_DIR%.zip
 set OMNIORB_URL=%base_omni_url%/%OMNIORB_ZIP%
 if not exist %OMNIORB_ZIP% (
   powershell wget -O %OMNIORB_ZIP% %OMNIORB_URL%
 )
 if exist %OMNIORB_DIR% rmdir /s/q %OMNIORB_DIR%
 powershell Expand-Archive .\%OMNIORB_ZIP% -DestinationPath .\
 set OMNIORB_ROOT=%RTM_ROOT%/%OMNIORB_DIR%
 @rem ------------
 @rem OpenSSL download
 set base_ssl_url="https://openrtm.org/pub/OpenSSL/%SSL_VERSION%"
 set OPENSSL_ZIP=openssl-%SSL_VERSION%-win64-%SSL_VC_VERSION%.zip
 set OPENSSL_URL=%base_ssl_url%/%OPENSSL_ZIP%
 if not exist %OPENSSL_ZIP% (
   powershell wget -O %OPENSSL_ZIP% %OPENSSL_URL%
 )
 if exist OpenSSL rmdir /s/q OpenSSL
 powershell Expand-Archive .\%OPENSSL_ZIP% -DestinationPath .\
 set SSL_ROOT=%RTM_ROOT%OpenSSL/build
 @rem ------------
 @rem set cmake parameter
 set CMAKE_OPT=-DRTM_VC_VER=%VC_VERSION% ^
   -DORB_ROOT=%OMNIORB_ROOT% ^
   -DCORBA=omniORB ^
   -DSSL_ENABLE=ON ^
   -DOPENSSL_ROOT=%SSL_ROOT% ^
   -DCMAKE_INSTALL_PREFIX=%INSTALL_PREFIX% ^
   -DWINDOWS_MSM_BUILD=ON ^
   -DBOOST_ROOT=%BOOST_PATH% ^
   -DFLUENTBIT_ENABLE=ON ^
   -DFLUENTBIT_ROOT=%FLB_ROOT% ^
   -G %CMAKE_GENERATOR% ^
   -A x64 ..
 call :CMAKE_Debug
 call :CMAKE_Release
 exit /b
 @rem ------------
 :CMAKE_Release
 if exist build-release rmdir /s/q build-release
 mkdir build-release
 cd build-release
 cmake %CMAKE_OPT% 
 cmake --build . --verbose --config Release
 cmake --install .
 cd ..
 exit /b
 @rem ------------
 :CMAKE_Debug
 if exist build-debug rmdir /s/q build-debug
 mkdir build-debug
 cd build-debug
 cmake %CMAKE_OPT%
 cmake --build . --verbose --config Debug
 cmake --install . --config Debug
 cd ..
 exit /b

Download

latest Releases : 2.0.0-RELESE

2.0.0-RELESE Download page

Number of Projects

Choreonoid

Motion editor/Dynamics simulator

OpenHRP3

Dynamics simulator

OpenRTP

Integrated Development Platform

AIST RTC collection

RT-Components collection by AIST

TORK

Tokyo Opensource Robotics Association

DAQ-Middleware

Middleware for DAQ (Data Aquisition) by KEK