├── .github └── dependabot.yml ├── .gitignore ├── .gitmodules ├── .travis.yml ├── CMakeLists.txt ├── Makefile ├── README.md ├── configure ├── env.sh ├── orocos_toolchain ├── CHANGELOG.rst ├── CMakeLists.txt └── package.xml └── setup.sh /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | version: 2 2 | updates: 3 | - package-ecosystem: gitsubmodule 4 | directory: "/" 5 | schedule: 6 | interval: daily 7 | time: "10:00" 8 | open-pull-requests-limit: 10 9 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | build/ 2 | install/ 3 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "rtt"] 2 | path = rtt 3 | url = ../rtt.git 4 | branch = toolchain-2.9 5 | [submodule "ocl"] 6 | path = ocl 7 | url = ../ocl.git 8 | branch = toolchain-2.9 9 | [submodule "orogen"] 10 | path = orogen 11 | url = ../orogen.git 12 | branch = toolchain-2.9 13 | [submodule "typelib"] 14 | path = typelib 15 | url = ../typelib.git 16 | branch = toolchain-2.9 17 | [submodule "utilrb"] 18 | path = utilrb 19 | url = ../utilrb.git 20 | branch = toolchain-2.9 21 | [submodule "log4cpp"] 22 | path = log4cpp 23 | url = ../log4cpp.git 24 | branch = toolchain-2.9 25 | [submodule "rtt_typelib"] 26 | path = rtt_typelib 27 | url = ../rtt_typelib.git 28 | branch = toolchain-2.9 29 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: generic 2 | cache: ccache 3 | 4 | addons: 5 | apt: 6 | packages: 7 | - build-essential 8 | - git 9 | - cmake 10 | - libboost-all-dev 11 | - libxml-xpath-perl 12 | - libboost-all-dev 13 | - omniorb 14 | - omniidl 15 | - omniorb-nameserver 16 | - libomniorb4-dev 17 | - pkg-config 18 | - clang-3.8 19 | 20 | env: 21 | global: 22 | - BOOST_TEST_LOG_LEVEL=message 23 | - CFLAGS="-Wall -Wextra -Wno-unused-parameter" 24 | 25 | matrix: 26 | include: 27 | - os: linux 28 | dist: xenial 29 | env: COMPILER=gcc CXXFLAGS="-std=gnu++03 -Wall -Wextra -Wno-unused-parameter" 30 | - os: linux 31 | dist: xenial 32 | env: COMPILER=gcc CXXFLAGS="-std=c++11 -Wall -Wextra -Wno-unused-parameter" 33 | - os: linux 34 | dist: xenial 35 | env: COMPILER=clang-3.8 CXXFLAGS="-std=c++11 -Wall -Wextra -Wno-unused-parameter" 36 | - os: linux 37 | dist: xenial 38 | env: COMPILER=clang CXXFLAGS="-std=c++11 -Wall -Wextra -Wno-unused-parameter" 39 | - os: osx 40 | osx_image: xcode10.1 41 | 42 | branches: 43 | only: 44 | - master 45 | - /^toolchain-[\d\.]+[\d]$/ 46 | 47 | before_install: 48 | # Set C/C++ compiler 49 | - | 50 | if [[ "${COMPILER}" != "" ]]; then 51 | export CC=${COMPILER} 52 | if [[ "${COMPILER}" == "gcc"* ]]; then 53 | export CXX=${COMPILER/gcc/g++} 54 | elif [[ "${COMPILER}" == "clang"* ]]; then 55 | export CXX=${COMPILER/clang/clang++} 56 | fi 57 | ${CC} --version 58 | ${CXX} --version 59 | fi 60 | 61 | # Install HomeBrew dependencies (macOS only) 62 | - | 63 | if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then 64 | brew update 65 | brew reinstall boost cmake ccache gnu-getopt readline omniorb 66 | 67 | # gnu-getopt is keg-only and newer HomeBrew versions refuse to link it. 68 | #brew link --force gnu-getopt 69 | export PATH="/usr/local/opt/gnu-getopt/bin:$PATH" 70 | 71 | # readline is keg-only and newer HomeBrew versions refuse to link it. 72 | #brew link --force readline 73 | export CMAKE_PREFIX_PATH="/usr/local/opt/readline" 74 | 75 | export PATH="/use/local/opt/ccache/libexec:$PATH" 76 | fi 77 | 78 | script: 79 | # Build and install the Orocos Toolchain 80 | - ./configure --enable-corba --omniorb 81 | - make -j2 install 82 | -------------------------------------------------------------------------------- /CMakeLists.txt: -------------------------------------------------------------------------------- 1 | ## 2 | ## Top-level CMakeLists.txt to build and install the whole Orocos Toolchain 3 | ## 4 | 5 | cmake_minimum_required(VERSION 2.8) 6 | 7 | # capture CMake arguments specified at the command-line 8 | # (taken from https://stackoverflow.com/a/48555098) 9 | 10 | # MUST be done before call to 'project' 11 | get_cmake_property(vars CACHE_VARIABLES) 12 | foreach(var ${vars}) 13 | if(NOT var MATCHES "^(CMAKE_INSTALL_PREFIX|CMAKE_BUILD_TYPE|GIT_BASE_URL|GIT_TAG|OROCOS_TARGET|BUILD_STATIC|ENABLE_CORBA|CORBA_IMPLEMENTATION)$") 14 | get_property(currentHelpString CACHE "${var}" PROPERTY HELPSTRING) 15 | if("${currentHelpString}" MATCHES "No help, variable specified on the command line." OR "${currentHelpString}" STREQUAL "") 16 | #message("${var} = [${${var}}] -- ${currentHelpString}") # uncomment to see the variables being processed 17 | list(APPEND CL_ARGS "-D${var}=${${var}}") 18 | endif() 19 | endif() 20 | endforeach() 21 | 22 | project(orocos_toolchain) 23 | 24 | ###################### 25 | # Build-time options # 26 | ###################### 27 | 28 | # get absolute CMAKE_INSTALL_PREFIX 29 | if (CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) 30 | set(CMAKE_INSTALL_PREFIX "${CMAKE_CURRENT_SOURCE_DIR}/install") 31 | endif() 32 | set(CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}" CACHE PATH "Install path prefix, prepended onto install directories" FORCE) 33 | message(STATUS "CMAKE_INSTALL_PREFIX: ${CMAKE_INSTALL_PREFIX}") 34 | 35 | # (copied from rtt/orocos-rtt.default.cmake) 36 | 37 | # 38 | # Sets the CMAKE_BUILD_TYPE to Release by default. This is not a normal 39 | # CMake flag which is not readable during configuration time. 40 | if (NOT CMAKE_BUILD_TYPE) 41 | set(CMAKE_BUILD_TYPE RelWithDebInfo CACHE STRING "Choose the type of build, options are: None(CMAKE_CXX_FLAGS or CMAKE_C_FLAGS used) Debug Release RelWithDebInfo MinSizeRel." FORCE) 42 | endif() 43 | 44 | # 45 | # Set the target operating system. One of [lxrt gnulinux xenomai macosx win32] 46 | # You may leave this as-is or force a certain target by removing the if... logic. 47 | # 48 | set(DOC_STRING "The Operating System target. One of [gnulinux lxrt macosx win32 xenomai]") 49 | set(OROCOS_TARGET_ENV $ENV{OROCOS_TARGET}) # MUST use helper variable, otherwise not picked up !!! 50 | if( OROCOS_TARGET_ENV ) 51 | set(OROCOS_TARGET ${OROCOS_TARGET_ENV} CACHE STRING "${DOC_STRING}" FORCE) 52 | message(STATUS "Detected OROCOS_TARGET environment variable. Using: ${OROCOS_TARGET}") 53 | else() 54 | if(NOT DEFINED OROCOS_TARGET ) 55 | if(MSVC) 56 | set(OROCOS_TARGET win32 CACHE STRING "${DOC_STRING}") 57 | elseif(APPLE AND ${CMAKE_SYSTEM_NAME} MATCHES "Darwin") 58 | set(OROCOS_TARGET macosx CACHE STRING "${DOC_STRING}") 59 | else() 60 | set(OROCOS_TARGET gnulinux CACHE STRING "${DOC_STRING}") 61 | endif() 62 | endif() 63 | message(STATUS "No OROCOS_TARGET environment variable set. Using: ${OROCOS_TARGET}") 64 | endif() 65 | 66 | # (copied from rtt/config/check_depend.cmake) 67 | 68 | # 69 | # Build static libraries? 70 | # 71 | option(BUILD_STATIC "Build Orocos RTT as a static library." OFF) 72 | 73 | # 74 | # CORBA 75 | # 76 | option(ENABLE_CORBA "Enable CORBA" OFF) 77 | if(NOT CORBA_IMPLEMENTATION) 78 | set(CORBA_IMPLEMENTATION "TAO" CACHE STRING "The implementation of CORBA to use (allowed values: TAO or OMNIORB )" ) 79 | else() 80 | set(CORBA_IMPLEMENTATION ${CORBA_IMPLEMENTATION} CACHE STRING "The implementation of CORBA to use (allowed values: TAO or OMNIORB )" ) 81 | endif() 82 | 83 | # 84 | # Enable/disable orogen and dependencies 85 | # 86 | option(BUILD_OROGEN "Build orogen and its dependencies" OFF) 87 | 88 | ############# 89 | # Git magic # 90 | ############# 91 | 92 | if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/.git") 93 | set(IS_GIT TRUE) 94 | else() 95 | set(IS_GIT FALSE) 96 | endif() 97 | 98 | set(GIT_BASE_URL "https://github.com/orocos-toolchain/") 99 | set(GIT_TAG "" CACHE STRING "Git branch or tag to checkout in submodules. If empty, use the commits tracked by submodules or the default branches.") 100 | 101 | if(GIT_TAG) 102 | message(STATUS "Building branch or tag ${GIT_TAG} for all submodules.") 103 | endif() 104 | 105 | ################################# 106 | # Build and install subprojects # 107 | ################################# 108 | 109 | include(ExternalProject) 110 | function(build_external_project project) 111 | cmake_parse_arguments(ARG "" "" "CMAKE_ARGS" ${ARGN}) 112 | 113 | set(${project}_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/${project}) 114 | set(${project}_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/${project}) 115 | 116 | if(IS_GIT) 117 | # Use the submodules... 118 | set(DOWNLOAD_AND_UPDATE_OPTIONS 119 | DOWNLOAD_COMMAND 120 | cd "${CMAKE_CURRENT_SOURCE_DIR}" && test -e ${project}/.git || git submodule update --init ${project} 121 | ) 122 | 123 | # Specific branch/tag? 124 | if(GIT_TAG) 125 | list(APPEND DOWNLOAD_AND_UPDATE_OPTIONS 126 | UPDATE_COMMAND 127 | cd "${CMAKE_CURRENT_SOURCE_DIR}/${project}" && git checkout "${GIT_TAG}" 128 | ) 129 | endif() 130 | 131 | else() 132 | # Clone from remote repository... 133 | set(DOWNLOAD_AND_UPDATE_OPTIONS 134 | GIT_REPOSITORY "${GIT_BASE_URL}${project}.git" 135 | GIT_TAG "${GIT_TAG}" 136 | ) 137 | endif() 138 | 139 | # Set PKG_CONFIG_PATH to be used by subprojects 140 | set(PKG_CONFIG_PATH "${CMAKE_INSTALL_PREFIX}/lib/pkgconfig:$ENV{PKG_CONFIG_PATH}") 141 | 142 | ExternalProject_Add(${project} 143 | PREFIX ${project} 144 | TMP_DIR "${CMAKE_CURRENT_BINARY_DIR}/tmp" 145 | STAMP_DIR "${CMAKE_CURRENT_BINARY_DIR}/stamp" 146 | DOWNLOAD_DIR "${CMAKE_CURRENT_SOURCE_DIR}/${project}" 147 | SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/${project}" 148 | BINARY_DIR "${${project}_BINARY_DIR}" 149 | INSTALL_DIR "${CMAKE_INSTALL_PREFIX}" 150 | 151 | ${DOWNLOAD_AND_UPDATE_OPTIONS} 152 | PATCH_COMMAND #nothing 153 | BUILD_ALWAYS ON 154 | 155 | CMAKE_COMMAND 156 | ${CMAKE_COMMAND} -E env "PKG_CONFIG_PATH=${PKG_CONFIG_PATH}" ${CMAKE_COMMAND} 157 | 158 | CMAKE_ARGS 159 | -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} 160 | -DCMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX} 161 | -DOROCOS_TARGET=${OROCOS_TARGET} 162 | ${ARG_CMAKE_ARGS} 163 | 164 | ${ARG_UNPARSED_ARGUMENTS} 165 | ) 166 | endfunction() 167 | 168 | build_external_project(log4cpp) 169 | build_external_project(rtt 170 | CMAKE_ARGS 171 | -DENABLE_CORBA=${ENABLE_CORBA} 172 | -DCORBA_IMPLEMENTATION=${CORBA_IMPLEMENTATION} 173 | -DBUILD_STATIC=${BUILD_STATIC} 174 | ) 175 | build_external_project(ocl 176 | DEPENDS log4cpp rtt 177 | ) 178 | 179 | if(BUILD_OROGEN) 180 | build_external_project(utilrb) 181 | build_external_project(typelib 182 | DEPENDS utilrb 183 | ) 184 | build_external_project(rtt_typelib 185 | DEPENDS rtt typelib 186 | ) 187 | build_external_project(orogen 188 | DEPENDS rtt rtt_typelib utilrb 189 | ) 190 | endif() 191 | 192 | ####################################### 193 | # Build orocos_toolchain meta package # 194 | ####################################### 195 | 196 | if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/orocos_toolchain) 197 | add_subdirectory(orocos_toolchain) 198 | endif() 199 | 200 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | .PHONY: all install 2 | all: build/CMakeCache.txt 3 | $(MAKE) -C build $@ 4 | 5 | build/CMakeCache.txt: configure 6 | 7 | configure: 8 | ./configure 9 | .PHONY: configure 10 | 11 | install: all 12 | .PHONY: install 13 | 14 | .DEFAULT: build/CMakeCache.txt 15 | $(MAKE) -C build $@ 16 | 17 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # The Orocos Toolchain 2 | 3 | The Open RObot COntrol Software ([Orocos](http://www.orocos.org/)) Toolchain is a bundle of multiple packages, which need to be build and installed separately. 4 | 5 | - [Orocos Real-Time Toolkit (rtt)](https://github.com/orocos-toolchain/rtt) - a component framework that allows us to write real-time components in C++ 6 | - [Orocos Log4cpp (log4cpp)](https://github.com/orocos-toolchain/log4cpp) - 7 | a patched version of the [Log4cpp](http://log4cpp.sourceforge.net/) library for flexible logging to files, syslog, IDSA and other destinations 8 | - [Orocos Component Library (ocl)](https://github.com/orocos-toolchain/ocl) - the necessary components to start an application and interact with it at run-time 9 | 10 | Futhermore the Orocos Toolchain comes with [oroGen](http://www.rock-robotics.org/stable/documentation/orogen/) and some of its dependencies, 11 | a specification language and code generator for the Orocos Realtime Toolkit. Also check the installation instructions of the 12 | [Rock - the Robot Construction Kit](http://www.rock-robotics.org/stable/index.html) project for further details. 13 | 14 | You might also want to have a look at the following sister projects, which are out of the scope of this manual: 15 | - [Orocos Kinematics Dynamics Library (KDL)](http://www.orocos.org/kdl) - an application independent framework for modeling and computation of kinematic chains 16 | - [Orocos Bayesian Filtering Library (BFL)](http://www.orocos.org/bfl) - an application independent framework for inference in Dynamic Bayesian Networks, i.e., recursive information processing and estimation algorithms based on Bayes' rule 17 | - [Reduced Finite State Machine (rFSM)](https://orocos.github.io/rFSM/README.html) - a small and powerful statechart implementation in Lua 18 | 19 | ## Documentation 20 | 21 | The latest documentation and API reference is currently available at https://orocos-toolchain.github.io/. 22 | 23 | ## Get Started? 24 | 25 | ### Install binary packages 26 | 27 | The Orocos project provides binary packages as part of the [ROS distribution](http://www.ros.org) for various platforms. 28 | Check and follow the [ROS installation instructions](http://wiki.ros.org/ROS/Installation), then run 29 | ```sh 30 | sudo apt-get install ros-${ROS_DISTRO}-orocos-toolchain 31 | ``` 32 | 33 | to install the Orocos Toolchain packages. 34 | 35 | As a ROS user, you might also be interested in the [rtt_ros_integration](http://wiki.ros.org/rtt_ros_integration) project: 36 | ```sh 37 | sudo apt-get install ros-${ROS_DISTRO}-rtt-ros-integration 38 | ``` 39 | 40 | ### Build the toolchain from source 41 | 42 | First, clone this repository and its submodules with the command 43 | ```sh 44 | git clone https://github.com/orocos-toolchain/orocos_toolchain.git --recursive 45 | ``` 46 | 47 | If you already have a working copy, make sure that all submodules are up-to-date: 48 | ```sh 49 | git submodule update --init --recursive 50 | ``` 51 | 52 | The next step is to configure the toolchain according to your needs: 53 | ```sh 54 | ./configure --prefix= [] 55 | ``` 56 | 57 | ```sh 58 | Usage: ./configure [] [] 59 | 60 | Available options: 61 | 62 | --prefix Installation prefix (-DCMAKE_INSTALL_PREFIX) 63 | 64 | --{en|dis}able-corba Enable/Disable CORBA transport plugin (-DENABLE_CORBA) 65 | --omniorb Select CORBA implementation OmniORB 66 | --tao Select CORBA implementation TAO 67 | ``` 68 | 69 | `configure` is nothing else than a simple wrapper around [CMake](https://cmake.org/). 70 | Check `./configure --help` for the latest available options. 71 | 72 | Last but not least, build the toolchain by running 73 | ```sh 74 | make install [-j] 75 | ``` 76 | 77 | -------------------------------------------------------------------------------- /configure: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | ## 4 | usage() { 5 | cat <&2 6 | Usage: $0 [] [] 7 | 8 | Available options: 9 | 10 | --prefix Installation prefix (-DCMAKE_INSTALL_PREFIX) 11 | 12 | --{en|dis}able-corba Enable/Disable CORBA transport plugin (-DENABLE_CORBA) 13 | --omniorb Select CORBA implementation OmniORB 14 | --tao Select CORBA implementation TAO 15 | 16 | USAGE 17 | exit 1 18 | } 19 | 20 | ## Parse command line arguments 21 | CMAKE_ARGS=() 22 | while (( "$#" )); do 23 | case "$1" in 24 | --help|-h) 25 | usage ;; 26 | 27 | --prefix=*) 28 | # set as two separate options 29 | prefix=${1#--prefix=} 30 | shift 31 | set -- --prefix "${prefix}" "$@" 32 | ;; 33 | 34 | --prefix) 35 | CMAKE_ARGS+=("-DCMAKE_INSTALL_PREFIX=$2") 36 | shift 2 ;; 37 | 38 | --enable-corba) 39 | CMAKE_ARGS+=("-DENABLE_CORBA=ON") 40 | shift ;; 41 | --disable-corba) 42 | CMAKE_ARGS+=("-DENABLE_CORBA=OFF") 43 | shift ;; 44 | --omniorb) 45 | CMAKE_ARGS+=("-DCORBA_IMPLEMENTATION=OMNIORB") 46 | shift ;; 47 | --tao) 48 | CMAKE_ARGS+=("-DCORBA_IMPLEMENTATION=TAO") 49 | shift ;; 50 | 51 | *) 52 | CMAKE_ARGS+=("$1") 53 | shift ;; 54 | esac 55 | done 56 | 57 | ## Invoke cmake 58 | mkdir -p build && cd build && cmake .. "${CMAKE_ARGS[@]}" 59 | 60 | -------------------------------------------------------------------------------- /env.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # The purpose of this script is to setup the environment for the Orocos Toolchain 4 | # (like setup.sh) and execute a command. 5 | # 6 | # Usage: env.sh COMMANDS 7 | # 8 | # This file will be installed to CMAKE_INSTALL_PREFIX by cmake with the 9 | # @-references replaced by the value of the respective cmake variable. 10 | # 11 | 12 | if [ $# -eq 0 ] ; then 13 | if [ -z "$BASH_SOURCE" -a -z "$_" ]; then 14 | /bin/echo "Usage: env.sh COMMANDS" >&2 15 | exit 1 16 | fi 17 | fi 18 | 19 | # find OROCOS installation folder from CMAKE_INSTALL_PREFIX or $0 20 | case "@CMAKE_INSTALL_PREFIX@" in 21 | @*) ;; 22 | *) OROCOS_INSTALL_PREFIX="@CMAKE_INSTALL_PREFIX@" ;; 23 | esac 24 | if [ -z "$OROCOS_INSTALL_PREFIX" ]; then 25 | OROCOS_INSTALL_PREFIX=`dirname $0` 26 | OROCOS_INSTALL_PREFIX=`cd ${OROCOS_INSTALL_PREFIX}; pwd` 27 | fi 28 | 29 | # source setup.sh 30 | if [ -f ${OROCOS_INSTALL_PREFIX}/setup.sh ]; then 31 | . ${OROCOS_INSTALL_PREFIX}/setup.sh 32 | elif [ -f ${OROCOS_INSTALL_PREFIX}/etc/orocos/setup.sh ]; then 33 | . ${OROCOS_INSTALL_PREFIX}/etc/orocos/setup.sh 34 | elif [ -f /etc/orocos/setup.sh ]; then 35 | . /etc/orocos/setup.sh 36 | else 37 | echo "env.sh: could not find Orocos setup.sh script" >&2 38 | [ $# -eq 0 ] || exit 1 39 | fi 40 | 41 | # execute command 42 | [ $# -eq 0 ] || exec "$@" 43 | -------------------------------------------------------------------------------- /orocos_toolchain/CHANGELOG.rst: -------------------------------------------------------------------------------- 1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 2 | Changes, New Features, and Fixes for the Orocos Toolchain 3 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 4 | 5 | Toolchain 2.9 6 | ============= 7 | 8 | The Orocos Toolchain v2.9 release series mainly improved on the 9 | correct execution of the Component updateHook() and allowing 10 | extended configuration options when connecting Data Flow ports. 11 | 12 | 13 | Important Caveats 14 | ----------------- 15 | 16 | * The Orocos CMake macro orocos_use_package() does not longer 17 | automatically add the package to the CMake include 18 | directories. It is still picked up by the orocos_component() 19 | and related macros, just no longer by other targets built with 20 | the standard cmake commands. Most users should not notice a 21 | difference. This minor change was required to fix include 22 | directory ordering issues when rebuilding a package without 23 | a proper cleanup of the installation folder. For details, see 24 | https://github.com/orocos-toolchain/rtt/pull/85. 25 | 26 | * updateHook() will now only be executed when an 'user' triggered 27 | event has happened, and no longer when internal bookkeeping 28 | of the ExeuctionEngine happens. For full details, see PR 29 | https://github.com/orocos-toolchain/rtt/pull/91. 30 | The motivation of this change was an older issue which reported 31 | that updateHook() was called too many times, and in unpredictable 32 | ways for the average user. The calling of updateHook() is now 33 | fully determined and under control of the user. 34 | 35 | * RTT::base::ActivityInterface got a new pure virtual member 36 | function bool timeout() which you need to implement in case 37 | you created your own Activity implementation. See 38 | https://github.com/orocos/rtt_ros_integration/pull/53 for 39 | an example of a solution. 40 | 41 | * OCL XML deployments treats a ConnPolicy XML Property with 42 | the name "Default" as a special case. The values of the 43 | "Default" ConnPolicy will be used for each unspecified field 44 | in each subsequently created ConnPolicy in the current process. 45 | This also influences ConnPolicy defaults in the C++ code paths 46 | that have nothing to do with the XML deployment. It was introduced 47 | to change at run-time the default data flow configuration, 48 | which was introduced in 2.9, and still defaults to 2.8 semantics. 49 | 50 | * For the `gnulinux` target, periodic components, timers or waiting on 51 | a condition variable are not affected by system clock adjustments anymore 52 | (e.g. due to NTP). Therefore the timestamp returned by 53 | ``RTT::os::TimeService::getNSecs()`` is also retrieved 54 | from a monotonic clock. Before, this method returned the real/wall time 55 | (as nanoseconds since the Unix epoch, 1 January 1970, 00:00:00 UTC). 56 | Only use the returned time for relative comparisons or for 57 | `RTT::os::Condition::wait_until(m, abs_time)`. See PR 58 | https://github.com/orocos-toolchain/rtt/pull/258. 59 | 60 | Improvements 61 | ------------ 62 | 63 | * updateHook() will now only be executed when an 'user' triggered 64 | event has happened, and no longer when internal bookkeeping 65 | of the ExeuctionEngine happens. For full detail, see PR 66 | https://github.com/orocos-toolchain/rtt/pull/91. 67 | Yes, it's also a major improvement. 68 | 69 | * The RTT scripting re-added the Orocos v1 'Command', by emulating 70 | it when an Operation is called with the '.cmd()' suffix. See PR 71 | https://github.com/orocos-toolchain/rtt/pull/84. 72 | 73 | * The RTT Data Flow implementation has been rewritten, in a fully 74 | backwards compatible way. It however adds powerful alternative 75 | connection semantics which are often required in control 76 | applications. For all details, see PR https://github.com/orocos-toolchain/rtt/pull/114 77 | The robustness and flexibility of the Orocos Data Flow 78 | has improved tremendously in this release and should hold for the 79 | next years. 80 | It addresses all known data flow architecture issues for 81 | intra- and inter-process communication. User can choose to 82 | opt-in on the newly available connection policies, piecewise 83 | or change the process-wide default (see OCL XML deployments 84 | below as well). There is a broad motivation text linked by 85 | the above PR, but one of the major motivators was to have 86 | much better control and predictability over the sample-by- 87 | sample dataflow going on between RTT components. 88 | 89 | * The CORBA Data Flow API now uses one-ways such that it performs 90 | much better on any network with latency. Also the connecting 91 | between RTT components over CORBA has been speed-up significantly 92 | due to the improvement of the introspection+discovery. See 93 | https://github.com/orocos-toolchain/rtt/pull/123 for all details. 94 | 95 | Other API changes 96 | ----------------- 97 | 98 | * The method `RTT::Property::copy()` introduced in version 2.7 99 | to fix a memory leak in class `PropertyBag` has been removed in 100 | favor of an overload of `RTT::Property::create()` that accepts 101 | a data source. See https://github.com/orocos-toolchain/rtt/pull/159. 102 | 103 | Detailed Changelogs 104 | ------------------- 105 | 106 | RTT https://github.com/orocos-toolchain/rtt/compare/toolchain-2.8...toolchain-2.9 107 | 108 | OCL https://github.com/orocos-toolchain/ocl/compare/toolchain-2.8...toolchain-2.9 109 | 110 | orogen https://github.com/orocos-toolchain/orogen/compare/toolchain-2.8...toolchain-2.9 111 | 112 | autoproj https://github.com/orocos-toolchain/autoproj/compare/toolchain-2.8...toolchain-2.9 113 | 114 | Toolchain 2.8 115 | ============= 116 | 117 | The Orocos Toolchain v2.8 release series mainly improved on the 118 | execution of various activities and control of the threads in RTT. 119 | 120 | 121 | Important Caveats 122 | ----------------- 123 | 124 | * RTT::SendStatus now also has a 'CollectFailure' enum value 125 | (without changing the existing enum integer values). 126 | 127 | * There were changes to the RTT StateMachine execution flow 128 | that may influence existing state machine scripts in case 129 | they are using the event operations introduced in v2.7.0. 130 | These changes were required because the event operation 131 | transition programs could execute asynchronously with respect 132 | to the State Machine. 133 | 134 | Improvements 135 | ------------ 136 | 137 | * Better support for executing RTT::extras::SlaveActivity, especially 138 | for calling Operations, where the Operation is executed by the master 139 | component and not by the slave component in order to avoid deadlocks. 140 | 141 | * RTT allows to replace boost::bind with cpp11 std::bind, but only 142 | when compiling RTT. This needs more work in next releases. 143 | 144 | * Orocos-RTT CMake macros added DESTDIR support. 145 | 146 | * RTT::Activity got an extra constructor for running non periodic 147 | RunnableInterfaces in a given scheduler+priority setting. 148 | 149 | * There was another round of improvements to RTT::extras::FileDescriptorActivity 150 | in order to work correctly in combination with RTT::extras::SlaveActivity. 151 | 152 | * RTT::extras::FileDescriptorSimulationActivity allows to simulate 153 | file descriptor activities in unit tests. This is however incomplete 154 | and will be completed in RTT 2.9 when the updateHook() updates have been 155 | merged. 156 | 157 | * RTT::Timer class has been cleaned up for correctness in corner cases 158 | and the waitFor() methods have been implemented. 159 | 160 | * RTT Threads now allow to wait for Absolute time or Relative time in 161 | case of periodic threads. 162 | 163 | * An RTT cmake flag has been added to not emit the CORBA IOR to cerr and file 164 | when the CORBA transport does not find the naming service. 165 | 166 | 167 | 168 | Detailed Changelogs 169 | ------------------- 170 | 171 | RTT https://github.com/orocos-toolchain/rtt/compare/toolchain-2.7...toolchain-2.8 172 | 173 | OCL https://github.com/orocos-toolchain/ocl/compare/toolchain-2.7...toolchain-2.8 174 | 175 | orogen https://github.com/orocos-toolchain/orogen/compare/toolchain-2.7...toolchain-2.8 176 | 177 | autoproj https://github.com/orocos-toolchain/autoproj/compare/toolchain-2.7...toolchain-2.8 178 | 179 | 180 | Toolchain 2.7 181 | ============= 182 | 183 | The Orocos Toolchain v2.7 release series mainly improved on the cmake building 184 | side and removing all the ROS interactions. It also added features and improvements 185 | proposed by the community. 186 | 187 | Important Caveats 188 | ----------------- 189 | 190 | * There were changes in the RTT::TaskContext API, where RTT::ServiceRequester 191 | became a shared_ptr and getName() became const. ServiceRequester 192 | is still considered an experimental feature. 193 | 194 | * The RTT::ComponentLoader has been changed to be again independent 195 | to ROS and the rtt_ros_integration package manages importing ROS 196 | packages. 197 | 198 | * RTT::FileDescriptorActivity was extended with timeouts at micro 199 | second resolution. 200 | 201 | * The RTT DataFlow.idl takes an extra argument in channelReady() in order 202 | to pass on the connection policy, which is required for correct 203 | channel construction. 204 | 205 | Improvements 206 | ------------ 207 | 208 | * The main change in this release is the cleanup that happened 209 | in the Orocos RTT CMake macros, which no longer behave differently 210 | when the ROS_PACKAGE_PATH or ROS_ROOT has been set. Version 2.6 211 | and earlier switched to a rosbuild layout, which proved to be 212 | undesirable. We still detect a CATKIN or rosmake build 213 | in case these tools are used and marked as such in the CMakeLists.txt 214 | files. 215 | 216 | * Signalling operations have been introduced to allow adding multiple callbacks 217 | to operations, in addition to calling the operation's user function. 218 | The RTT scripting state machines use this mechanism to respond to 219 | calls on the Service interface. 220 | 221 | * Logging the RTT logger to log4cpp was added and can be enabled 222 | at using a cmake flag in RTT. 223 | 224 | * The thread of the RTT::GlobalEngine can be configured during instantiation. 225 | 226 | * Loading and Storing RTT::Service properties has been added to the 227 | RTT::MarshallingService. 228 | 229 | * RTT::os::Thread now provides a member function to set the stop() timeout. 230 | 231 | * There were several fixes to RTT::scripting for correct execution of 232 | OwnThread / ClientThread operations, as well as parser improvements. 233 | 234 | * RTT::rt_string was added to the RTT CORBA transport. 235 | 236 | * The RTT mqueue transport is more relaxed to accepting types 237 | with virtual tables, in case no memcpy is used to marshall. 238 | 239 | Detailed Changelogs 240 | ------------------- 241 | 242 | RTT https://github.com/orocos-toolchain/rtt/compare/toolchain-2.6...toolchain-2.7 243 | 244 | OCL https://github.com/orocos-toolchain/ocl/compare/toolchain-2.6...toolchain-2.7 245 | 246 | orogen https://github.com/orocos-toolchain/orogen/compare/toolchain-2.6...toolchain-2.7 247 | 248 | autoproj https://github.com/orocos-toolchain/autoproj/compare/toolchain-2.6...toolchain-2.7 249 | 250 | 251 | Previous Versions 252 | ================= 253 | 254 | link to orocos-rtt-changes up to v2.6 255 | -------------------------------------------------------------------------------- /orocos_toolchain/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 2.8.3) 2 | project(orocos_toolchain) 3 | 4 | find_package(catkin QUIET) 5 | if(catkin_FOUND) 6 | catkin_metapackage() 7 | 8 | else() 9 | install(FILES 10 | package.xml 11 | DESTINATION share/${PROJECT_NAME}/ 12 | ) 13 | endif() 14 | 15 | # Set the default target operating system, if unspecified 16 | set(DOC_STRING "The Operating System target. One of [gnulinux lxrt macosx win32 xenomai]") 17 | set(OROCOS_TARGET_ENV $ENV{OROCOS_TARGET}) # MUST use helper variable, otherwise not picked up !!! 18 | if(OROCOS_TARGET_ENV) 19 | set(OROCOS_TARGET ${OROCOS_TARGET_ENV} CACHE STRING "${DOC_STRING}" FORCE) 20 | message(STATUS "- Detected OROCOS_TARGET environment variable. Using: ${OROCOS_TARGET}") 21 | else() 22 | if(NOT DEFINED OROCOS_TARGET) 23 | if(MSVC) 24 | set(OROCOS_TARGET win32 CACHE STRING "${DOC_STRING}") 25 | elseif(APPLE AND CMAKE_SYSTEM_NAME MATCHES "Darwin") 26 | set(OROCOS_TARGET macosx CACHE STRING "${DOC_STRING}") 27 | else() 28 | set(OROCOS_TARGET gnulinux CACHE STRING "${DOC_STRING}") 29 | endif() 30 | endif() 31 | endif() 32 | 33 | set(OROCOS_SETUP_DESTINATION "etc/orocos" CACHE STRING "Destination folder for Orocos setup files (setup.sh, env.sh), relative to CMAKE_INSTALL_PREFIX") 34 | configure_file(../setup.sh ${CMAKE_CURRENT_BINARY_DIR}/setup.sh @ONLY) 35 | configure_file(../env.sh ${CMAKE_CURRENT_BINARY_DIR}/env.sh @ONLY) 36 | 37 | if(OROCOS_SETUP_DESTINATION) 38 | install(FILES 39 | "${CMAKE_CURRENT_BINARY_DIR}/setup.sh" 40 | DESTINATION "${CMAKE_INSTALL_PREFIX}/${OROCOS_SETUP_DESTINATION}" 41 | ) 42 | install(PROGRAMS 43 | "${CMAKE_CURRENT_BINARY_DIR}/env.sh" 44 | DESTINATION "${CMAKE_INSTALL_PREFIX}/${OROCOS_SETUP_DESTINATION}" 45 | ) 46 | endif() 47 | 48 | # Install setup files directly to CMAKE_INSTALL_PREFIX if we are not 49 | # installing to a default location, but do not override setup files 50 | # installed by catkin or when building a binary package using bloom. 51 | if(NOT CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT 52 | AND NOT CMAKE_INSTALL_PREFIX STREQUAL "/usr" 53 | AND NOT CMAKE_INSTALL_PREFIX STREQUAL "/usr/local" 54 | AND NOT CATKIN_BUILD_BINARY_PACKAGE) 55 | install(CODE " 56 | if(NOT EXISTS \"\${CMAKE_INSTALL_PREFIX}/setup.sh\") 57 | file(INSTALL 58 | \"${CMAKE_CURRENT_BINARY_DIR}/setup.sh\" 59 | DESTINATION \"\${CMAKE_INSTALL_PREFIX}\" 60 | ) 61 | else() 62 | message(STATUS \"Keeping original: \${CMAKE_INSTALL_PREFIX}/setup.sh\") 63 | endif() 64 | if(NOT EXISTS \"\${CMAKE_INSTALL_PREFIX}/env.sh\") 65 | file(INSTALL 66 | \"${CMAKE_CURRENT_BINARY_DIR}/env.sh\" 67 | DESTINATION \"\${CMAKE_INSTALL_PREFIX}\" 68 | FILE_PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE 69 | ) 70 | else() 71 | message(STATUS \"Keeping original: \${CMAKE_INSTALL_PREFIX}/env.sh\") 72 | endif() 73 | ") 74 | endif() 75 | -------------------------------------------------------------------------------- /orocos_toolchain/package.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | orocos_toolchain 5 | 2.9.0 6 | 7 | This metapackage provides Orocos RTT and OCL and dependencies. 8 | 9 | GPL v2 + linking exception 10 | LGPL-2.1 11 | Orocos Developers 12 | 13 | catkin 14 | 15 | log4cpp 16 | ocl 17 | rtt 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /setup.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # The purpose of this script is to setup the environment for the Orocos Toolchain. 4 | # 5 | # Usage: . @CMAKE_INSTALL_PREFIX@/@OROCOS_SETUP_DESTINATION@/setup.sh 6 | # 7 | # This file will be installed to CMAKE_INSTALL_PREFIX by cmake with the 8 | # @-references replaced by the value of the respective cmake variable. 9 | # 10 | 11 | # find OROCOS installation folder from CMAKE_INSTALL_PREFIX, BASH_SOURCE or $_ 12 | case "@CMAKE_INSTALL_PREFIX@" in 13 | @*) ;; 14 | *) OROCOS_INSTALL_PREFIX="@CMAKE_INSTALL_PREFIX@" ;; 15 | esac 16 | if [ -z "$OROCOS_INSTALL_PREFIX" ]; then 17 | if [ -n "$BASH_SOURCE" ]; then 18 | OROCOS_INSTALL_PREFIX=`dirname ${BASH_SOURCE[0]}` 19 | OROCOS_INSTALL_PREFIX=`cd ${OROCOS_INSTALL_PREFIX}; pwd` 20 | elif [ -n "$_" ]; then 21 | OROCOS_INSTALL_PREFIX=`dirname $_` 22 | OROCOS_INSTALL_PREFIX=`cd ${OROCOS_INSTALL_PREFIX}; pwd` 23 | else 24 | echo "Could not determine the OROCOS installation prefix for your shell." >&2 25 | exit 1 26 | fi 27 | fi 28 | 29 | # initialize OROCOS_TARGET if unset 30 | if [ -z "${OROCOS_TARGET}" ]; then 31 | case "@OROCOS_TARGET@" in 32 | @*) ;; 33 | *) OROCOS_TARGET="@OROCOS_TARGET@" ;; 34 | esac 35 | fi 36 | 37 | # add bin/ to PATH 38 | if [ -d ${OROCOS_INSTALL_PREFIX}/bin ]; then 39 | if ! echo $PATH | grep -q "${OROCOS_INSTALL_PREFIX}/bin"; then 40 | PATH="${PATH}:${OROCOS_INSTALL_PREFIX}/bin" 41 | fi 42 | fi 43 | 44 | # add OROCOS_INSTALL_PREFIX to CMAKE_PREFIX_PATH 45 | if [ -d ${OROCOS_INSTALL_PREFIX} ]; then 46 | if ! echo $CMAKE_PREFIX_PATH | grep -q "${OROCOS_INSTALL_PREFIX}"; then 47 | if [ -z "$CMAKE_PREFIX_PATH" ]; then 48 | CMAKE_PREFIX_PATH="${OROCOS_INSTALL_PREFIX}" 49 | else 50 | CMAKE_PREFIX_PATH="${CMAKE_PREFIX_PATH}:${OROCOS_INSTALL_PREFIX}" 51 | fi 52 | fi 53 | fi 54 | 55 | # add lib/orocos to RTT_COMPONENT_PATH 56 | # Note: The rtt env-hook also sets the RTT_COMPONENT_PATH variable. We could 57 | # remove this redundant section. 58 | if [ -d ${OROCOS_INSTALL_PREFIX}/lib/orocos ]; then 59 | if ! echo $RTT_COMPONENT_PATH | grep -q "${OROCOS_INSTALL_PREFIX}/lib/orocos"; then 60 | if [ -z "$RTT_COMPONENT_PATH" ]; then 61 | RTT_COMPONENT_PATH="${OROCOS_INSTALL_PREFIX}/lib/orocos" 62 | else 63 | RTT_COMPONENT_PATH="${RTT_COMPONENT_PATH}:${OROCOS_INSTALL_PREFIX}/lib/orocos" 64 | fi 65 | fi 66 | fi 67 | 68 | # add lib/pkgconfig to PKG_CONFIG_PATH 69 | if [ -d ${OROCOS_INSTALL_PREFIX}/lib/pkgconfig ]; then 70 | if ! echo $PKG_CONFIG_PATH | grep -q "${OROCOS_INSTALL_PREFIX}/lib/pkgconfig"; then 71 | if [ -z "$PKG_CONFIG_PATH" ]; then 72 | PKG_CONFIG_PATH="${OROCOS_INSTALL_PREFIX}/lib/pkgconfig" 73 | else 74 | PKG_CONFIG_PATH="${PKG_CONFIG_PATH}:${OROCOS_INSTALL_PREFIX}/lib/pkgconfig" 75 | fi 76 | fi 77 | fi 78 | 79 | # find and source target-specific env-hooks in etc/orocos/profile.d 80 | for hook in ${OROCOS_INSTALL_PREFIX}/etc/orocos/profile.d/*.sh; do 81 | [ -f $hook ] && . ${hook} 82 | done 83 | 84 | # export environment variables 85 | export OROCOS_INSTALL_PREFIX 86 | export OROCOS_TARGET 87 | export PATH 88 | export CMAKE_PREFIX_PATH 89 | export RTT_COMPONENT_PATH 90 | export PKG_CONFIG_PATH 91 | --------------------------------------------------------------------------------