diff --git a/.github/workflows/build_and_test.yml b/.github/workflows/ci_pr.yml
similarity index 91%
rename from .github/workflows/build_and_test.yml
rename to .github/workflows/ci_pr.yml
index cc509ca951..db0e990aef 100644
--- a/.github/workflows/build_and_test.yml
+++ b/.github/workflows/ci_pr.yml
@@ -1,8 +1,6 @@
-name: Docker Image CI
+name: Build and Test CI for Pull Requests
on:
- push:
- branches: [ 'master', 'develop' ]
pull_request:
branches: [ 'master', 'develop' ]
@@ -23,6 +21,7 @@ jobs:
--build-arg UBUNTU_VERSION=16.04
--build-arg ROS_VERSION=kinetic
--build-arg PYTHON=''
+ --build-arg REMOTE=ghcr.io/nasa
-t astrobee/astrobee:latest-ubuntu16.04
- name: Test code
@@ -45,6 +44,7 @@ jobs:
--build-arg UBUNTU_VERSION=18.04
--build-arg ROS_VERSION=melodic
--build-arg PYTHON=3
+ --build-arg REMOTE=ghcr.io/nasa
-t astrobee/astrobee:latest-ubuntu18.04
- name: Test code
@@ -67,6 +67,7 @@ jobs:
--build-arg UBUNTU_VERSION=20.04
--build-arg ROS_VERSION=noetic
--build-arg PYTHON=3
+ --build-arg REMOTE=ghcr.io/nasa
-t astrobee/astrobee:latest-ubuntu20.04
- name: Test code
diff --git a/.github/workflows/ci_push.yml b/.github/workflows/ci_push.yml
new file mode 100644
index 0000000000..0589c215c5
--- /dev/null
+++ b/.github/workflows/ci_push.yml
@@ -0,0 +1,100 @@
+name: Build, test and push packages CI
+
+on:
+ push:
+ branches: [ 'develop' ]
+
+jobs:
+
+ build-xenial:
+
+ runs-on: ubuntu-18.04
+
+ steps:
+ - uses: actions/checkout@v2
+
+ - name: Checkout submodule
+ run: git submodule update --init --depth 1 description/media
+
+ - name: Build code for Ubuntu 16
+ run: docker build . -f ./scripts/docker/astrobee.Dockerfile
+ --build-arg UBUNTU_VERSION=16.04
+ --build-arg ROS_VERSION=kinetic
+ --build-arg PYTHON=''
+ --build-arg REMOTE=ghcr.io/nasa
+ -t ghcr.io/${{ github.repository_owner }}/astrobee:latest-ubuntu16.04
+
+ - name: Test code
+ run: docker build . -f ./scripts/docker/test_astrobee.Dockerfile
+ --build-arg UBUNTU_VERSION=16.04
+ --build-arg REMOTE=ghcr.io/${{ github.repository_owner }}
+ -t astrobee:test-ubuntu16.04
+
+ - name: Log in to registry
+ run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.repository_owner }} --password-stdin
+
+ - name: Push Docker image
+ run: |
+ if [ "${{ github.repository_owner }}" = "nasa" ]; then docker push ghcr.io/${{ github.repository_owner }}/astrobee:latest-ubuntu16.04; fi;
+
+ build-bionic:
+
+ runs-on: ubuntu-18.04
+
+ steps:
+ - uses: actions/checkout@v2
+
+ - name: Checkout submodule
+ run: git submodule update --init --depth 1 description/media
+
+ - name: Build code for Ubuntu 18
+ run: docker build . -f ./scripts/docker/astrobee.Dockerfile
+ --build-arg UBUNTU_VERSION=18.04
+ --build-arg ROS_VERSION=melodic
+ --build-arg PYTHON=3
+ --build-arg REMOTE=ghcr.io/nasa
+ -t ghcr.io/${{ github.repository_owner }}/astrobee:latest-ubuntu18.04
+
+ - name: Test code
+ run: docker build . -f ./scripts/docker/test_astrobee.Dockerfile
+ --build-arg UBUNTU_VERSION=18.04
+ --build-arg REMOTE=ghcr.io/${{ github.repository_owner }}
+ -t astrobee:test-ubuntu18.04
+
+ - name: Log in to registry
+ run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.repository_owner }} --password-stdin
+
+ - name: Push Docker image
+ run: |
+ if [ "${{ github.repository_owner }}" = "nasa" ]; then docker push ghcr.io/${{ github.repository_owner }}/astrobee:latest-ubuntu18.04; fi;
+
+ build-focal:
+
+ runs-on: ubuntu-20.04
+
+ steps:
+ - uses: actions/checkout@v2
+
+ - name: Checkout submodule
+ run: git submodule update --init --depth 1 description/media
+
+ - name: Build code for Ubuntu 20
+ run: docker build . -f ./scripts/docker/astrobee.Dockerfile
+ --build-arg UBUNTU_VERSION=20.04
+ --build-arg ROS_VERSION=noetic
+ --build-arg PYTHON=3
+ --build-arg REMOTE=ghcr.io/nasa
+ -t ghcr.io/${{ github.repository_owner }}/astrobee:latest-ubuntu20.04
+
+ - name: Test code
+ run: docker build . -f ./scripts/docker/test_astrobee.Dockerfile
+ --build-arg UBUNTU_VERSION=20.04
+ --build-arg REMOTE=ghcr.io/${{ github.repository_owner }}
+ -t astrobee:test-ubuntu20.0
+
+ - name: Log in to registry
+ run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.repository_owner }} --password-stdin
+
+ - name: Push Docker image
+ run: |
+ if [ "${{ github.repository_owner }}" = "nasa" ]; then docker push ghcr.io/${{ github.repository_owner }}/astrobee:latest-ubuntu20.04; fi;
diff --git a/.github/workflows/ci_release.yml b/.github/workflows/ci_release.yml
new file mode 100644
index 0000000000..449de2001a
--- /dev/null
+++ b/.github/workflows/ci_release.yml
@@ -0,0 +1,127 @@
+name: Build, test and push packages CI
+
+on:
+ push:
+ branches: [ 'release' ]
+
+jobs:
+
+ build-xenial:
+
+ runs-on: ubuntu-18.04
+
+ steps:
+ - uses: actions/checkout@v2
+
+ - name: Checkout submodule
+ run: git submodule update --init --depth 1 description/media
+
+ - name: Build base for Ubuntu 16
+ run: docker build . -f ./scripts/docker/astrobee_base.Dockerfile
+ --build-arg UBUNTU_VERSION=16.04
+ --build-arg ROS_VERSION=kinetic
+ --build-arg PYTHON=''
+ -t astrobee/astrobee:base-latest-ubuntu16.04
+
+ - name: Build code for Ubuntu 16
+ run: docker build . -f ./scripts/docker/astrobee.Dockerfile
+ --build-arg UBUNTU_VERSION=16.04
+ --build-arg ROS_VERSION=kinetic
+ --build-arg PYTHON=''
+ -t astrobee/astrobee:latest-ubuntu16.04
+
+ - name: Test code
+ run: docker build . -f ./scripts/docker/test_astrobee.Dockerfile
+ --build-arg UBUNTU_VERSION=16.04
+ -t astrobee:test-ubuntu16.04
+
+ - name: Log in to registry
+ run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.repository_owner }} --password-stdin
+
+ - name: Push Docker image
+ run: |
+ export VERSION=`grep -w -m 1 "Release" RELEASE.md | awk '{print $3}'`
+ docker tag astrobee/astrobee:latest-base-ubuntu16.04 ghcr.io/${{ github.repository_owner }}/astrobee:latest-base-ubuntu16.04
+ docker push ghcr.io/${{ github.repository_owner }}/astrobee:latest-base-ubuntu16.04
+ docker tag astrobee/astrobee:latest-ubuntu16.04 ghcr.io/${{ github.repository_owner }}/astrobee:v${VERSION}-ubuntu16.04
+ docker push ghcr.io/${{ github.repository_owner }}/astrobee:v${VERSION}-ubuntu16.04
+
+ build-bionic:
+
+ runs-on: ubuntu-18.04
+
+ steps:
+ - uses: actions/checkout@v2
+
+ - name: Checkout submodule
+ run: git submodule update --init --depth 1 description/media
+
+ - name: Build base for Ubuntu 18
+ run: docker build . -f ./scripts/docker/astrobee_base.Dockerfile
+ --build-arg UBUNTU_VERSION=18.04
+ --build-arg ROS_VERSION=melodic
+ --build-arg PYTHON=''
+ -t astrobee/astrobee:base-latest-ubuntu18.04
+
+ - name: Build code for Ubuntu 18
+ run: docker build . -f ./scripts/docker/astrobee.Dockerfile
+ --build-arg UBUNTU_VERSION=18.04
+ --build-arg ROS_VERSION=melodic
+ --build-arg PYTHON=''
+ -t astrobee/astrobee:latest-ubuntu18.04
+
+ - name: Test code
+ run: docker build . -f ./scripts/docker/test_astrobee.Dockerfile
+ --build-arg UBUNTU_VERSION=18.04
+ -t astrobee:test-ubuntu18.04
+
+ - name: Log in to registry
+ run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.repository_owner }} --password-stdin
+
+ - name: Push Docker image
+ run: |
+ export VERSION=`grep -w -m 1 "Release" RELEASE.md | awk '{print $3}'`
+ docker tag astrobee/astrobee:latest-base-ubuntu18.04 ghcr.io/${{ github.repository_owner }}/astrobee:latest-base-ubuntu18.04
+ docker push ghcr.io/${{ github.repository_owner }}/astrobee:latest-base-ubuntu18.04
+ docker tag astrobee/astrobee:latest-ubuntu18.04 ghcr.io/${{ github.repository_owner }}/astrobee:v${VERSION}-ubuntu18.04
+ docker push ghcr.io/${{ github.repository_owner }}/astrobee:v${VERSION}-ubuntu18.04
+
+ build-focal:
+
+ runs-on: ubuntu-20.04
+
+ steps:
+ - uses: actions/checkout@v2
+
+ - name: Checkout submodule
+ run: git submodule update --init --depth 1 description/media
+
+ - name: Build base for Ubuntu 20
+ run: docker build . -f ./scripts/docker/astrobee_base.Dockerfile
+ --build-arg UBUNTU_VERSION=20.04
+ --build-arg ROS_VERSION=noetic
+ --build-arg PYTHON=3
+ -t astrobee/astrobee:base-latest-ubuntu20.04
+
+ - name: Build code for Ubuntu 20
+ run: docker build . -f ./scripts/docker/astrobee.Dockerfile
+ --build-arg UBUNTU_VERSION=20.04
+ --build-arg ROS_VERSION=noetic
+ --build-arg PYTHON=3
+ -t astrobee/astrobee:latest-ubuntu20.04
+
+ - name: Test code
+ run: docker build . -f ./scripts/docker/test_astrobee.Dockerfile
+ --build-arg UBUNTU_VERSION=20.04
+ -t astrobee:test-ubuntu20.04
+
+ - name: Log in to registry
+ run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.repository_owner }} --password-stdin
+
+ - name: Push Docker image
+ run: |
+ export VERSION=`grep -w -m 1 "Release" RELEASE.md | awk '{print $3}'`
+ docker tag astrobee/astrobee:latest-base-ubuntu20.04 ghcr.io/${{ github.repository_owner }}/astrobee:latest-base-ubuntu20.04
+ docker push ghcr.io/${{ github.repository_owner }}/astrobee:latest-base-ubuntu20.04
+ docker tag astrobee/astrobee:latest-ubuntu20.04 ghcr.io/${{ github.repository_owner }}/astrobee:v${VERSION}-ubuntu20.04
+ docker push ghcr.io/${{ github.repository_owner }}/astrobee:v${VERSION}-ubuntu20.04
diff --git a/.gitignore b/.gitignore
index c874f89b61..82f212e91b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -70,7 +70,6 @@ arm_build_release
arm_build_debug
armhf
build_native
-data
doc/html
doc/latex
diff --git a/CMakeLists.txt b/CMakeLists.txt
deleted file mode 100644
index 7a4ce49830..0000000000
--- a/CMakeLists.txt
+++ /dev/null
@@ -1,411 +0,0 @@
-# Copyright (c) 2017, United States Government, as represented by the
-# Administrator of the National Aeronautics and Space Administration.
-#
-# All rights reserved.
-#
-# The Astrobee platform is licensed under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with the
-# License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-# License for the specific language governing permissions and limitations
-# under the License.
-
-cmake_minimum_required(VERSION 3.0)
-project(Astrobee)
-
-set(ASTROBEE_VERSION 0.15.2)
-
-# Define our options
-option(USE_CCACHE
- "Use ccache to speed up compiling, at the cost of optimization"
- ON)
-option(USE_CTC
- "Use cross compile toolchain for making ARM binaries"
- OFF)
-option(USE_ROS
- "Build the ROS-dependent functionality."
- ON)
-option(USE_DDS
- "Build the DDS-dependent functionality."
- ON)
-option(USE_STATIC_LIBS
- "Build using static libraries. Will use lots of drive space."
- OFF)
-option(TEST_COVERAGE
- "Build the code with code coverage options. Not compatible with USE_CTC."
- OFF)
-option(USE_DRIVERS
- "Build the tools in the drivers directory."
- ON)
-option(IS_BAMBOO_BUILD
- "The code is being built under the bamboo CI system"
- OFF)
-option(ENABLE_GPROF
- "Enable compling with support for profiling wih gprof (the GNU Profiler)."
- OFF)
-option(ENABLE_GOOGLE_PROF
- "Enable support for profiling wih pprof (the Google Profiler)."
- OFF)
-option(ENABLE_QP
- "Enable support for the QP planner."
- ON)
-option(ENABLE_PICOFLEXX
- "Enable support for building the PicoFlexx driver"
- ON)
-option(ENABLE_GAZEBO
- "Enable support for building the Gazebo simulator"
- ON)
-option(ENABLE_VIVE
- "Enable support for building the Vive drivers"
- ON)
-option(ENABLE_VIVE_SOLVER
- "Enable support for building the Vive offline solver"
- ON)
-option(ENABLE_INTEGRATION_TESTING
- "Build the integration tests if tests are active."
- ON)
-option(BUILD_LOC_RVIZ_PLUGINS
- "Build the localization rviz plugins."
- ON)
-
-
-if ( "${CMAKE_VERSION}" VERSION_GREATER 3.0.0 )
- cmake_policy(SET CMP0045 OLD)
- cmake_policy(SET CMP0046 OLD)
-endif()
-
-set(ROS_FOUND FALSE)
-if(DEFINED ENV{ROS_DISTRO})
- set(ROS_DISTRO $ENV{ROS_DISTRO})
- set(ROS_FOUND TRUE)
-else()
- message("ROS distro variable not set. Trying to figure it out...")
- set(AVAILABLE_ROS_VERSIONS "melodic;kinetic;noetic")
- set(ROS_FOUND FALSE)
- foreach(version ${AVAILABLE_ROS_VERSIONS})
- if(NOT ROS_FOUND)
- find_path(ROS_H ros.h PATHS /opt/ros/${version}/include/ros)
- if(ROS_H)
- set(ROS_DISTRO ${version})
- message("Found ros version ${ROS_DISTRO}")
- set(ROS_FOUND TRUE)
- endif()
- endif()
- endforeach()
-endif()
-
-# Verify the user has the pre-commit hook
-execute_process(
- COMMAND cp scripts/git/pre-commit .git/hooks
- WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
- )
-
-# Let cmake know of our additional scripts
-list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake")
-list(APPEND CMAKE_PREFIX_PATH "${CMAKE_SOURCE_DIR}/cmake")
-
-if (USE_CTC)
- list(APPEND CMAKE_PREFIX_PATH "${ARM_CHROOT_DIR}/opt/ros/${ROS_DISTRO}")
-else (USE_CTC)
- list(APPEND CMAKE_PREFIX_PATH "/opt/ros/${ROS_DISTRO}")
-endif (USE_CTC)
-
-# Enable RPATHs
-set(CMAKE_SKIP_BUILD_RPATH FALSE)
-set(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE)
-
-# The following works for then the binaries are not installed, but are
-# ran from the build directory.
-list(APPEND CMAKE_INSTALL_RPATH "$ORIGIN/../lib")
-list(APPEND CMAKE_INSTALL_RPATH "/opt/ros/${ROS_DISTRO}/lib")
-
-# The following RPATHs work for when the binaries are installed
-if (USE_CTC)
- list(APPEND CMAKE_INSTALL_RPATH "/opt/rti/ndds/lib/$ENV{NDDSARCH}")
- set(CMAKE_INSTALL_RPATH_USE_LINK_PATH FALSE)
-else (USE_CTC)
- set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
- list(APPEND CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib")
-endif (USE_CTC)
-
-# If the user selected static libs .. set BUILD_SHARED_LIBS accordingly
-if(USE_STATIC_LIBS)
- set(BUILD_SHARED_LIBS OFF)
-else(USE_STATIC_LIBS)
- set(BUILD_SHARED_LIBS ON)
-endif(USE_STATIC_LIBS)
-
-# Check that the compiler supports C++14
-include(CheckCXXCompilerFlag)
-include(CheckCXXSourceCompiles)
-CHECK_CXX_COMPILER_FLAG("-std=c++14" COMPILER_SUPPORTS_CXX14)
-CHECK_CXX_COMPILER_FLAG("-std=c++0x" COMPILER_SUPPORTS_CXX0X)
-if(COMPILER_SUPPORTS_CXX14)
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14")
-elseif(COMPILER_SUPPORTS_CXX0X)
- SET(LAMBDA_SRC "int main(int, char*[]) {int r = [] (int x) {return x;}(0); return r;}")
- CHECK_CXX_SOURCE_COMPILES("${LAMBDA_SRC}" COMPILER_SUPPORTS_LAMBDAS)
- if (NOT COMPILER_SUPPORTS_LAMBDAS)
- message(SEND_ERROR "C++0x compiler doesn't support lambda functions.")
- else()
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x")
- endif()
-else()
- message(SEND_ERROR "Couldn't find compiler which supports C++14 or C++0X.")
-endif()
-
-if (TEST_COVERAGE)
- find_program(GCOV_PATH gcov)
- if (NOT GCOV_PATH)
- message(SEND_ERROR "Couldn't find gcov, but test coverage was opted for.")
- endif()
-endif()
-
-if (ENABLE_GPROF)
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pg")
-endif()
-
-# if we're compiling for native use ccache to speed things up
-if (NOT USE_CTC)
- if (USE_CCACHE)
- find_program(CCACHE_EXECUTABLE ccache)
- mark_as_advanced(CCACHE_EXECUTABLE)
- if(CCACHE_EXECUTABLE)
- foreach(LANG C CXX)
- message(STATUS "Enabling ccache for ${LANG}")
- set(CMAKE_${LANG}_COMPILER_LAUNCHER ${CCACHE_EXECUTABLE} CACHE STRING "")
- endforeach()
- endif()
- endif (USE_CCACHE)
-endif (NOT USE_CTC)
-
-# Enable OpenMP if we have it. (Ceres will use it .. maybe more of our
-# products will use it later).
-find_package(OpenMP)
-if (OPENMP_FOUND)
- set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}")
- set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
-endif(OPENMP_FOUND)
-
-find_package(Glog REQUIRED)
-find_package(Gflags REQUIRED)
-ADD_DEFINITIONS(-DFREEFLYER_GFLAGS_NAMESPACE=${GFLAGS_NAMESPACE})
-enable_testing()
-
-if (USE_CTC)
- find_program(LSB_RELEASE_EXEC lsb_release)
- execute_process(COMMAND "${LSB_RELEASE_EXEC}" --short --codename OUTPUT_VARIABLE LSB_RELEASE_VERSION_SHORT OUTPUT_STRIP_TRAILING_WHITESPACE)
- if("${LSB_RELEASE_VERSION_SHORT}" STREQUAL "bionic")
- set(Protobuf_PROTOC_EXECUTABLE /usr/local/bin/protoc)
- endif()
-endif (USE_CTC)
-
-find_package(Protobuf REQUIRED)
-if (NOT PROTOBUF_PROTOC_EXECUTABLE)
- message(FATAL_ERROR "Could not find system's protoc executable")
-endif (NOT PROTOBUF_PROTOC_EXECUTABLE)
-
-find_package(Ceres REQUIRED)
-
-find_package(Boost 1.54.0 QUIET REQUIRED COMPONENTS filesystem system iostreams thread program_options timer)
-find_package(Eigen3 REQUIRED)
-find_package(ZLIB)
-find_package(Luajit20 REQUIRED)
-
-# Find OpenCV and fix a 3.3.1 bug
-find_package(OpenCV 3 REQUIRED)
-if (${OpenCV_VERSION} MATCHES "3.3.1")
- foreach(__cvcomponent ${OpenCV_LIB_COMPONENTS})
- set (__original_cvcomponent ${__cvcomponent})
- if(NOT __cvcomponent MATCHES "^opencv_")
- set(__cvcomponent opencv_${__cvcomponent})
- endif()
- if (TARGET ${__cvcomponent})
- set_target_properties(${__cvcomponent} PROPERTIES
- MAP_IMPORTED_CONFIG_DEBUG ""
- MAP_IMPORTED_CONFIG_RELEASE ""
- MAP_IMPORTED_CONFIG_RELWITHDEBINFO ""
- MAP_IMPORTED_CONFIG_MINSIZEREL ""
- )
- endif()
- endforeach(__cvcomponent)
-endif()
-if (USE_CTC)
- foreach(__cvcomponent ${OpenCV_LIB_COMPONENTS})
- set(OpenCV_LIBS ${OpenCV_LIBS} "${OpenCV_INSTALL_PATH}/lib/arm-linux-gnueabihf/lib${__cvcomponent}3.so")
- endforeach(__cvcomponent)
-endif (USE_CTC)
-set(OpenCV_LIBRARIES ${OpenCV_LIBS})
-
-find_package(dbow2 REQUIRED)
-find_package(Alvar REQUIRED)
-find_package(GTSAM REQUIRED)
-find_package(OpenMVG QUIET REQUIRED)
-find_package(JsonCpp REQUIRED)
-find_package(FFMPEG QUIET) # Optional
-if (ENABLE_PICOFLEXX)
- find_package(royale REQUIRED)
-endif (ENABLE_PICOFLEXX)
-# Find pkg-config supported libraries
-if (ENABLE_VIVE)
- find_package(USB REQUIRED)
- find_package(JSONC REQUIRED)
- find_package(ARGTABLE2 REQUIRED)
- find_package(ZLIB REQUIRED)
-endif (ENABLE_VIVE)
-
-
-if (NOT USE_CTC) # pkg-config needs extra work to be used for cross compile
- pkg_check_modules(YAMLCPP yaml-cpp)
- if (YAMLCPP_FOUND)
- set (YAMLCPP_INCLUDE_DIRS ${YAMLCPP_INCLUDEDIR})
- endif (YAMLCPP_FOUND)
-endif (NOT USE_CTC)
-
-if(ENABLE_GOOGLE_PROF)
- SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--no-as-needed -lprofiler -Wl,--as-needed")
- SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DDEBUG")
-endif()
-
-if(USE_CTC)
- set(BUILD_LOC_RVIZ_PLUGINS OFF)
-endif()
-
-set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wno-unused-local-typedefs -Wno-packed-bitfield-compat -std=c++14")
-set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wno-unused-local-typedefs -Wno-packed-bitfield-compat -std=c++14")
-set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--no-undefined")
-set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--no-undefined")
-
-# Set Architecture Specific Instructions
-if (USE_CTC)
- # Cross Compiling, armv7-a == Cortex A5, A7, A8 (Beagle Bone), A9
- # (Odroid), A12, A15 (Snapdragon-ish), A17
- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -march=armv7-a -mtune=cortex-a9 -mfpu=neon -I${ARM_CHROOT_DIR}/usr/include/arm-linux-gnueabihf")
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=armv7-a -mtune=cortex-a9 -mfpu=neon -I${ARM_CHROOT_DIR}/usr/include/arm-linux-gnueabihf")
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-deprecated-declarations -Wno-unused-variable")
-else (USE_CTC)
- if (NOT IS_BAMBOO_BUILD)
- if ((NOT USE_CCACHE) OR (NOT CCACHE_EXECUTABLE))
- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -march=native -mtune=native")
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=native -mtune=native")
- endif ()
- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mno-avx")
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mno-avx")
- endif (NOT IS_BAMBOO_BUILD)
-endif (USE_CTC)
-
-# Bring in catkin
-if (USE_CTC)
- # Catkin brings in GTest as a dependency. We don't want it because
- # we have our own ... on top of that it doesn't build correctly for
- # ARM. Our own unit tests however will continue to
- # work. (non-catkin)
- set(CATKIN_SKIP_TESTING ON)
-endif (USE_CTC)
-if (USE_ROS)
- set(ENV{ROS_LANG_DISABLE} "genlisp:gennodejs:geneus:$ENV{ROS_LANG_DISABLE}")
-
- if (USE_CTC)
- find_package(catkin2 COMPONENTS roscpp message_generation std_msgs geometry_msgs sensor_msgs cv_bridge image_transport tf tf2 tf2_ros rosbag nodelet)
- else ()
- find_package(catkin2 COMPONENTS roscpp message_generation std_msgs geometry_msgs sensor_msgs cv_bridge image_transport tf tf2 tf2_ros rosbag nodelet rviz)
- endif (USE_CTC)
-
- find_package(Qt5 ${rviz_QT_VERSION} REQUIRED Core Widgets)
-
- if (IS_BAMBOO_BUILD)
- include(BambooFix)
- endif()
-
- find_package(PCL REQUIRED COMPONENTS common)
- find_package(Octomap MODULE REQUIRED)
- #pkg_check_modules(OROCOS_KDL REQUIRED orocos_kdl)
- if (USE_CTC)
- set(OROCOS_KDL_LIBRARIES ${ARM_CHROOT_DIR}/opt/ros/${ROS_DISTRO}/lib/liborocos-kdl.so)
- endif (USE_CTC)
- set(catkin_FOUND ${catkin2_FOUND})
-endif(USE_ROS)
-
-if (USE_DDS)
- list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/soracore")
-
- if (USE_CTC)
- set(SORACORE_ROOT_DIR ${ARM_CHROOT_DIR}/usr)
- else (USE_CTC)
- set(SORACORE_ROOT_DIR /usr)
- endif (USE_CTC)
-
- set(MIRO_ROOT_DIR ${SORACORE_ROOT_DIR})
-
- find_package(QtXml REQUIRED)
- find_package(Miro REQUIRED)
- find_package(RtiDds REQUIRED)
- find_package(Soracore REQUIRED)
-endif(USE_DDS)
-
-# Include Our CMake Functions
-include(CreateLibrary)
-include(CreateMsgTargets)
-include(CreateRosTestTargets)
-include(CreateTestTargets)
-include(CreateToolTargets)
-include(ExternalProjects)
-include(FetchContent)
-include(InstallLaunchFiles)
-
-add_subdirectory(external)
-
-if (TEST_COVERAGE)
- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g --coverage")
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g --coverage")
- set(CMAKE_LIBS_COVERAGE "gcov")
-endif()
-
-set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
-set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
-set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
-
-# install the version.txt file when install target is run
-add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/version.txt
- COMMAND ${CMAKE_COMMAND}
- -D OUTPUT_FILE=${CMAKE_CURRENT_BINARY_DIR}/version.txt
- -D ASTROBEE_VERSION=${ASTROBEE_VERSION}
- -D GIT_MODULE_FILE="${CMAKE_SOURCE_DIR}/cmake/GetGitRevisionDescription.cmake"
- -P ${CMAKE_SOURCE_DIR}/cmake/SetVersion.cmake)
-add_custom_target(version DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/version.txt)
-install(CODE "execute_process(COMMAND \"${CMAKE_COMMAND}\" --build \"${CMAKE_CURRENT_BINARY_DIR}\" --target version)")
-install(FILES ${CMAKE_CURRENT_BINARY_DIR}/version.txt DESTINATION ${CMAKE_INSTALL_PREFIX} )
-
-# install the env_wrapper.sh for running on astrobee
-install(PROGRAMS scripts/deploy/env_wrapper.sh DESTINATION ${CMAKE_INSTALL_PREFIX} )
-
-if (USE_ROS)
- add_subdirectory(tools)
- add_subdirectory(astrobee)
- add_subdirectory(communications)
- add_subdirectory(gnc)
- add_subdirectory(mobility)
- add_subdirectory(behaviors)
- add_subdirectory(management)
- add_subdirectory(description)
- if (NOT USE_CTC AND ENABLE_GAZEBO)
- add_subdirectory(simulation)
- endif (NOT USE_CTC AND ENABLE_GAZEBO)
-endif (USE_ROS)
-
-if (USE_DRIVERS)
- add_subdirectory(hardware)
-endif (USE_DRIVERS)
-
-add_subdirectory(shared)
-add_subdirectory(localization)
-
-if (USE_DDS)
- add_subdirectory(wdock)
-endif (USE_DDS)
-
diff --git a/INSTALL.md b/INSTALL.md
index 220b5234f9..1d7607cab1 100644
--- a/INSTALL.md
+++ b/INSTALL.md
@@ -1,17 +1,20 @@
# Install
-## Quick Start using the Astrobee docker image
+## Quick start using the Astrobee Docker image
-If you just want to try out the astrobee simulator, you can use one of the docker images in the [Docker Hub](https://hub.docker.com/r/astrobee/astrobee).
+*The following has been tested on native (non-VM) Ubuntu systems using X11 (the default). Please see [these ROS pages](http://wiki.ros.org/docker/Tutorials#Tooling_with_Docker) for more resources.*
-Given that Docker (see note) is installed:
+If you just want to try out the astrobee simulator, you can use one of the Docker images in the [Github Container Registry](https://github.com/nasa/astrobee/pkgs/container/astrobee).
- git clone https://github.com/nasa/astrobee.git
- cd astrobee
- ./scripts/docker/run.sh
+Make sure you have Docker installed in your Ubuntu system following the [installation instructions](https://docs.docker.com/engine/install/ubuntu/) and [post-installation steps for Linux](https://docs.docker.com/engine/install/linux-postinstall/).
-*Note: Be aware that this only works on a native ubuntu install.*
-*Note: Make sure you have docker installed in your ubuntu system following the [installation instructions](https://docs.docker.com/engine/install/ubuntu/) and [post-installation steps for Linux](https://docs.docker.com/engine/install/linux-postinstall/).*
+For some systems (with discrete graphics cards), you may need to install [additional software](http://wiki.ros.org/docker/Tutorials/Hardware%20Acceleration).
+
+``` bash
+git clone https://github.com/nasa/astrobee.git
+cd astrobee
+./scripts/docker/run.sh --remote
+```
## Building the code natively
@@ -32,7 +35,7 @@ If you are a NASA user and want to install the cross-compiler for robot testing
## Using Docker
-Docker build is also available for Ubuntu 16 and Ubuntu 18,
+Docker builds are available for Ubuntu 16.04, 18.04 and 20.04.
Instructions on how to build the images natively and run the containers are in:
diff --git a/README.md b/README.md
index 5f55dc4d68..747c431e9b 100644
--- a/README.md
+++ b/README.md
@@ -15,7 +15,7 @@ signaling, and sound. The flight software is hosted on each Astrobee's three int
uses the open-source [Robot Operating System (ROS)](https://www.ros.org/) framework as message-passing
middleware. It provides a high-level [Astrobee Command API](https://nasa.github.io/astrobee/html/command_dictionary.html) for controlling the robot and has multiple operating modes. It can execute a plan (command sequence), individual operator commands (teleoperation), or commands from guest science code running onboard Astrobee.
-The Astrobee Robot Software simulator, built using [ROS](https://www.ros.org/) and [Gazebo](http://gazebosim.org/), enables the flight software to be evaluated without the need for robot hardware. The supporting tools include a tool that processes ISS imagery to [build maps for Astrobee localization](https://github.com/nasa/astrobee/tree/master/localization/sparse_mapping), along with many others.
+The Astrobee Robot Software simulator, built using [ROS](https://www.ros.org/) and [Gazebo](http://gazebosim.org/), enables the flight software to be evaluated without the need for robot hardware. The supporting tools include a tool that processes ISS imagery to [build maps for Astrobee localization](https://nasa.github.io/astrobee/html/sparsemapping.html), along with many others.
Released separately, the Astrobee ground data system (GDS) includes Astrobee control station software that communicates with Astrobee flight software via the Data Distribution Service (DDS) network protocol over the ISS Ku-IP space-to-ground link. The control station is written primarily in Java using the Eclipse RCP framework. Source code is in the [`astrobee_gds`](https://github.com/nasa/astrobee_gds) repository, or you can download the [binary release](https://software.nasa.gov/software/ARC-17994-1B).
@@ -31,7 +31,7 @@ The Astrobee Robot Software remains a work in progress. Please consult the
### Contributing
The Astrobee Robot Software is open source, and we welcome contributions
-from the public. Please submit pull requests to the [`develop`](https://github.com/nasa/astrobee/tree/develop) branch.
+from the public. Please submit pull requests to the [`develop`](https://github.com/nasa/astrobee/tree/develop) branch. The code must follow the [Astrobee code style](https://nasa.github.io/astrobee/html/astrobee-code-style.html).
For us to merge any pull requests, we must request that contributors sign and submit a
[Contributor License Agreement](https://www.nasa.gov/sites/default/files/atoms/files/astrobee_individual_contributor_license_agreement.pdf)
due to NASA legal requirements. Thank you for your understanding.
diff --git a/RELEASE.md b/RELEASE.md
index ceec6c1aaa..6df6b794e7 100644
--- a/RELEASE.md
+++ b/RELEASE.md
@@ -1,5 +1,13 @@
# Releases
+## Release 0.16.0
+
+ * project compiles with catkin
+ * mapper performance improvement
+ * imu_augmentor performance improvement
+ * calibration improvements
+ * multiple other fixes
+
## Release 0.15.2
* added python linters black and isort in the CI pipeline
diff --git a/astrobee.doxyfile b/astrobee.doxyfile
index 4d830446a7..0876902677 100644
--- a/astrobee.doxyfile
+++ b/astrobee.doxyfile
@@ -39,7 +39,7 @@ PROJECT_NAME = "NASA Astrobee Robot Software"
# control system is used.
-PROJECT_NUMBER = 0.15.2
+PROJECT_NUMBER = 0.16.0
# Using the PROJECT_BRIEF tag one can provide an optional one line description
# for a project that appears at the top of each page and should give viewer a
diff --git a/astrobee/CMakeLists.txt b/astrobee/CMakeLists.txt
index 2d072feb1e..bb6271bb59 100644
--- a/astrobee/CMakeLists.txt
+++ b/astrobee/CMakeLists.txt
@@ -15,20 +15,57 @@
# License for the specific language governing permissions and limitations
# under the License.
+cmake_minimum_required(VERSION 3.0)
project(astrobee)
+set(ASTROBEE_VERSION 0.16.0)
+
+## Compile as C++14, supported in ROS Kinetic and newer
+add_compile_options(-std=c++14)
+
+# Verify the user has the pre-commit hook
+execute_process(
+ COMMAND cp ../scripts/git/pre-commit ../.git/hooks
+ WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
+ )
+
+## Find catkin macros and libraries
+find_package(catkin2 REQUIRED COMPONENTS
+ roscpp
+)
+
catkin_package(
CATKIN_DEPENDS roscpp
)
+#############
+## Install ##
+#############
+
install(DIRECTORY config/ DESTINATION config)
# resources will be installed separately
# install(DIRECTORY resources/ DESTINATION resources)
-install_launch_files()
+# Mark launch files for installation
+install(DIRECTORY launch/
+ DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}/launch
+ PATTERN ".svn" EXCLUDE)
install(PROGRAMS scripts/apk_print_version.sh
scripts/check_env.sh
scripts/print_version.sh
scripts/cpu_print_version.sh
DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION})
+
+# install the version.txt file when install target is run
+add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/version.txt
+ COMMAND ${CMAKE_COMMAND}
+ -D OUTPUT_FILE=${CMAKE_CURRENT_BINARY_DIR}/version.txt
+ -D ASTROBEE_VERSION=${ASTROBEE_VERSION}
+ -D GIT_MODULE_FILE="${CMAKE_SOURCE_DIR}/../cmake/GetGitRevisionDescription.cmake"
+ -P ${CMAKE_SOURCE_DIR}/../cmake/SetVersion.cmake)
+add_custom_target(version DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/version.txt)
+install(CODE "execute_process(COMMAND \"${CMAKE_COMMAND}\" --build \"${CMAKE_CURRENT_BINARY_DIR}\" --target version)")
+install(FILES ${CMAKE_CURRENT_BINARY_DIR}/version.txt DESTINATION ${CMAKE_INSTALL_PREFIX} )
+
+install(PROGRAMS scripts/env_wrapper.sh DESTINATION ${CMAKE_INSTALL_PREFIX} )
\ No newline at end of file
diff --git a/astrobee/config/mobility/mapper.config b/astrobee/config/mobility/mapper.config
index 02e194d72a..cbe6cd85ba 100644
--- a/astrobee/config/mobility/mapper.config
+++ b/astrobee/config/mobility/mapper.config
@@ -183,12 +183,12 @@ parameters = {
unit = "hertz",
description = "Frequency at which the collision checker runs."
},{
- id = "tf_update_rate",
+ id = "octomap_update_rate",
reconfigurable = true,
type = "double",
- default = 10,
- min = 1,
- max = 100,
+ default = 1,
+ min = 0.1,
+ max = 5,
unit = "hertz",
description = "Frequency at which the tf listeners update tf data."
},{
diff --git a/astrobee/config/robots/bumble.config b/astrobee/config/robots/bumble.config
index 9e31033f94..c1f73031e8 100644
--- a/astrobee/config/robots/bumble.config
+++ b/astrobee/config/robots/bumble.config
@@ -25,14 +25,14 @@ robot_i2c_bus = "/dev/i2c-1"
robot_imu_drdy_pin = 4
robot_geometry = {
- hazcam_to_navcam_transform = transform(vec3(0.070656217, -0.0053120391, -0.0086391367), quat4(-0.0033938631, 0.011939978, 0.99990009, -0.0067619677)),
- scicam_to_hazcam_transform = transform(vec3(0.043949838, -0.026925687, -0.14459291), quat4(-0.009399956, 0.015955961, 0.99982772, -0.0012581665)),
+ hazcam_to_navcam_transform = transform(vec3(0.07142937, 0.00058221217, -0.001373669), quat4(-0.0030431141, 0.0092646368, 0.99993195, -0.0064039206)),
+ scicam_to_hazcam_transform = transform(vec3(-0.0052887445, 0.010298013, -0.043606689), quat4(0.0018545621, 0.012796392, 0.99991616, -0.00069204825)),
navcam_to_hazcam_timestamp_offset = -0.02,
scicam_to_hazcam_timestamp_offset = 0.5,
hazcam_depth_to_image_transform = {
- 0.91122714, -0.00020224138, -0.00066071236, 0.00091477566,
- 0.00020680677, 0.91120557, 0.0063030044, -0.0072143461,
- 0.00065929762, -0.0063031525, 0.91120536, -0.0035329091,
+ 0.91602851, -0.00031586647, -0.0028485861, 0.0029767338,
+ 0.00032189197, 0.91603089, 0.0019373744, -0.0020741879,
+ 0.0028479115, -0.0019383659, 0.91602652, -0.0042296964,
0, 0, 0, 1},
-- Engineering positions with idealized orientations
@@ -87,12 +87,11 @@ robot_camera_calibrations = {
gain=50,
exposure=150
},
--- Placeholder for sci_cam, not accurate!
sci_cam = {
- distortion_coeff = {0.10733913, -0.10935864, 0.0010663099, 0.0010407278},
+ distortion_coeff = {0.029948958, -0.056854916, -0.00077885482, -0.0039909885},
intrinsic_matrix = {
- 1138.4943, 0.0, 680.36447,
- 0.0, 1138.4943, 534.00133,
+ 1048.499, 0.0, 705.22914,
+ 0.0, 1048.499, 511.03079,
0.0, 0.0, 1.0
},
gain=50,
diff --git a/astrobee/config/robots/queen.config b/astrobee/config/robots/queen.config
index 3ffe24c21b..fe5953c911 100644
--- a/astrobee/config/robots/queen.config
+++ b/astrobee/config/robots/queen.config
@@ -48,8 +48,8 @@ robot_camera_calibrations = {
0.0, 602.67924, 509.73835,
0.0, 0.0, 1.0
},
- gain=100,
- exposure=150
+ gain=50,
+ exposure=175
},
dock_cam = {
distortion_coeff = 1.01007,
diff --git a/astrobee/config/tools/camera_target_based_intrinsics_calibrator.config b/astrobee/config/tools/camera_target_based_intrinsics_calibrator.config
new file mode 100644
index 0000000000..0bed02b753
--- /dev/null
+++ b/astrobee/config/tools/camera_target_based_intrinsics_calibrator.config
@@ -0,0 +1,70 @@
+-- Copyright (c) 2017, United States Government, as represented by the
+-- Administrator of the National Aeronautics and Space Administration.
+--
+-- All rights reserved.
+--
+-- The Astrobee platform is licensed under the Apache License, Version 2.0
+-- (the "License"); you may not use this file except in compliance with the
+-- License. You may obtain a copy of the License at
+--
+-- http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+-- WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+-- License for the specific language governing permissions and limitations
+-- under the License.
+
+require "context"
+
+camera = "nav_cam"
+
+calibrate_focal_lengths = true
+calibrate_principal_points = true
+calibrate_distortion = true
+calibrate_target_poses = false
+
+-- fov, rad, or radtan
+distortion_type = "fov"
+
+-- Calibration optimizer params
+calibrator_max_num_iterations = 100
+calibrator_function_tolerance = 1e-8
+calibrator_parameter_tolerance = 1e-8
+calibrator_verbose_optimization = true
+calibrator_huber_loss = 1.345
+-- dense_qr, dense_schur, sparse_normal_cholesky, sparse_schur, iterative_schur
+-- Favor dense_qr or dense_schur for smaller/medium sized problems
+-- Favor iterative schur for large problems
+calibrator_linear_solver = "dense_qr"
+calibrator_use_explicit_schur_complement = false
+scale_loss_radially = false
+radial_scale_power = 1
+-- ReprojectionPoseEstimate optimizer params
+reprojection_optimize_estimate = true
+reprojection_max_num_iterations = 100
+reprojection_function_tolerance = 1e-8
+reprojection_parameter_tolerance = 1e-8
+reprojection_verbose_optimization = true
+reprojection_huber_loss = 1.345
+reprojection_linear_solver = "dense_qr"
+reprojection_use_explicit_schur_complement = false
+reprojection_max_inlier_threshold = 3.0
+-- RansacPnP params
+ransac_max_inlier_threshold = 7.0
+ransac_num_iterations = 100
+ransac_min_num_inliers = 4
+-- p3p, epnp, ap3p, or it
+ransac_pnp_method = "p3p"
+-- Data Loading Params
+max_num_match_sets = 10000
+min_num_target_inliers = 4
+only_use_inliers = false
+
+-- Other
+image_width = 1280
+image_height = 960
+max_visualization_error_norm = 50
+save_individual_initial_reprojection_images = false
+save_final_reprojection_image = true
+individual_max_visualization_error_norm = 50
diff --git a/astrobee/config/worlds/granite.config b/astrobee/config/worlds/granite.config
index c5f43bf03a..83e9ad118c 100755
--- a/astrobee/config/worlds/granite.config
+++ b/astrobee/config/worlds/granite.config
@@ -110,7 +110,7 @@ world_flight_modes = {
speed = 0;
-- Tolerances
- tolerance_pos_endpoint = 0.05; -- Endpoint position (5 cm)
+ tolerance_pos_endpoint = 0.1; -- Endpoint position (10 cm)
tolerance_pos = 0.1; -- Position (10 cm)
tolerance_vel = 0; -- Velocity (disabled)
tolerance_att = 0.1745; -- Attitude (10 degrees)
@@ -152,7 +152,7 @@ world_flight_modes = {
speed = 2;
-- Tolerances
- tolerance_pos_endpoint = 0.05; -- Endpoint position (5 cm)
+ tolerance_pos_endpoint = 0.1; -- Endpoint position (10 cm)
tolerance_pos = 0.2; -- Position (20 cm)
tolerance_vel = 0; -- Velocity (disabled)
tolerance_att = 0.3491; -- Attitude (20 degrees)
@@ -194,7 +194,7 @@ world_flight_modes = {
speed = 3;
-- Tolerances
- tolerance_pos_endpoint = 0.1; -- Endpoint position (5 cm)
+ tolerance_pos_endpoint = 0.1; -- Endpoint position (10 cm)
tolerance_pos = 0.2; -- Position (20 cm)
tolerance_vel = 0; -- Velocity (disabled)
tolerance_att = 0.3490; -- Attitude (20 degrees)
@@ -236,7 +236,7 @@ world_flight_modes = {
speed = 1;
-- Tolerances
- tolerance_pos_endpoint = 0.05; -- Endpoint position (5 cm)
+ tolerance_pos_endpoint = 0.1; -- Endpoint position (10 cm)
tolerance_pos = 0.1; -- Position (10 cm)
tolerance_vel = 0; -- Velocity (disabled)
tolerance_att = 0.1745; -- Attitude (10 degrees)
@@ -277,7 +277,7 @@ world_flight_modes = {
speed = 3;
-- Tolerances
- tolerance_pos_endpoint = 0.05; -- Endpoint position (5 cm)
+ tolerance_pos_endpoint = 0.1; -- Endpoint position (10 cm)
tolerance_pos = 0.1; -- Position (10 cm)
tolerance_vel = 0; -- Velocity (disabled)
tolerance_att = 0.1745; -- Attitude (10 degrees)
diff --git a/astrobee/config/worlds/iss.config b/astrobee/config/worlds/iss.config
index 38a9dbf6d9..7f472e08d4 100755
--- a/astrobee/config/worlds/iss.config
+++ b/astrobee/config/worlds/iss.config
@@ -120,7 +120,7 @@ world_flight_modes = {
speed = 0;
-- Tolerances
- tolerance_pos_endpoint = 0.05; -- Endpoint position (5 cm)
+ tolerance_pos_endpoint = 0.1; -- Endpoint position (10 cm)
tolerance_pos = 0.1; -- Position (10 cm)
tolerance_vel = 0; -- Velocity (disabled)
tolerance_att = 0.1745; -- Attitude (10 degrees)
@@ -161,7 +161,7 @@ world_flight_modes = {
speed = 2;
-- Tolerances
- tolerance_pos_endpoint = 0.05; -- Endpoint position (5 cm)
+ tolerance_pos_endpoint = 0.1; -- Endpoint position (10 cm)
tolerance_pos = 0.25; -- Position (25 cm)
tolerance_vel = 0; -- Velocity (disabled)
tolerance_att = 0.3491; -- Attitude (20 degrees)
@@ -202,7 +202,7 @@ world_flight_modes = {
speed = 3;
-- Tolerances
- tolerance_pos_endpoint = 0.1; -- Endpoint position (5 cm)
+ tolerance_pos_endpoint = 0.1; -- Endpoint position (10 cm)
tolerance_pos = 0.2; -- Position (20 cm)
tolerance_vel = 0; -- Velocity (disabled)
tolerance_att = 0.3490; -- Attitude (20 degrees)
@@ -243,7 +243,7 @@ world_flight_modes = {
speed = 1;
-- Tolerances
- tolerance_pos_endpoint = 0.05; -- Endpoint position (5 cm)
+ tolerance_pos_endpoint = 0.1; -- Endpoint position (10 cm)
tolerance_pos = 0.1; -- Position (10 cm)
tolerance_vel = 0; -- Velocity (disabled)
tolerance_att = 0.1745; -- Attitude (10 degrees)
@@ -284,7 +284,7 @@ world_flight_modes = {
speed = 3;
-- Tolerances
- tolerance_pos_endpoint = 0.05; -- Endpoint position (5 cm)
+ tolerance_pos_endpoint = 0.1; -- Endpoint position (10 cm)
tolerance_pos = 0.1; -- Position (10 cm)
tolerance_vel = 0; -- Velocity (disabled)
tolerance_att = 0.1745; -- Attitude (10 degrees)
diff --git a/astrobee/package.xml b/astrobee/package.xml
index d4f7e90b5c..5549996fc5 100644
--- a/astrobee/package.xml
+++ b/astrobee/package.xml
@@ -14,9 +14,7 @@
Astrobee Flight Software
catkin
- ff_msgs
roscpp
- ff_msgs
roscpp
diff --git a/scripts/deploy/env_wrapper.sh b/astrobee/scripts/env_wrapper.sh
similarity index 100%
rename from scripts/deploy/env_wrapper.sh
rename to astrobee/scripts/env_wrapper.sh
diff --git a/behaviors/CMakeLists.txt b/behaviors/CMakeLists.txt
deleted file mode 100644
index 41b13472bc..0000000000
--- a/behaviors/CMakeLists.txt
+++ /dev/null
@@ -1,24 +0,0 @@
-# Copyright (c) 2017, United States Government, as represented by the
-# Administrator of the National Aeronautics and Space Administration.
-#
-# All rights reserved.
-#
-# The Astrobee platform is licensed under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with the
-# License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-# License for the specific language governing permissions and limitations
-# under the License.
-
-add_subdirectory(arm)
-add_subdirectory(dock)
-add_subdirectory(states)
-add_subdirectory(light_flow)
-add_subdirectory(perch)
-
-
diff --git a/behaviors/arm/CMakeLists.txt b/behaviors/arm/CMakeLists.txt
index ea201b11fc..179a5bb305 100644
--- a/behaviors/arm/CMakeLists.txt
+++ b/behaviors/arm/CMakeLists.txt
@@ -15,8 +15,22 @@
# License for the specific language governing permissions and limitations
# under the License.
+cmake_minimum_required(VERSION 3.0)
project(arm)
+## Compile as C++14, supported in ROS Kinetic and newer
+add_compile_options(-std=c++14)
+
+## Find catkin macros and libraries
+find_package(catkin2 REQUIRED COMPONENTS
+ roscpp
+ std_msgs
+ nodelet
+ ff_msgs
+ ff_hw_msgs
+ ff_util
+)
+
catkin_package(
LIBRARIES
arm
@@ -27,33 +41,59 @@ catkin_package(
actionlib
sensor_msgs
ff_msgs
+ ff_hw_msgs
ff_util
)
-create_library(
- TARGET
- arm
- LIBS
- ${catkin_LIBRARIES}
- ff_nodelet
- config_server
- INC
- ${catkin_INCLUDE_DIRS}
- DEPS
- ff_msgs
+###########
+## Build ##
+###########
+
+# Specify additional locations of header files
+include_directories(
+ include
+ ${catkin_INCLUDE_DIRS}
)
-create_tool_targets(
- DIR
- tools
- LIBS
- ${catkin_LIBRARIES}
- ff_common
- ff_nodelet
- INC
- ${catkin_INCLUDE_DIRS}
- DEPS
- ff_msgs
+# Declare C++ libraries
+add_library(arm
+ src/arm_nodelet.cc
)
+add_dependencies(arm ${catkin_EXPORTED_TARGETS})
+target_link_libraries(arm ${catkin_LIBRARIES})
+
+## Declare a C++ executable: arm_tool
+add_executable(arm_tool tools/arm_tool.cc)
+add_dependencies(arm_tool ${catkin_EXPORTED_TARGETS})
+target_link_libraries(arm_tool
+ arm gflags ${catkin_LIBRARIES})
+
+#############
+## Install ##
+#############
+
+# Mark libraries for installation
+install(TARGETS ${PROJECT_NAME}
+ ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
+ LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
+ RUNTIME DESTINATION ${CATKIN_GLOBAL_BIN_DESTINATION}
+)
+
+# Mark nodelet_plugin for installation
+install(FILES nodelet_plugins.xml
+ DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}
+)
+
+# Install C++ executables
+install(TARGETS arm_tool DESTINATION bin)
+install(CODE "execute_process(
+ COMMAND ln -s ../../bin/arm_tool share/${PROJECT_NAME}
+ WORKING_DIRECTORY ${CMAKE_INSTALL_PREFIX}
+ OUTPUT_QUIET
+ ERROR_QUIET
+ )")
-install_launch_files()
+# Mark launch files for installation
+install(DIRECTORY launch/
+ DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}/launch
+ PATTERN ".svn" EXCLUDE)
diff --git a/behaviors/arm/package.xml b/behaviors/arm/package.xml
index cdb1f13dc2..bbd2b0aade 100644
--- a/behaviors/arm/package.xml
+++ b/behaviors/arm/package.xml
@@ -20,6 +20,7 @@
pluginlib
sensor_msgs
ff_msgs
+ ff_hw_msgs
ff_util
roscpp
nodelet
@@ -27,6 +28,7 @@
actionlib
sensor_msgs
ff_msgs
+ ff_hw_msgs
ff_util
diff --git a/behaviors/dock/CMakeLists.txt b/behaviors/dock/CMakeLists.txt
index 41afe25811..dbb2aa8c96 100644
--- a/behaviors/dock/CMakeLists.txt
+++ b/behaviors/dock/CMakeLists.txt
@@ -15,8 +15,24 @@
# License for the specific language governing permissions and limitations
# under the License.
+cmake_minimum_required(VERSION 3.0)
project(dock)
+## Compile as C++14, supported in ROS Kinetic and newer
+add_compile_options(-std=c++14)
+
+## Find catkin macros and libraries
+find_package(catkin2 REQUIRED COMPONENTS
+ roscpp
+ geometry_msgs
+ tf2
+ tf2_ros
+ tf2_geometry_msgs
+ ff_hw_msgs
+ ff_msgs
+ ff_util
+)
+
catkin_package(
LIBRARIES
dock
@@ -31,34 +47,55 @@ catkin_package(
ff_util
)
-create_library(
- TARGET
- dock
- LIBS
- ${catkin_LIBRARIES}
- ff_nodelet
- config_reader
- msg_conversions
- config_server
- config_client
- INC
- ${catkin_INCLUDE_DIRS}
- DEPS
- ff_msgs
- ff_hw_msgs
+###########
+## Build ##
+###########
+
+# Specify additional locations of header files
+include_directories(
+ include
+ ${catkin_INCLUDE_DIRS}
)
-create_tool_targets(
- DIR
- tools
- LIBS
- ${catkin_LIBRARIES}
- ff_common
- ff_nodelet
- INC
- ${catkin_INCLUDE_DIRS}
- DEPS
- ff_msgs
+# Declare C++ libraries
+add_library(dock
+ src/dock_nodelet.cc
)
+add_dependencies(dock ${catkin_EXPORTED_TARGETS})
+target_link_libraries(dock ${catkin_LIBRARIES})
+
+## Declare a C++ executable: dock_tool
+add_executable(dock_tool tools/dock_tool.cc)
+add_dependencies(dock_tool ${catkin_EXPORTED_TARGETS})
+target_link_libraries(dock_tool
+ dock gflags ${catkin_LIBRARIES})
+
+#############
+## Install ##
+#############
+
+# Mark libraries for installation
+install(TARGETS ${PROJECT_NAME}
+ ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
+ LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
+ RUNTIME DESTINATION ${CATKIN_GLOBAL_BIN_DESTINATION}
+)
+
+# Mark nodelet_plugin for installation
+install(FILES nodelet_plugins.xml
+ DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}
+)
+
+# Install C++ executables
+install(TARGETS dock_tool DESTINATION bin)
+install(CODE "execute_process(
+ COMMAND ln -s ../../bin/dock_tool share/${PROJECT_NAME}
+ WORKING_DIRECTORY ${CMAKE_INSTALL_PREFIX}
+ OUTPUT_QUIET
+ ERROR_QUIET
+ )")
-install_launch_files()
+# Mark launch files for installation
+install(DIRECTORY launch/
+ DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}/launch
+ PATTERN ".svn" EXCLUDE)
diff --git a/behaviors/light_flow/CMakeLists.txt b/behaviors/light_flow/CMakeLists.txt
index 7f4a6b69f5..d5f12052ac 100644
--- a/behaviors/light_flow/CMakeLists.txt
+++ b/behaviors/light_flow/CMakeLists.txt
@@ -15,8 +15,21 @@
# License for the specific language governing permissions and limitations
# under the License.
+cmake_minimum_required(VERSION 3.0)
project(light_flow)
+## Compile as C++14, supported in ROS Kinetic and newer
+add_compile_options(-std=c++14)
+
+## Find catkin macros and libraries
+find_package(catkin2 REQUIRED COMPONENTS
+ roscpp
+ ff_hw_msgs
+ ff_msgs
+ nodelet
+ ff_util
+)
+
catkin_package(
LIBRARIES
light_flow
@@ -29,54 +42,67 @@ catkin_package(
pluginlib
)
-create_library(
- DIR src/light_flow
- TARGET light_flow
- DEPS
- ff_msgs
- ff_hw_msgs
- LIBS
- ${catkin_LIBRARIES}
- ff_nodelet
- ${JSONCPP_LIBRARIES}
- INC
- ${catkin_INCLUDE_DIRS}
- ${JSONCPP_INCLUDE_DIRS}
+###########
+## Build ##
+###########
+
+# Specify additional locations of header files
+include_directories(
+ include
+ ${catkin_INCLUDE_DIRS}
)
-create_tool_targets(
- DIR
- tools
- LIBS
- ${catkin_LIBRARIES}
- ff_nodelet
- ${JSONCPP_LIBRARIES}
- light_flow
- INC
- ${catkin_INCLUDE_DIRS}
- ${JSONCPP_INCLUDE_DIRS}
- DEPS
- ff_msgs
- ff_hw_msgs
- light_flow
+# Declare C++ libraries
+add_library(light_flow
+ src/light_flow/light_flow.cc
)
+add_dependencies(light_flow ${catkin_EXPORTED_TARGETS})
+target_link_libraries(light_flow ${catkin_LIBRARIES})
-create_library(
- DIR src/light_flow_nodelet
- TARGET light_flow_nodelet
- LIBS
- ${catkin_LIBRARIES}
- ${JSONCPP_LIBRARIES}
- config_reader
- ff_nodelet
- light_flow
- INC
- ${catkin_INCLUDE_DIRS}
- ${JSONCPP_INCLUDE_DIRS}
- DEPS
- ff_msgs
- ff_hw_msgs
- light_flow
+# Declare C++ libraries
+add_library(light_flow_nodelet
+ src/light_flow_nodelet/light_flow_nodelet.cc
)
+add_dependencies(light_flow_nodelet ${catkin_EXPORTED_TARGETS})
+target_link_libraries(light_flow_nodelet light_flow jsoncpp ${catkin_LIBRARIES})
+
+## Declare a C++ executable: inspection_tool
+add_executable(light_flow_tool tools/light_flow_tool.cc)
+add_dependencies(light_flow_tool ${catkin_EXPORTED_TARGETS})
+target_link_libraries(light_flow_tool
+ light_flow gflags jsoncpp ${catkin_LIBRARIES})
+
+#############
+## Install ##
+#############
+
+# Mark libraries for installation
+install(TARGETS ${PROJECT_NAME}
+ ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
+ LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
+ RUNTIME DESTINATION ${CATKIN_GLOBAL_BIN_DESTINATION}
+)
+install(TARGETS ${PROJECT_NAME}_nodelet
+ ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
+ LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
+ RUNTIME DESTINATION ${CATKIN_GLOBAL_BIN_DESTINATION}
+)
+
+# Mark nodelet_plugin for installation
+install(FILES nodelet_plugins.xml
+ DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}
+)
+
+# Install C++ executables
+install(TARGETS light_flow_tool DESTINATION bin)
+install(CODE "execute_process(
+ COMMAND ln -s ../../bin/light_flow_tool share/${PROJECT_NAME}
+ WORKING_DIRECTORY ${CMAKE_INSTALL_PREFIX}
+ OUTPUT_QUIET
+ ERROR_QUIET
+ )")
-install_launch_files()
+# Mark launch files for installation
+install(DIRECTORY launch/
+ DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}/launch
+ PATTERN ".svn" EXCLUDE)
diff --git a/behaviors/perch/CMakeLists.txt b/behaviors/perch/CMakeLists.txt
index 5361a8810a..cb98d02e9a 100644
--- a/behaviors/perch/CMakeLists.txt
+++ b/behaviors/perch/CMakeLists.txt
@@ -15,8 +15,25 @@
# License for the specific language governing permissions and limitations
# under the License.
+cmake_minimum_required(VERSION 3.0)
project(perch)
+## Compile as C++14, supported in ROS Kinetic and newer
+add_compile_options(-std=c++14)
+
+## Find catkin macros and libraries
+find_package(catkin2 REQUIRED COMPONENTS
+ roscpp
+ geometry_msgs
+ tf2
+ tf2_ros
+ tf2_geometry_msgs
+ ff_hw_msgs
+ ff_msgs
+ ff_util
+ localization_manager
+)
+
catkin_package(
LIBRARIES
perch
@@ -32,34 +49,55 @@ catkin_package(
localization_manager
)
-create_library(
- TARGET
- perch
- LIBS
- ${catkin_LIBRARIES}
- ff_nodelet
- config_reader
- msg_conversions
- config_server
- config_client
- INC
- ${catkin_INCLUDE_DIRS}
- DEPS
- ff_msgs
- ff_hw_msgs
+###########
+## Build ##
+###########
+
+# Specify additional locations of header files
+include_directories(
+ include
+ ${catkin_INCLUDE_DIRS}
)
-create_tool_targets(
- DIR
- tools
- LIBS
- ${catkin_LIBRARIES}
- ff_common
- ff_nodelet
- INC
- ${catkin_INCLUDE_DIRS}
- DEPS
- ff_msgs
+# Declare C++ libraries
+add_library(perch
+ src/perch_nodelet.cc
)
+add_dependencies(perch ${catkin_EXPORTED_TARGETS})
+target_link_libraries(perch ${catkin_LIBRARIES})
+
+## Declare a C++ executable: inspection_tool
+add_executable(perch_tool tools/perch_tool.cc)
+add_dependencies(perch_tool ${catkin_EXPORTED_TARGETS})
+target_link_libraries(perch_tool
+ perch gflags ${catkin_LIBRARIES})
+
+#############
+## Install ##
+#############
+
+# Mark libraries for installation
+install(TARGETS ${PROJECT_NAME}
+ ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
+ LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
+ RUNTIME DESTINATION ${CATKIN_GLOBAL_BIN_DESTINATION}
+)
+
+# Mark nodelet_plugin for installation
+install(FILES nodelet_plugins.xml
+ DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}
+)
+
+# Install C++ executables
+install(TARGETS perch_tool DESTINATION bin)
+install(CODE "execute_process(
+ COMMAND ln -s ../../bin/perch_tool share/${PROJECT_NAME}
+ WORKING_DIRECTORY ${CMAKE_INSTALL_PREFIX}
+ OUTPUT_QUIET
+ ERROR_QUIET
+ )")
-install_launch_files()
+# Mark launch files for installation
+install(DIRECTORY launch/
+ DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}/launch
+ PATTERN ".svn" EXCLUDE)
diff --git a/behaviors/perch/src/perch_nodelet.cc b/behaviors/perch/src/perch_nodelet.cc
index 104d042935..5b895b3113 100644
--- a/behaviors/perch/src/perch_nodelet.cc
+++ b/behaviors/perch/src/perch_nodelet.cc
@@ -1031,6 +1031,11 @@ class PerchNodelet : public ff_util::FreeFlyerNodelet {
int32_t err_;
std::string err_msg_;
std::string platform_name_;
+
+ public:
+ // This fixes the Eigen aligment issue
+ // http://eigen.tuxfamily.org/dox-devel/group__TopicUnalignedArrayAssert.html
+ EIGEN_MAKE_ALIGNED_OPERATOR_NEW
};
PLUGINLIB_EXPORT_CLASS(perch::PerchNodelet, nodelet::Nodelet);
diff --git a/behaviors/states/CMakeLists.txt b/behaviors/states/CMakeLists.txt
index 528bce0e0b..5ae0152483 100644
--- a/behaviors/states/CMakeLists.txt
+++ b/behaviors/states/CMakeLists.txt
@@ -15,30 +15,66 @@
# License for the specific language governing permissions and limitations
# under the License.
+cmake_minimum_required(VERSION 3.0)
project(states)
+## Compile as C++14, supported in ROS Kinetic and newer
+add_compile_options(-std=c++14)
+
+## Find catkin macros and libraries
+find_package(catkin2 REQUIRED COMPONENTS
+ roscpp
+ nodelet
+ ff_hw_msgs
+ ff_msgs
+ ff_util
+)
+
catkin_package(
LIBRARIES
states
CATKIN_DEPENDS
roscpp
+ nodelet
ff_hw_msgs
ff_msgs
ff_util
)
-create_library(
- DIR src/states_nodelet
- TARGET states_nodelet
- LIBS
- ${catkin_LIBRARIES}
- config_reader
- ff_nodelet
- INC
- ${catkin_INCLUDE_DIRS}
- DEPS
- ff_msgs
- ff_hw_msgs
+###########
+## Build ##
+###########
+
+# Specify additional locations of header files
+include_directories(
+ include
+ ${catkin_INCLUDE_DIRS}
+)
+
+# Declare C++ libraries
+add_library(states
+ src/states_nodelet/states_nodelet.cc
+)
+add_dependencies(states ${catkin_EXPORTED_TARGETS})
+target_link_libraries(states ${catkin_LIBRARIES})
+
+#############
+## Install ##
+#############
+
+# Mark libraries for installation
+install(TARGETS ${PROJECT_NAME}
+ ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
+ LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
+ RUNTIME DESTINATION ${CATKIN_GLOBAL_BIN_DESTINATION}
+)
+
+# Mark nodelet_plugin for installation
+install(FILES nodelet_plugins.xml
+ DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}
)
-install_launch_files()
\ No newline at end of file
+# Mark launch files for installation
+install(DIRECTORY launch/
+ DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}/launch
+ PATTERN ".svn" EXCLUDE)
diff --git a/behaviors/states/nodelet_plugins.xml b/behaviors/states/nodelet_plugins.xml
index e323994948..b1a0737d23 100644
--- a/behaviors/states/nodelet_plugins.xml
+++ b/behaviors/states/nodelet_plugins.xml
@@ -1,4 +1,4 @@
-
+
Nodelet for the automatically switching between Astrobee signal states
diff --git a/cmake/CATKIN_LICENSE b/cmake/CATKIN_LICENSE
deleted file mode 100644
index 3f4820a5c2..0000000000
--- a/cmake/CATKIN_LICENSE
+++ /dev/null
@@ -1,28 +0,0 @@
-CATKIN:
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions
-are met:
-
- * Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
- * Redistributions in binary form must reproduce the above
- copyright notice, this list of conditions and the following
- disclaimer in the documentation and/or other materials provided
- with the distribution.
- * Neither the name of copyright holder nor the names of its
- contributors may be used to endorse or promote products derived
- from this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
-FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
-ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-POSSIBILITY OF SUCH DAMAGE.
diff --git a/cmake/CreateLibrary.cmake b/cmake/CreateLibrary.cmake
deleted file mode 100644
index a7cf5983dd..0000000000
--- a/cmake/CreateLibrary.cmake
+++ /dev/null
@@ -1,83 +0,0 @@
-# Copyright (c) 2017, United States Government, as represented by the
-# Administrator of the National Aeronautics and Space Administration.
-#
-# All rights reserved.
-#
-# The Astrobee platform is licensed under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with the
-# License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-# License for the specific language governing permissions and limitations
-# under the License.
-
-function(create_library)
- cmake_parse_arguments(
- library # Prefix of output variables
- "" # List of Boolean Variables
- "TARGET;DIR" # List of mono valued arguments
- "LIBS;INC;DEPS;ADD_SRCS;EXCLUDE;DEFINES;OPTIONS" # List of Multi Value Arguments
- ${ARGN}
- )
-
- # If no directory was given, assume all files in the src dir go in our library
- if(NOT library_DIR)
- SET(library_DIR src)
- endif(NOT library_DIR)
-
- # Search for all the executables in tool dir
- file(GLOB SRC_FILES_C "${library_DIR}/*.c")
- file(GLOB SRC_FILES_CC "${library_DIR}/*.cc")
- set(SRC_FILES ${SRC_FILES_C} ${SRC_FILES_CC})
-
- # Sift through SRC_FILES and remove EXCLUDE
- foreach(SRC ${SRC_FILES})
- foreach (TEST_SRC ${library_EXCLUDE})
- string(FIND ${SRC} ${TEST_SRC} POSITION)
- if (${POSITION} GREATER -1)
- list(REMOVE_ITEM SRC_FILES ${SRC})
- endif()
- endforeach()
- endforeach()
-
- # Some of our dependencies might be header only, their headers paths are not
- # being added automatically like the targets listed in LIB. Here we'll do it
- # manually.
- if (library_DEPS)
- foreach(DEP ${library_DEPS})
- get_target_property(INC ${DEP} INCLUDE_DIRECTORIES)
- if (INC)
- list(APPEND library_INC ${INC})
- endif (INC)
- endforeach()
- list(REMOVE_DUPLICATES library_INC)
- endif (library_DEPS)
-
- add_library(${library_TARGET}
- ${SRC_FILES} ${library_ADD_SRCS})
- target_include_directories(${library_TARGET}
- PUBLIC ${library_INC} ${CMAKE_CURRENT_SOURCE_DIR}/include)
- target_link_libraries(${library_TARGET}
- ${library_LIBS} ${CMAKE_LIBS_COVERAGE})
- if (library_DEFINES)
- target_compile_definitions(${library_TARGET}
- PUBLIC ${library_DEFINES})
- endif (library_DEFINES)
- if (library_OPTIONS)
- target_compile_options(${library_TARGET}
- PUBLIC ${library_OPTIONS})
- endif (library_OPTIONS)
- if (NOT "${library_DEPS}" STREQUAL "")
- add_dependencies(${library_TARGET}
- ${library_DEPS})
- endif()
-
- install(TARGETS ${library_TARGET} DESTINATION lib)
- install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/include/
- DESTINATION include
- FILES_MATCHING PATTERN "*.h" PATTERN "*.hpp")
-endfunction()
diff --git a/cmake/CreateMsgTargets.cmake b/cmake/CreateMsgTargets.cmake
deleted file mode 100644
index 4f910d88dc..0000000000
--- a/cmake/CreateMsgTargets.cmake
+++ /dev/null
@@ -1,83 +0,0 @@
-# Copyright (c) 2017, United States Government, as represented by the
-# Administrator of the National Aeronautics and Space Administration.
-#
-# All rights reserved.
-#
-# The Astrobee platform is licensed under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with the
-# License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-# License for the specific language governing permissions and limitations
-# under the License.
-
-function(create_msg_targets)
- cmake_parse_arguments(
- msg # Prefix of output variables
- "" # List of boolean variables
- "DIR;SDIR;ADIR" # List of mono valued arguments
- "DEPS" # List of multi value arguments
- ${ARGN})
-
- if((NOT msg_DIR) AND (NOT msg_SDIR))
- message(WARNING "no msgs or srvs given to create_msg_targets")
- return()
- endif((NOT msg_DIR) AND (NOT msg_SDIR))
-
- # Determine our module name
- get_filename_component(MODULE_NAME ${CMAKE_CURRENT_SOURCE_DIR} NAME)
-
- # Search for all the messages to install
- if(msg_DIR)
- file(GLOB MSG_FILES ${msg_DIR}/*.msg)
-
- # The msgs to just be their name
- foreach(SRC ${MSG_FILES})
- get_filename_component(NAME ${SRC} NAME)
- list(APPEND MSG_FILE_NAMES ${NAME})
- endforeach()
-
- add_message_files(FILES ${MSG_FILE_NAMES})
- endif(msg_DIR)
-
- # Search for all the services to install
- if(msg_SDIR)
- file(GLOB SRV_FILES ${msg_SDIR}/*.srv)
-
- foreach(SRC ${SRV_FILES})
- get_filename_component(NAME ${SRC} NAME)
- list(APPEND SRV_FILE_NAMES ${NAME})
- endforeach()
-
- add_service_files(FILES ${SRV_FILE_NAMES})
- endif(msg_SDIR)
-
- # Search for all the actions to install
- if(msg_ADIR)
- file(GLOB ACTION_FILES ${msg_ADIR}/*.action)
-
- foreach(SRC ${ACTION_FILES})
- get_filename_component(NAME ${SRC} NAME)
- list(APPEND ACTION_FILE_NAMES ${NAME})
- endforeach()
-
- add_action_files(FILES ${ACTION_FILE_NAMES})
- endif(msg_ADIR)
-
- # Generate them
- generate_messages(DEPENDENCIES ${msg_DEPS})
-
- # Create a target that people can DEP to and find the headers
- add_custom_target(${MODULE_NAME}
- DEPENDS ${MODULE_NAME}_gencpp)
- get_target_property(MSG_INC ${MODULE_NAME}_gencpp INCLUDE_DIRECTORIES)
- set_target_properties(${MODULE_NAME}
- PROPERTIES INCLUDE_DIRECTORIES ${MSG_INC})
-
- # Make sure we install the package.xml so that it can be found later in the install directory
- install(FILES package.xml DESTINATION share/${MODULE_NAME})
-endfunction(create_msg_targets)
diff --git a/cmake/CreateToolTargets.cmake b/cmake/CreateToolTargets.cmake
deleted file mode 100644
index 6f0eb3b8b7..0000000000
--- a/cmake/CreateToolTargets.cmake
+++ /dev/null
@@ -1,72 +0,0 @@
-# Copyright (c) 2017, United States Government, as represented by the
-# Administrator of the National Aeronautics and Space Administration.
-#
-# All rights reserved.
-#
-# The Astrobee platform is licensed under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with the
-# License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-# License for the specific language governing permissions and limitations
-# under the License.
-
-function(create_tool_targets)
- cmake_parse_arguments(
- tool # Prefix of output variables
- "" # List of boolean variables
- "DIR" # List of mono valued arguments
- "LIBS;INC;DEPS;EXCLUDE" # List of multi-value arguments
- ${ARGN}
- )
-
- # Search for all the executables in tool dir
- file(GLOB TOOL_SRC_FILES_C "${tool_DIR}/*.c")
- file(GLOB TOOL_SRC_FILES_CC "${tool_DIR}/*.cc")
- set(TOOL_SRC_FILES ${TOOL_SRC_FILES_C} ${TOOL_SRC_FILES_CC})
-
- # Sift through SRC_FILES and remove EXCLUDE
- foreach(SRC ${TOOL_SRC_FILES})
- foreach(TEST_SRC ${tool_EXCLUDE})
- string(FIND ${SRC} ${TEST_SRC} POSITION)
- if (${POSITION} GREATER -1)
- list(REMOVE_ITEM TOOL_SRC_FILES ${SRC})
- endif()
- endforeach()
- endforeach()
-
- # Determine our module name
- get_filename_component(MODULE_NAME ${CMAKE_CURRENT_SOURCE_DIR} NAME)
-
- # Some of our dependencies might be header only, their headers paths are not
- # being added automatically like the targets listed in LIB. Here we'll do it
- # manually.
- if (tool_DEPS)
- foreach(DEP ${tool_DEPS})
- get_target_property(INC ${DEP} INCLUDE_DIRECTORIES)
- if (INC)
- list(APPEND tool_INC ${INC})
- endif (INC)
- endforeach()
- list(REMOVE_DUPLICATES tool_INC)
- endif (tool_DEPS)
-
- # Link the executables!
- foreach(filename ${TOOL_SRC_FILES})
- string(REGEX REPLACE ".(cc|c)$" "" execname ${filename})
- string(REGEX REPLACE "^[^ ]*/" "" execname ${execname})
- add_executable(${execname} ${filename})
- target_link_libraries(${execname}
- LINK_PUBLIC ${tool_LIBS})
- target_include_directories(${execname} PUBLIC ${tool_INC})
- if (tool_DEPS)
- add_dependencies(${execname} ${tool_DEPS})
- endif (tool_DEPS)
- install(TARGETS ${execname} DESTINATION share/${PROJECT_NAME})
- install(TARGETS ${execname} DESTINATION bin)
- endforeach()
-endfunction()
diff --git a/cmake/soracore/FindMiro.cmake b/cmake/FindMiro.cmake
similarity index 100%
rename from cmake/soracore/FindMiro.cmake
rename to cmake/FindMiro.cmake
diff --git a/cmake/FindOpenCV331.cmake b/cmake/FindOpenCV331.cmake
new file mode 100644
index 0000000000..02b4a6fcbd
--- /dev/null
+++ b/cmake/FindOpenCV331.cmake
@@ -0,0 +1,41 @@
+# Copyright (c) 2017, United States Government, as represented by the
+# Administrator of the National Aeronautics and Space Administration.
+#
+# All rights reserved.
+#
+# The Astrobee platform is licensed under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with the
+# License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+# License for the specific language governing permissions and limitations
+# under the License.
+
+# Find OpenCV and fix a 3.3.1 bug
+find_package(OpenCV 3.3.1 REQUIRED)
+if (USE_CTC)
+ if (${OpenCV_VERSION} MATCHES "3.3.1")
+ foreach(__cvcomponent ${OpenCV_LIB_COMPONENTS})
+ set (__original_cvcomponent ${__cvcomponent})
+ if(NOT __cvcomponent MATCHES "^opencv_")
+ set(__cvcomponent opencv_${__cvcomponent})
+ endif()
+ if (TARGET ${__cvcomponent})
+ set_target_properties(${__cvcomponent} PROPERTIES
+ MAP_IMPORTED_CONFIG_DEBUG ""
+ MAP_IMPORTED_CONFIG_RELEASE ""
+ MAP_IMPORTED_CONFIG_RELWITHDEBINFO ""
+ MAP_IMPORTED_CONFIG_MINSIZEREL ""
+ )
+ endif()
+ endforeach(__cvcomponent)
+ endif()
+ foreach(__cvcomponent ${OpenCV_LIB_COMPONENTS})
+ set(OpenCV_LIBS ${OpenCV_LIBS} "${OpenCV_INSTALL_PATH}/lib/arm-linux-gnueabihf/lib${__cvcomponent}3.so")
+ endforeach(__cvcomponent)
+endif (USE_CTC)
+set(OpenCV_LIBRARIES ${OpenCV_LIBS})
\ No newline at end of file
diff --git a/cmake/soracore/FindRtiDds.cmake b/cmake/FindRtiDds.cmake
similarity index 100%
rename from cmake/soracore/FindRtiDds.cmake
rename to cmake/FindRtiDds.cmake
diff --git a/cmake/soracore/FindSoracore.cmake b/cmake/FindSoracore.cmake
similarity index 100%
rename from cmake/soracore/FindSoracore.cmake
rename to cmake/FindSoracore.cmake
diff --git a/cmake/soracore/GenerateMiroMakeParams.cmake b/cmake/GenerateMiroMakeParams.cmake
similarity index 100%
rename from cmake/soracore/GenerateMiroMakeParams.cmake
rename to cmake/GenerateMiroMakeParams.cmake
diff --git a/cmake/soracore/GenerateRtiDdsIdl.cmake b/cmake/GenerateRtiDdsIdl.cmake
similarity index 100%
rename from cmake/soracore/GenerateRtiDdsIdl.cmake
rename to cmake/GenerateRtiDdsIdl.cmake
diff --git a/cmake/soracore/GetLibraryList.cmake b/cmake/GetLibraryList.cmake
similarity index 100%
rename from cmake/soracore/GetLibraryList.cmake
rename to cmake/GetLibraryList.cmake
diff --git a/cmake/soracore/GetPackageLibSearchPath.cmake b/cmake/GetPackageLibSearchPath.cmake
similarity index 100%
rename from cmake/soracore/GetPackageLibSearchPath.cmake
rename to cmake/GetPackageLibSearchPath.cmake
diff --git a/cmake/InstallLaunchFiles.cmake b/cmake/InstallLaunchFiles.cmake
deleted file mode 100644
index a01b35ed95..0000000000
--- a/cmake/InstallLaunchFiles.cmake
+++ /dev/null
@@ -1,22 +0,0 @@
-# Copyright (c) 2017, United States Government, as represented by the
-# Administrator of the National Aeronautics and Space Administration.
-#
-# All rights reserved.
-#
-# The Astrobee platform is licensed under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with the
-# License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-# License for the specific language governing permissions and limitations
-# under the License.
-
-function(install_launch_files)
- file (GLOB LAUNCH_FILES launch/*.launch launch/*.yaml launch/*.xml)
- get_filename_component(MODULE_NAME ${CMAKE_CURRENT_SOURCE_DIR} NAME)
- install(DIRECTORY launch/ DESTINATION share/${PROJECT_NAME}/launch)
-endfunction()
diff --git a/cmake/catkin/all.cmake b/cmake/catkin/all.cmake
deleted file mode 100644
index ac31ea1d2e..0000000000
--- a/cmake/catkin/all.cmake
+++ /dev/null
@@ -1,206 +0,0 @@
-# prevent multiple inclusion
-if(DEFINED _CATKIN_ALL_INCLUDED_)
- message(FATAL_ERROR "catkin/cmake/all.cmake included multiple times")
-endif()
-set(_CATKIN_ALL_INCLUDED_ TRUE)
-
-if(NOT DEFINED catkin_EXTRAS_DIR)
- message(FATAL_ERROR "catkin_EXTRAS_DIR is not set")
-endif()
-
-# define devel space
-if(CATKIN_DEVEL_PREFIX)
- set(CATKIN_DEVEL_PREFIX ${CATKIN_DEVEL_PREFIX} CACHE PATH "catkin devel space")
-else()
- set(CATKIN_DEVEL_PREFIX "${CMAKE_BINARY_DIR}/devel")
-endif()
-#message(STATUS "Using CATKIN_DEVEL_PREFIX: ${CATKIN_DEVEL_PREFIX}")
-
-# update develspace marker file with a reference to this sourcespace
-set(_catkin_marker_file "${CATKIN_DEVEL_PREFIX}/.catkin")
-
-# check if the develspace marker file exists yet
-if(EXISTS ${_catkin_marker_file})
- file(READ ${_catkin_marker_file} _existing_sourcespaces)
- if(_existing_sourcespaces STREQUAL "")
- # write this sourcespace to the marker file
- file(WRITE ${_catkin_marker_file} "${CMAKE_SOURCE_DIR}")
- else()
- # append to existing list of sourcespaces if it's not in the list
- list(FIND _existing_sourcespaces "${CMAKE_SOURCE_DIR}" _existing_sourcespace_index)
- if(_existing_sourcespace_index EQUAL -1)
- file(APPEND ${_catkin_marker_file} ";${CMAKE_SOURCE_DIR}")
- endif()
- endif()
-else()
- # create a new develspace marker file
- # NOTE: extra care must be taken when running multiple catkin jobs in parallel
- # so that this does not overwrite the result of a similar call in another package
- file(WRITE ${_catkin_marker_file} "${CMAKE_SOURCE_DIR}")
-endif()
-
-# use either CMAKE_PREFIX_PATH explicitly passed to CMake as a command line argument
-# or CMAKE_PREFIX_PATH from the environment
-if(NOT DEFINED CMAKE_PREFIX_PATH)
- if(NOT "$ENV{CMAKE_PREFIX_PATH}" STREQUAL "")
- string(REPLACE ":" ";" CMAKE_PREFIX_PATH $ENV{CMAKE_PREFIX_PATH})
- endif()
-endif()
-#message(STATUS "Using CMAKE_PREFIX_PATH: ${CMAKE_PREFIX_PATH}")
-# store original CMAKE_PREFIX_PATH
-set(CMAKE_PREFIX_PATH_AS_IS ${CMAKE_PREFIX_PATH})
-
-# list of unique catkin workspaces based on CMAKE_PREFIX_PATH
-set(CATKIN_WORKSPACES "")
-foreach(path ${CMAKE_PREFIX_PATH})
- if(EXISTS "${path}/.catkin")
- list(FIND CATKIN_WORKSPACES ${path} _index)
- if(_index EQUAL -1)
- list(APPEND CATKIN_WORKSPACES ${path})
- endif()
- endif()
-endforeach()
-if(CATKIN_WORKSPACES)
- #message(STATUS "This workspace overlays: ${CATKIN_WORKSPACES}")
-endif()
-
-# prepend devel space to CMAKE_PREFIX_PATH
-list(FIND CMAKE_PREFIX_PATH ${CATKIN_DEVEL_PREFIX} _index)
-if(_index EQUAL -1)
- list(INSERT CMAKE_PREFIX_PATH 0 ${CATKIN_DEVEL_PREFIX})
-endif()
-
-
-# enable all new policies (if available)
-macro(_set_cmake_policy_to_new_if_available policy)
- if(POLICY ${policy})
- cmake_policy(SET ${policy} NEW)
- endif()
-endmacro()
-_set_cmake_policy_to_new_if_available(CMP0000)
-_set_cmake_policy_to_new_if_available(CMP0001)
-_set_cmake_policy_to_new_if_available(CMP0002)
-_set_cmake_policy_to_new_if_available(CMP0003)
-_set_cmake_policy_to_new_if_available(CMP0004)
-_set_cmake_policy_to_new_if_available(CMP0005)
-_set_cmake_policy_to_new_if_available(CMP0006)
-_set_cmake_policy_to_new_if_available(CMP0007)
-_set_cmake_policy_to_new_if_available(CMP0008)
-_set_cmake_policy_to_new_if_available(CMP0009)
-_set_cmake_policy_to_new_if_available(CMP0010)
-_set_cmake_policy_to_new_if_available(CMP0011)
-_set_cmake_policy_to_new_if_available(CMP0012)
-_set_cmake_policy_to_new_if_available(CMP0013)
-_set_cmake_policy_to_new_if_available(CMP0014)
-_set_cmake_policy_to_new_if_available(CMP0015)
-_set_cmake_policy_to_new_if_available(CMP0016)
-_set_cmake_policy_to_new_if_available(CMP0017)
-
-# the following operations must be performed inside a project context
-if(NOT PROJECT_NAME)
- project(catkin_internal)
-endif()
-
-# include CMake functions
-include(CMakeParseArguments)
-
-# functions/macros: list_append_unique, safe_execute_process
-# python-integration: catkin_python_setup.cmake, interrogate_setup_dot_py.py, templates/__init__.py.in, templates/script.py.in, templates/python_distutils_install.bat.in, templates/python_distutils_install.sh.in, templates/safe_execute_install.cmake.in
-foreach(filename
- assert
- atomic_configure_file
- catkin_add_env_hooks
- catkin_destinations
- catkin_generate_environment
- catkin_install_python
- catkin_libraries
- catkin_metapackage
- catkin_package
- catkin_package_xml
- catkin_workspace
- debug_message
- em_expand
- python # defines PYTHON_EXECUTABLE, required by empy
- empy
- find_program_required
- legacy
- list_append_deduplicate
- list_append_unique
- list_insert_in_workspace_order
- safe_execute_process
- stamp
- string_starts_with
- platform/lsb
- platform/ubuntu
- platform/windows
- test/tests # defines CATKIN_ENABLE_TESTING, required by other test functions
- test/catkin_download_test_data
- test/gtest
- test/nosetests
- tools/doxygen
- tools/libraries
- tools/rt
-
-# tools/threads
- )
- include(${catkin_EXTRAS_DIR}/${filename}.cmake)
-endforeach()
-
-# output catkin version for debugging
-_catkin_package_xml(${CMAKE_BINARY_DIR}/catkin/catkin_generated/version DIRECTORY ${catkin_EXTRAS_DIR}/..)
-#message(STATUS "catkin ${catkin_VERSION}")
-# ensure that no current package name is set
-unset(_CATKIN_CURRENT_PACKAGE)
-
-# set global install destinations
-set(CATKIN_GLOBAL_BIN_DESTINATION bin)
-set(CATKIN_GLOBAL_ETC_DESTINATION etc)
-set(CATKIN_GLOBAL_INCLUDE_DESTINATION include)
-set(CATKIN_GLOBAL_LIB_DESTINATION lib)
-set(CATKIN_GLOBAL_LIBEXEC_DESTINATION lib)
-set(CATKIN_GLOBAL_PYTHON_DESTINATION ${PYTHON_INSTALL_DIR})
-set(CATKIN_GLOBAL_SHARE_DESTINATION share)
-
-# undefine CATKIN_ENV since it might be set in the cache from a previous build
-set(CATKIN_ENV "" CACHE INTERNAL "catkin environment" FORCE)
-
-# generate environment files like env.* and setup.*
-# uses em_expand without CATKIN_ENV being set yet
-catkin_generate_environment()
-
-# file extension of env script
-if(CMAKE_HOST_UNIX) # true for linux, apple, mingw-cross and cygwin
- set(script_ext sh)
-else()
- set(script_ext bat)
-endif()
-# take snapshot of the modifications the setup script causes
-# to reproduce the same changes with a static script in a fraction of the time
-set(SETUP_DIR ${CMAKE_BINARY_DIR}/catkin_generated)
-set(SETUP_FILENAME "setup_cached")
-configure_file(${catkin_EXTRAS_DIR}/templates/generate_cached_setup.py.in
- ${CMAKE_BINARY_DIR}/catkin_generated/generate_cached_setup.py)
-set(GENERATE_ENVIRONMENT_CACHE_COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_BINARY_DIR}/catkin_generated/generate_cached_setup.py)
-# the script is generated once here and refreshed by every call to catkin_add_env_hooks()
-safe_execute_process(COMMAND ${GENERATE_ENVIRONMENT_CACHE_COMMAND})
-# generate env_cached which just relays to the setup_cached
-configure_file(${catkin_EXTRAS_DIR}/templates/env.${script_ext}.in
- ${SETUP_DIR}/env_cached.${script_ext}
- @ONLY)
-# environment to call external processes
-set(CATKIN_ENV ${SETUP_DIR}/env_cached.${script_ext} CACHE INTERNAL "catkin environment")
-
-# add additional environment hooks
-if(CATKIN_BUILD_BINARY_PACKAGE)
- set(catkin_skip_install_env_hooks "SKIP_INSTALL")
-endif()
-if(CMAKE_HOST_UNIX)
- catkin_add_env_hooks(05.catkin_make SHELLS bash DIRECTORY ${catkin_EXTRAS_DIR}/env-hooks ${catkin_skip_install_env_hooks})
- catkin_add_env_hooks(05.catkin_make_isolated SHELLS bash DIRECTORY ${catkin_EXTRAS_DIR}/env-hooks ${catkin_skip_install_env_hooks})
- catkin_add_env_hooks(05.catkin-test-results SHELLS sh DIRECTORY ${catkin_EXTRAS_DIR}/env-hooks ${catkin_skip_install_env_hooks})
-else()
- catkin_add_env_hooks(05.catkin-test-results SHELLS bat DIRECTORY ${catkin_EXTRAS_DIR}/env-hooks ${catkin_skip_install_env_hooks})
-endif()
-
-# requires stamp and environment files
-include(${catkin_EXTRAS_DIR}/catkin_python_setup.cmake)
diff --git a/cmake/catkin/assert.cmake b/cmake/catkin/assert.cmake
deleted file mode 100644
index 1a3f2c194b..0000000000
--- a/cmake/catkin/assert.cmake
+++ /dev/null
@@ -1,22 +0,0 @@
-function(assert VAR)
- if(NOT ${VAR})
- message(FATAL_ERROR "\nAssertion failed: ${VAR} (value is '${${VAR}}')\n")
- endif()
- debug_message(3 "assert(${VAR}) passed (${VAR} = ${${VAR}})")
-endfunction()
-
-function(assert_unset VAR)
- if(${VAR})
- message(FATAL_ERROR "\nAssertion failed: '${VAR}' is set but should not be (value is '${${VAR}}')\n")
- endif()
- debug_message(3 "assert_unset(${VAR}) passed")
-endfunction()
-
-function(assert_file_exists FILENAME MESSAGE)
- if(NOT FILENAME)
- message(FATAL_ERROR "\nAssertion failed: check for file existence, but filename (${FILENAME}) unset. Message: ${MESSAGE}\n")
- endif()
- if(NOT EXISTS ${FILENAME})
- message(FATAL_ERROR "\nAssertion failed: file '${FILENAME}' does not exist. Message: ${MESSAGE}\n")
- endif()
-endfunction()
diff --git a/cmake/catkin/atomic_configure_file.cmake b/cmake/catkin/atomic_configure_file.cmake
deleted file mode 100644
index b5a20a37bb..0000000000
--- a/cmake/catkin/atomic_configure_file.cmake
+++ /dev/null
@@ -1,9 +0,0 @@
-function(atomic_configure_file input output)
- set(atomic_file "${CMAKE_BINARY_DIR}/atomic_configure_file")
- configure_file("${input}" "${atomic_file}" ${ARGN})
- get_filename_component(output_path ${output} PATH)
- if(NOT EXISTS ${output_path})
- file(MAKE_DIRECTORY ${output_path})
- endif()
- file(RENAME "${atomic_file}" "${output}")
-endfunction()
diff --git a/cmake/catkin/catkinConfig.cmake.in b/cmake/catkin/catkinConfig.cmake.in
deleted file mode 100644
index 2183ce8c6a..0000000000
--- a/cmake/catkin/catkinConfig.cmake.in
+++ /dev/null
@@ -1,117 +0,0 @@
-# generated from catkin/cmake/catkinConfig.cmake.in
-# which overlays the default template catkin/cmake/template/pkgConfig.cmake.in
-#
-# :outvar catkin_INCLUDE_DIRS: contains the include dirs of all searched components.
-# For use with CMake ``include_directories(${catkin_INCLUDE_DIRS})``.
-# :outvar catkin_LIBRARY_DIRS: contains the library dirs of all searched components.
-# For use with CMake ``link_directories(${catkin_INCLUDE_DIRS})``.
-# :outvar catkin_LIBRARIES: contains the include dirs of all searched components.
-# For use with CMake ``include_directories(${catkin_INCLUDE_DIRS})``.
-# :outvar _INCLUDE_DIRS/_LIBRARY_DIRS/_LIBRARY:
-# contains the include dirs / library dirs / libraries of the searched component .
-
-if(CATKIN_TOPLEVEL_FIND_PACKAGE OR NOT CATKIN_TOPLEVEL)
- set(catkin_EXTRAS_DIR "@PKG_CMAKE_DIR@")
-
- # prevent multiple inclusion from repeated find_package() calls in non-workspace context
- # as long as this variable is in the scope the variables from all.cmake are also, so no need to be evaluated again
- if(NOT DEFINED _CATKIN_CONFIG_ALL_INCLUDED_)
- set(_CATKIN_CONFIG_ALL_INCLUDED_ TRUE)
- include(${catkin_EXTRAS_DIR}/all.cmake NO_POLICY_SCOPE)
- endif()
-endif()
-
-# skip setting find_package() variables when discovered from toplevel.cmake
-if(CATKIN_TOPLEVEL_FIND_PACKAGE)
- return()
-endif()
-
-
-# prevent usage with wrong case
-if(CATKIN_FIND_COMPONENTS OR CATKIN_FIND_REQUIRED OR CATKIN_FIND_QUIETLY)
- message(FATAL_ERROR "find_package() only supports lower-case package name 'catkin'")
-endif()
-
-# mark as found
-if(NOT catkin_FOUND)
- set(catkin_FOUND)
- set(CATKIN_PACKAGE_PREFIX "" CACHE STRING "Prefix to apply to package generated via gendebian")
-endif()
-
-# flag project as catkin-based to distinguish if a find_package()-ed project is a catkin project
-set(catkin_FOUND_CATKIN_PROJECT TRUE)
-
-# XXXX don't overwrite catkin_* variables when being called recursively
-if(NOT _CATKIN_FIND_ OR _CATKIN_FIND_ EQUAL 0)
- set(_CATKIN_FIND_ 0)
- if(catkin_FIND_COMPONENTS)
- set(catkin_INCLUDE_DIRS "")
- set(catkin_LIBRARIES "")
- set(catkin_LIBRARY_DIRS "")
- set(catkin_EXPORTED_TARGETS "")
- endif()
-endif()
-
-# increment recursion counter
-math(EXPR _CATKIN_FIND_ "${_CATKIN_FIND_} + 1")
-
-# find all components
-if(catkin_FIND_COMPONENTS)
- foreach(component ${catkin_FIND_COMPONENTS})
- string(TOLOWER "${component}" component_lower)
- # skip catkin since it does not make sense as a component
- if(NOT ${component_lower} STREQUAL "catkin")
-
- # get search paths from CMAKE_PREFIX_PATH (which includes devel space)
- set(paths "")
- foreach(path ${CMAKE_PREFIX_PATH})
- if(IS_DIRECTORY ${path}/share/${component}/cmake)
- list(APPEND paths ${path}/share/${component}/cmake)
- endif()
- endforeach()
-
- # find package component
- if(catkin_FIND_REQUIRED)
- find_package(${component} REQUIRED NO_MODULE PATHS ${paths}
- NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH)
- elseif(catkin_FIND_QUIETLY)
- find_package(${component} QUIET NO_MODULE PATHS ${paths}
- NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH)
- else()
- find_package(${component} NO_MODULE PATHS ${paths}
- NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH)
- endif()
-
- # append component-specific variables to catkin_* variables
- list_append_unique(catkin_INCLUDE_DIRS ${${component}_INCLUDE_DIRS})
-
- # merge build configuration keywords with library names to correctly deduplicate
- catkin_pack_libraries_with_build_configuration(catkin_LIBRARIES ${catkin_LIBRARIES})
- catkin_pack_libraries_with_build_configuration(_libraries ${${component}_LIBRARIES})
- list_append_deduplicate(catkin_LIBRARIES ${_libraries})
- # undo build configuration keyword merging after deduplication
- catkin_unpack_libraries_with_build_configuration(catkin_LIBRARIES ${catkin_LIBRARIES})
-
- list_append_unique(catkin_LIBRARY_DIRS ${${component}_LIBRARY_DIRS})
- list(APPEND catkin_EXPORTED_TARGETS ${${component}_EXPORTED_TARGETS})
- endif()
- endforeach()
- list_insert_in_workspace_order(catkin_INCLUDE_DIRS ${catkin_INCLUDE_DIRS})
- list_insert_in_workspace_order(catkin_LIBRARY_DIRS ${catkin_LIBRARY_DIRS})
-endif()
-
-# add dummy target to catkin_EXPORTED_TARGETS if empty
-if(NOT catkin_EXPORTED_TARGETS)
- if(NOT TARGET _catkin_empty_exported_target)
- add_custom_target(_catkin_empty_exported_target)
- endif()
- list(APPEND catkin_EXPORTED_TARGETS _catkin_empty_exported_target)
-endif()
-
-# decrement recursion counter
-math(EXPR _CATKIN_FIND_ "${_CATKIN_FIND_} - 1")
-
-if(_CATKIN_FIND_ EQUAL 0)
- # store found components (from the fist level only) for validation in catkin_package() that they are build dependencies
- list(APPEND catkin_ALL_FOUND_COMPONENTS ${catkin_FIND_COMPONENTS})
-endif()
diff --git a/cmake/catkin/catkin_add_env_hooks.cmake b/cmake/catkin/catkin_add_env_hooks.cmake
deleted file mode 100644
index dc063bd803..0000000000
--- a/cmake/catkin/catkin_add_env_hooks.cmake
+++ /dev/null
@@ -1,139 +0,0 @@
-#
-# Register environment hooks which are executed by the setup script.
-#
-# For each shell in ``SHELLS``, the macro searches for one of the
-# following files in the directory ``DIRECTORY``:
-# ``.``,
-# ``...em``,
-# ``..em``,
-# ``...in`` or
-# ``..in``.
-#
-# Plain shells, will be copied to, templates are expanded to
-# ``etc/catkin/profile.d/``, where it will be read by global generated
-# ``setup.``.
-#
-# The templates can also distinguish between devel- and installspace
-# using the boolean variables ``DEVELSPACE`` and ``INSTALLSPACE``
-# which are either ``true`` or ``false``.
-# E.g. @[if DEVELSPACE]@ ... @[end if]@ for .em
-#
-# .. note:: Note that the extra extensions must appear in the filename
-# but must not appear in the argument.
-#
-# .. note:: These files will share a single directory with other
-# packages that choose to install env hooks. Be careful to give
-# the file a unique name. Typically ``NN.name.`` is used,
-# where NN can define when something should be run (the files are
-# read in alphanumeric order) and the name serves to disambiguate
-# in the event of collisions.
-#
-# Example::
-#
-# catkin_add_env_hooks(my_prefix SHELLS bash tcsh zsh DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/env-hooks)
-#
-# looks for files env-hooks/my_prefix.[bash|tcsh|zsh]((.(devel|install)space)?.[em|in])?
-#
-# :param file_prefix: the filename prefix
-# :type file_prefix: string
-# :param SHELLS: the shell extensions (e.g.: sh bat bash zsh tcsh)
-# :type SHELLS: list of strings
-# :param DIRECTORY: the directory (default: ${CMAKE_CURRENT_SOURCE_DIR})
-# :type DIRECTORY: string
-# :param SKIP_INSTALL: if specified the env hooks are only generated
-# in the devel space but not installed
-# :type SKIP_INSTALL: option
-#
-# @public
-#
-function(catkin_add_env_hooks file_prefix)
- cmake_parse_arguments(ARG "SKIP_INSTALL" "DIRECTORY" "SHELLS" ${ARGN})
-
- # create directory if necessary
- if(NOT IS_DIRECTORY ${CATKIN_DEVEL_PREFIX}/etc/catkin/profile.d)
- file(MAKE_DIRECTORY ${CATKIN_DEVEL_PREFIX}/etc/catkin/profile.d)
- endif()
-
- if(NOT ARG_DIRECTORY)
- set(ARG_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
- endif()
-
- foreach(shell ${ARG_SHELLS})
- set(ENV_HOOK ${file_prefix}.${shell})
- set(base ${ARG_DIRECTORY}/${ENV_HOOK})
-
- # generate environment hook for devel space
- set(DEVELSPACE True)
- set(INSTALLSPACE False)
- if(EXISTS ${base}.em OR EXISTS ${base}.develspace.em)
- # evaluate em template
- if(EXISTS ${base}.develspace.em)
- set(em_template ${base}.develspace.em)
- else()
- set(em_template ${base}.em)
- endif()
- em_expand(${catkin_EXTRAS_DIR}/templates/env-hook.context.py.in
- ${CMAKE_CURRENT_BINARY_DIR}/catkin_generated/${ENV_HOOK}.develspace.context.py
- ${em_template}
- ${CATKIN_DEVEL_PREFIX}/etc/catkin/profile.d/${ENV_HOOK})
- elseif(EXISTS ${base}.in OR EXISTS ${base}.develspace.in)
- # evaluate in template
- if(EXISTS ${base}.develspace.in)
- set(in_template ${base}.develspace.in)
- else()
- set(in_template ${base}.in)
- endif()
- atomic_configure_file(${in_template}
- ${CATKIN_DEVEL_PREFIX}/etc/catkin/profile.d/${ENV_HOOK}
- @ONLY)
- elseif (EXISTS ${base})
- # copy plain file
- file(COPY ${base} DESTINATION ${CATKIN_DEVEL_PREFIX}/etc/catkin/profile.d)
- else()
- message(FATAL_ERROR "catkin_add_env_hooks() could not find environment hook. Either '${base}', '${base}.em', '${base}.develspace.em' or '${base}.in' must exist.")
- endif()
-
- # generate and install environment hook for installspace
- set(DEVELSPACE False)
- set(INSTALLSPACE True)
- if(EXISTS ${base}.em OR EXISTS ${base}.installspace.em)
- # evaluate em template and install
- if(EXISTS ${base}.installspace.em)
- set(em_template ${base}.installspace.em)
- else()
- set(em_template ${base}.em)
- endif()
- em_expand(${catkin_EXTRAS_DIR}/templates/env-hook.context.py.in
- ${CMAKE_CURRENT_BINARY_DIR}/catkin_generated/${ENV_HOOK}.installspace.context.py
- ${em_template}
- ${CMAKE_CURRENT_BINARY_DIR}/catkin_generated/installspace/${ENV_HOOK})
- if(NOT ${ARG_SKIP_INSTALL})
- install(FILES ${CMAKE_CURRENT_BINARY_DIR}/catkin_generated/installspace/${ENV_HOOK}
- DESTINATION etc/catkin/profile.d)
- endif()
- elseif(EXISTS ${base}.in OR EXISTS ${base}.installspace.in)
- # evaluate in template and install
- if(EXISTS ${base}.installspace.in)
- set(in_template ${base}.installspace.in)
- else()
- set(in_template ${base}.in)
- endif()
- configure_file(${in_template}
- ${CMAKE_CURRENT_BINARY_DIR}/catkin_generated/installspace/${ENV_HOOK}
- @ONLY)
- if(NOT ${ARG_SKIP_INSTALL})
- install(FILES ${CMAKE_CURRENT_BINARY_DIR}/catkin_generated/installspace/${ENV_HOOK}
- DESTINATION etc/catkin/profile.d)
- endif()
- elseif (EXISTS ${base})
- # install plain file
- if(NOT ${ARG_SKIP_INSTALL})
- install(FILES ${base}
- DESTINATION etc/catkin/profile.d)
- endif()
- endif()
- endforeach()
-
- # refresh environment cache
- safe_execute_process(COMMAND ${GENERATE_ENVIRONMENT_CACHE_COMMAND})
-endfunction()
diff --git a/cmake/catkin/catkin_destinations.cmake b/cmake/catkin/catkin_destinations.cmake
deleted file mode 100644
index c4327e1223..0000000000
--- a/cmake/catkin/catkin_destinations.cmake
+++ /dev/null
@@ -1,59 +0,0 @@
-#
-# Set several path suffixes for install destinations.
-#
-# :outvar CATKIN_PACKAGE_BIN_DESTINATION:
-# See :cmake:data:`CATKIN_PACKAGE_BIN_DESTINATION`.
-# :outvar CATKIN_PACKAGE_ETC_DESTINATION:
-# See :cmake:data:`CATKIN_PACKAGE_ETC_DESTINATION`.
-# :outvar CATKIN_PACKAGE_INCLUDE_DESTINATION:
-# See :cmake:data:`CATKIN_PACKAGE_INCLUDE_DESTINATION`.
-# :outvar CATKIN_PACKAGE_LIB_DESTINATION:
-# See :cmake:data:`CATKIN_PACKAGE_LIB_DESTINATION`.
-# :outvar CATKIN_PACKAGE_PYTHON_DESTINATION:
-# See :cmake:data:`CATKIN_PACKAGE_PYTHON_DESTINATION`.
-# :outvar CATKIN_PACKAGE_SHARE_DESTINATION:
-# See :cmake:data:`CATKIN_PACKAGE_SHARE_DESTINATION`.
-#
-# :outvar CATKIN_GLOBAL_BIN_DESTINATION:
-# See :cmake:data:`CATKIN_GLOBAL_BIN_DESTINATION`.
-# :outvar CATKIN_GLOBAL_ETC_DESTINATION:
-# See :cmake:data:`CATKIN_GLOBAL_ETC_DESTINATION`.
-# :outvar CATKIN_GLOBAL_INCLUDE_DESTINATION:
-# See :cmake:data:`CATKIN_GLOBAL_INCLUDE_DESTINATION`.
-# :outvar CATKIN_GLOBAL_LIB_DESTINATION:
-# See :cmake:data:`CATKIN_GLOBAL_LIB_DESTINATION`.
-# :outvar CATKIN_GLOBAL_LIBEXEC_DESTINATION:
-# See :cmake:data:`CATKIN_GLOBAL_LIBEXEC_DESTINATION`.
-# :outvar CATKIN_GLOBAL_PYTHON_DESTINATION:
-# See :cmake:data:`CATKIN_GLOBAL_PYTHON_DESTINATION`.
-# :outvar CATKIN_GLOBAL_SHARE_DESTINATION:
-# See :cmake:data:`CATKIN_GLOBAL_SHARE_DESTINATION`.
-#
-macro(catkin_destinations)
- # verify that project() has been called before
- if(NOT PROJECT_NAME)
- message(FATAL_ERROR "catkin_destinations() PROJECT_NAME is not set. You must call project() before you can call catkin_destinations().")
- endif()
-
- # execute catkin_destinations() only once, skip repeated invocations
- if(NOT DEFINED _${PROJECT_NAME}_CATKIN_DESTINATIONS)
- debug_message(10 "catkin_destinations()")
-
- # mark that catkin_destinations() was called
- set(_${PROJECT_NAME}_CATKIN_DESTINATIONS TRUE)
-
- # set project specific install destinations
- set(CATKIN_PACKAGE_BIN_DESTINATION ${CATKIN_GLOBAL_LIBEXEC_DESTINATION}/${PROJECT_NAME})
- set(CATKIN_PACKAGE_ETC_DESTINATION ${CATKIN_GLOBAL_ETC_DESTINATION}/${PROJECT_NAME})
- set(CATKIN_PACKAGE_INCLUDE_DESTINATION ${CATKIN_GLOBAL_INCLUDE_DESTINATION}/${PROJECT_NAME})
- set(CATKIN_PACKAGE_LIB_DESTINATION ${CATKIN_GLOBAL_LIB_DESTINATION})
- set(CATKIN_PACKAGE_PYTHON_DESTINATION ${CATKIN_GLOBAL_PYTHON_DESTINATION}/${PROJECT_NAME})
- set(CATKIN_PACKAGE_SHARE_DESTINATION ${CATKIN_GLOBAL_SHARE_DESTINATION}/${PROJECT_NAME})
-
- # set project specific output directory for libraries
- set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CATKIN_DEVEL_PREFIX}/${CATKIN_PACKAGE_LIB_DESTINATION})
- set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CATKIN_DEVEL_PREFIX}/${CATKIN_PACKAGE_LIB_DESTINATION})
- # set project specific output directory for binaries
- set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CATKIN_DEVEL_PREFIX}/${CATKIN_PACKAGE_BIN_DESTINATION})
- endif()
-endmacro()
diff --git a/cmake/catkin/catkin_generate_environment.cmake b/cmake/catkin/catkin_generate_environment.cmake
deleted file mode 100644
index 912078b6e6..0000000000
--- a/cmake/catkin/catkin_generate_environment.cmake
+++ /dev/null
@@ -1,146 +0,0 @@
-function(catkin_generate_environment)
- set(SETUP_FILENAME "setup")
-
- # devel space
- set(SETUP_DIR ${CATKIN_DEVEL_PREFIX})
-
- # generate empty file to prevent searching for packages in binary dir
- # except if source space and build space are identical (which is the case for dry eclipse projects)
- if(NOT "${CMAKE_BINARY_DIR}" STREQUAL "${CMAKE_CURRENT_SOURCE_DIR}")
- file(WRITE "${CMAKE_BINARY_DIR}/CATKIN_IGNORE" "")
- endif()
-
- # get multiarch name
- set(CATKIN_LIB_ENVIRONMENT_PATHS "'${CATKIN_GLOBAL_LIB_DESTINATION}'")
- set(CATKIN_PKGCONFIG_ENVIRONMENT_PATHS "os.path.join('${CATKIN_GLOBAL_LIB_DESTINATION}', 'pkgconfig')")
- if (UNIX AND NOT APPLE)
- # Two step looking for multiarch support: check for gcc -print-multiarch
- # and, if failed, try to run dpkg-architecture
- execute_process(COMMAND gcc -print-multiarch
- OUTPUT_VARIABLE CATKIN_MULTIARCH
- OUTPUT_STRIP_TRAILING_WHITESPACE
- ERROR_QUIET
- )
- if ("${CATKIN_MULTIARCH}" STREQUAL "")
- execute_process(COMMAND dpkg-architecture -qDEB_HOST_MULTIARCH
- OUTPUT_VARIABLE CATKIN_MULTIARCH
- OUTPUT_STRIP_TRAILING_WHITESPACE
- ERROR_QUIET
- )
- endif()
- if (NOT "${CATKIN_MULTIARCH}" STREQUAL "")
- set(CATKIN_LIB_ENVIRONMENT_PATHS
- "[${CATKIN_LIB_ENVIRONMENT_PATHS}, os.path.join('${CATKIN_GLOBAL_LIB_DESTINATION}', '${CATKIN_MULTIARCH}')]")
- set(CATKIN_PKGCONFIG_ENVIRONMENT_PATHS
- "[${CATKIN_PKGCONFIG_ENVIRONMENT_PATHS}, os.path.join('${CATKIN_GLOBAL_LIB_DESTINATION}', '${CATKIN_MULTIARCH}', 'pkgconfig')]")
- endif()
- endif()
-
- # generate Python setup util
- atomic_configure_file(${catkin_EXTRAS_DIR}/templates/_setup_util.py.in
- ${CATKIN_DEVEL_PREFIX}/_setup_util.py
- @ONLY)
-
- if(NOT WIN32)
- # non-windows
- # generate env
- atomic_configure_file(${catkin_EXTRAS_DIR}/templates/env.sh.in
- ${CATKIN_DEVEL_PREFIX}/env.sh
- @ONLY)
- # generate setup for various shells
- foreach(shell bash sh zsh)
- atomic_configure_file(${catkin_EXTRAS_DIR}/templates/setup.${shell}.in
- ${CATKIN_DEVEL_PREFIX}/setup.${shell}
- @ONLY)
- endforeach()
-
- else()
- # windows
- # generate env
- atomic_configure_file(${catkin_EXTRAS_DIR}/templates/env.bat.in
- ${CATKIN_DEVEL_PREFIX}/env.bat
- @ONLY)
- # generate setup
- atomic_configure_file(${catkin_EXTRAS_DIR}/templates/setup.bat.in
- ${CATKIN_DEVEL_PREFIX}/setup.bat
- @ONLY)
- endif()
-
- # generate rosinstall file referencing setup.sh
- atomic_configure_file(${catkin_EXTRAS_DIR}/templates/rosinstall.in
- ${CATKIN_DEVEL_PREFIX}/.rosinstall
- @ONLY)
-
- # installspace
- set(SETUP_DIR ${CMAKE_INSTALL_PREFIX})
-
- if(NOT CATKIN_BUILD_BINARY_PACKAGE)
- # install empty workspace marker if it doesn't already exist
- install(CODE "
- if (NOT EXISTS \"\$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}\")
- file(MAKE_DIRECTORY \"\$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}\")
- endif()
- if (NOT EXISTS \"\$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/.catkin\")
- file(WRITE \"\$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/.catkin\" \"\")
- endif()")
-
- # generate and install Python setup util
- configure_file(${catkin_EXTRAS_DIR}/templates/_setup_util.py.in
- ${CMAKE_BINARY_DIR}/catkin_generated/installspace/_setup_util.py
- @ONLY)
- catkin_install_python(PROGRAMS
- ${CMAKE_BINARY_DIR}/catkin_generated/installspace/_setup_util.py
- DESTINATION ${CMAKE_INSTALL_PREFIX})
- endif()
-
- if(NOT WIN32)
- # non-windows
- # generate and install env
- configure_file(${catkin_EXTRAS_DIR}/templates/env.sh.in
- ${CMAKE_BINARY_DIR}/catkin_generated/installspace/env.sh
- @ONLY)
- if(NOT CATKIN_BUILD_BINARY_PACKAGE)
- install(PROGRAMS
- ${CMAKE_BINARY_DIR}/catkin_generated/installspace/env.sh
- DESTINATION ${CMAKE_INSTALL_PREFIX})
- endif()
- # generate and install setup for various shells
- foreach(shell bash sh zsh)
- configure_file(${catkin_EXTRAS_DIR}/templates/setup.${shell}.in
- ${CMAKE_BINARY_DIR}/catkin_generated/installspace/setup.${shell}
- @ONLY)
- if(NOT CATKIN_BUILD_BINARY_PACKAGE)
- install(FILES
- ${CMAKE_BINARY_DIR}/catkin_generated/installspace/setup.${shell}
- DESTINATION ${CMAKE_INSTALL_PREFIX})
- endif()
- endforeach()
-
- else()
- # windows
- # generate and install env
- configure_file(${catkin_EXTRAS_DIR}/templates/env.bat.in
- ${CMAKE_BINARY_DIR}/catkin_generated/installspace/env.bat
- @ONLY)
- install(PROGRAMS
- ${CMAKE_BINARY_DIR}/catkin_generated/installspace/env.bat
- DESTINATION ${CMAKE_INSTALL_PREFIX})
- # generate and install setup
- configure_file(${catkin_EXTRAS_DIR}/templates/setup.bat.in
- ${CMAKE_BINARY_DIR}/catkin_generated/installspace/setup.bat
- @ONLY)
- install(FILES
- ${CMAKE_BINARY_DIR}/catkin_generated/installspace/setup.bat
- DESTINATION ${CMAKE_INSTALL_PREFIX})
- endif()
-
- # generate rosinstall file referencing setup.sh
- configure_file(${catkin_EXTRAS_DIR}/templates/rosinstall.in
- ${CMAKE_BINARY_DIR}/catkin_generated/installspace/.rosinstall
- @ONLY)
- if(NOT CATKIN_BUILD_BINARY_PACKAGE)
- install(FILES
- ${CMAKE_BINARY_DIR}/catkin_generated/installspace/.rosinstall
- DESTINATION ${CMAKE_INSTALL_PREFIX})
- endif()
-endfunction()
diff --git a/cmake/catkin/catkin_install_python.cmake b/cmake/catkin/catkin_install_python.cmake
deleted file mode 100644
index 45f7a3c745..0000000000
--- a/cmake/catkin/catkin_install_python.cmake
+++ /dev/null
@@ -1,55 +0,0 @@
-#
-# Install Python files and update their shebang lines
-# to use a different Python executable.
-#
-# The signature:
-#
-# catkin_install_python(PROGRAMS files... DESTINATION
-# [OPTIONAL]
-# )
-#
-# See the documentation for CMake install() function for more information.
-#
-# @public
-#
-function(catkin_install_python signature)
- string(TOUPPER "${signature}" signature)
- if(NOT "${signature}" STREQUAL "PROGRAMS")
- message(FATAL_ERROR "catkin_install_python() only supports the PROGRAMS signature (not '${signature}').")
- endif()
- cmake_parse_arguments(ARG "OPTIONAL" "DESTINATION" "" ${ARGN})
- if(NOT ARG_DESTINATION)
- message(FATAL_ERROR "catkin_install_python() called without required DESTINATION argument.")
- endif()
- foreach(file ${ARG_UNPARSED_ARGUMENTS})
- if(NOT IS_ABSOLUTE ${file})
- set(file "${CMAKE_CURRENT_SOURCE_DIR}/${file}")
- endif()
- if(EXISTS ${file})
- # read file and check shebang line
- file(READ ${file} data)
- set(regex "^#!/([^\r\n]+)/env python([\r\n])")
- string(REGEX MATCH "${regex}" shebang_line "${data}")
- string(LENGTH "${shebang_line}" length)
- string(SUBSTRING "${data}" 0 ${length} prefix)
- if("${shebang_line}" STREQUAL "${prefix}")
- # write modified file with modified shebang line
- get_filename_component(python_name ${PYTHON_EXECUTABLE} NAME)
- string(REGEX REPLACE "${regex}" "#!/\\1/env ${python_name}\\2" data "${data}")
- get_filename_component(filename ${file} NAME)
- set(file "${CMAKE_CURRENT_BINARY_DIR}/catkin_generated/installspace")
- file(MAKE_DIRECTORY ${file})
- set(file "${file}/${filename}")
- file(WRITE ${file} "${data}")
- endif()
- # install (modified) file to destination
- set(optional_flag "")
- if(ARG_OPTIONAL)
- set(optional_flag "OPTIONAL")
- endif()
- install(PROGRAMS "${file}" DESTINATION "${ARG_DESTINATION}" ${optional_flag})
- elseif(NOT ARG_OPTIONAL)
- message(FATAL_ERROR "catkin_install_python() called with non-existing file '${file}'.")
- endif()
- endforeach()
-endfunction()
diff --git a/cmake/catkin/catkin_libraries.cmake b/cmake/catkin/catkin_libraries.cmake
deleted file mode 100644
index 723d40abd1..0000000000
--- a/cmake/catkin/catkin_libraries.cmake
+++ /dev/null
@@ -1,159 +0,0 @@
-set(CATKIN_BUILD_CONFIGURATION_KEYWORD_SEPARATOR ":")
-
-#
-# Filter libraries based on optional build configuration keywords.
-#
-# :param VAR: the output variable name
-# :type VAR: string
-# :param ARGN: a list of libraries
-# :type ARGN: list of strings
-# :param BUILD_TYPE: a keyword for the build type (default:
-# ``CMAKE_BUILD_TYPE``)
-# :type BUILD_TYPE: list of strings
-#
-# @public
-#
-macro(catkin_filter_libraries_for_build_configuration VAR)
- cmake_parse_arguments(ARG "" "BUILD_TYPE" "" ${ARGN})
- if(NOT ARG_BUILD_TYPE)
- set(ARG_BUILD_TYPE ${CMAKE_BUILD_TYPE})
- endif()
- if(NOT ARG_BUILD_TYPE)
- set(ARG_BUILD_TYPE "Debug")
- endif()
- set(${VAR} "")
- list(LENGTH ARG_UNPARSED_ARGUMENTS _count)
- set(_index 0)
- while(${_index} LESS ${_count})
- list(GET ARG_UNPARSED_ARGUMENTS ${_index} lib)
-
- if("${lib}" STREQUAL "debug")
- if(NOT "${ARG_BUILD_TYPE}" STREQUAL "Debug")
- # skip keyword and debug library for non-debug builds
- math(EXPR _index "${_index} + 1")
- if(${_index} EQUAL ${_count})
- message(FATAL_ERROR "catkin_filter_libraries_for_build_configuration() the list of libraries '${ARG_UNPARSED_ARGUMENTS}' ends with '${lib}' which is a build configuration keyword and must be followed by a library")
- endif()
- endif()
- elseif("${lib}" STREQUAL "optimized")
- if("${ARG_BUILD_TYPE}" STREQUAL "Debug")
- # skip keyword and non-debug library for debug builds
- math(EXPR _index "${_index} + 1")
- if(${_index} EQUAL ${_count})
- message(FATAL_ERROR "catkin_filter_libraries_for_build_configuration() the list of libraries '${ARG_UNPARSED_ARGUMENTS}' ends with '${lib}' which is a build configuration keyword and must be followed by a library")
- endif()
- endif()
- elseif("${lib}" STREQUAL "general")
- # just consume the keyword
- if(${_index} EQUAL ${_count})
- message(FATAL_ERROR "catkin_package() the list of libraries '${ARG_UNPARSED_ARGUMENTS}' ends with '${lib}' which is a build configuration keyword and must be followed by a library")
- endif()
- else()
- list(APPEND ${VAR} "${lib}")
- endif()
- math(EXPR _index "${_index} + 1")
- endwhile()
- debug_message(10 "catkin_filter_libraries_for_build_configuration(${VAR} ${ARG_UNPARSED_ARGUMENTS} BUILD_TYPE ${ARG_BUILD_TYPE}) ${${VAR}}")
-endmacro()
-
-#
-# Pack a list of libraries with optional build configuration keywords.
-# Each keyword is joined with its library using a separator.
-# A packed library list can be deduplicated correctly.
-#
-# :param VAR: the output variable name
-# :type VAR: string
-# :param ARGN: a list of libraries
-# :type ARGN: list of strings
-#
-# @public
-#
-macro(catkin_pack_libraries_with_build_configuration VAR)
- set(${VAR} "")
- set(_argn ${ARGN})
- list(LENGTH _argn _count)
- set(_index 0)
- while(${_index} LESS ${_count})
- list(GET _argn ${_index} lib)
- if("${lib}" MATCHES "^debug|optimized|general$")
- math(EXPR _index "${_index} + 1")
- if(${_index} EQUAL ${_count})
- message(FATAL_ERROR "catkin_pack_libraries_with_build_configuration() the list of libraries '${_argn}' ends with '${lib}' which is a build configuration keyword and must be followed by a library")
- endif()
- list(GET _argn ${_index} library)
- list(APPEND ${VAR} "${lib}${CATKIN_BUILD_CONFIGURATION_KEYWORD_SEPARATOR}${library}")
- else()
- list(APPEND ${VAR} "${lib}")
- endif()
- math(EXPR _index "${_index} + 1")
- endwhile()
- #debug_message(10 "catkin_pack_libraries_with_build_configuration(${VAR} ${_argn}) ${${VAR}}")
-endmacro()
-
-#
-# Unpack a list of libraries with optional build configuration keyword prefixes.
-# Libraries prefixed with a keyword are split into the keyword and the library.
-#
-# :param VAR: the output variable name
-# :type VAR: string
-# :param ARGN: a list of libraries
-# :type ARGN: list of strings
-#
-# @public
-#
-macro(catkin_unpack_libraries_with_build_configuration VAR)
- set(${VAR} "")
- foreach(lib ${ARGN})
- string(REGEX REPLACE "^(debug|optimized|general)${CATKIN_BUILD_CONFIGURATION_KEYWORD_SEPARATOR}(.+)$" "\\1;\\2" lib "${lib}")
- list(APPEND ${VAR} "${lib}")
- endforeach()
- #set(_argn ${ARGN})
- #debug_message(10 "catkin_unpack_libraries_with_build_configuration(${VAR} ${_argn}) ${${VAR}}")
-endmacro()
-
-#
-# Replace imported library target names with the library name.
-#
-# :param VAR: the output variable name
-# :type VAR: string
-# :param ARGN: a list of libraries
-# :type ARGN: list of strings
-#
-# @public
-#
-macro(catkin_replace_imported_library_targets VAR)
- set(${VAR} "")
- foreach(lib ${ARGN})
- if((NOT "${lib}" MATCHES "^debug|optimized|general$") AND TARGET ${lib})
- # sometimes cmake dependencies define imported targets, in which
- # case the imported library information is not the target name, but
- # the information embedded in cmake properties inside the imported library
- get_target_property(${lib}_imported ${lib} IMPORTED)
- if(${${lib}_imported})
- set(imported_libraries) # empty list
- get_target_property(${lib}_imported_location ${lib} IMPORTED_LOCATION)
- if(${lib}_imported_location)
- list(APPEND imported_libraries ${${lib}_imported_location})
- else()
- get_target_property(${lib}_imported_configurations ${lib} IMPORTED_CONFIGURATIONS)
- foreach(cfg ${${lib}_imported_configurations})
- get_target_property(${lib}_imported_location_${cfg} ${lib} IMPORTED_LOCATION_${cfg})
- if(${lib}_imported_location_${cfg})
- list(APPEND imported_libraries ${${lib}_imported_location_${cfg}})
- endif()
- endforeach()
- endif()
- foreach(imp_lib ${imported_libraries})
- list(APPEND ${VAR} "${imp_lib}")
- endforeach()
- else()
- # not an imported library target
- list(APPEND ${VAR} "${lib}")
- endif()
- else()
- list(APPEND ${VAR} "${lib}")
- endif()
- endforeach()
- #set(_argn ${ARGN})
- #debug_message(10 "catkin_replace_imported_library_targets(${VAR} ${_argn}) ${${VAR}}")
-endmacro()
diff --git a/cmake/catkin/catkin_metapackage.cmake b/cmake/catkin/catkin_metapackage.cmake
deleted file mode 100644
index e111338a90..0000000000
--- a/cmake/catkin/catkin_metapackage.cmake
+++ /dev/null
@@ -1,45 +0,0 @@
-#
-# It installs the package.xml file of a metapackage.
-#
-# .. note:: It must be called once for each metapackage. Best
-# practice is to call this macro early in your root CMakeLists.txt,
-# immediately after calling ``project()`` and
-# ``find_package(catkin REQUIRED)``.
-#
-# :param DIRECTORY: the path to the package.xml file if not in the same
-# location as the CMakeLists.txt file
-# :type DIRECTORY: string
-#
-# @public
-#
-function(catkin_metapackage)
- cmake_parse_arguments(ARG "" "DIRECTORY" "" ${ARGN})
- if(ARG_UNPARSED_ARGUMENTS)
- message(FATAL_ERROR "catkin_metapackage() called with unused arguments: ${ARG_UNPARSED_ARGUMENTS}")
- endif()
-
- # verify that project() has been called before
- if(NOT PROJECT_NAME)
- message(FATAL_ERROR "catkin_metapackage() PROJECT_NAME is not set. You must call project() before calling catkin_metapackage().")
- endif()
- if(PROJECT_NAME STREQUAL "Project")
- message(FATAL_ERROR "catkin_metapackage() PROJECT_NAME is set to 'Project', which is not a valid project name. You must call project() before calling catkin_metapackage().")
- endif()
-
- debug_message(10 "catkin_metapackage() called in file ${CMAKE_CURRENT_LIST_FILE}")
-
- if(NOT ARG_DIRECTORY)
- if(${CMAKE_CURRENT_LIST_FILE} STREQUAL ${CMAKE_BINARY_DIR}/catkin_generated/metapackages/${PROJECT_NAME}/CMakeLists.txt)
- set(ARG_DIRECTORY ${CMAKE_SOURCE_DIR}/${path})
- else()
- set(ARG_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
- endif()
- endif()
-
- catkin_package_xml(DIRECTORY ${ARG_DIRECTORY})
-
- # install package.xml
- install(FILES ${ARG_DIRECTORY}/package.xml
- DESTINATION share/${PROJECT_NAME}
- )
-endfunction()
diff --git a/cmake/catkin/catkin_package.cmake b/cmake/catkin/catkin_package.cmake
deleted file mode 100644
index 5a6aee1952..0000000000
--- a/cmake/catkin/catkin_package.cmake
+++ /dev/null
@@ -1,528 +0,0 @@
-#
-# It installs the package.xml file, and it generates code for
-# ``find_package`` and ``pkg-config`` so that other packages can get
-# information about this package. For this purpose the information
-# about include directories, libraries, further dependencies and
-# CMake variables are used.
-#
-# .. note:: It must be called once for each package. It is indirectly
-# calling``catkin_destinations()`` which will provide additional
-# output variables. Please make sure to call ``catkin_package()``
-# before using those variables.
-#
-# :param INCLUDE_DIRS: ``CMAKE_CURRENT_SOURCE_DIR``-relative paths to
-# C/C++ includes
-# :type INCLUDE_DIRS: list of strings
-# :param LIBRARIES: names of library targets that will appear in the
-# ``catkin_LIBRARIES`` and ``${PROJECT_NAME}_LIBRARIES`` of other
-# projects that search for you via ``find_package``. Currently
-# this will break if the logical target names are not the same as
-# the installed names.
-# :type LIBRARIES: list of strings
-# :param CATKIN_DEPENDS: a list of catkin projects which this project
-# depends on. It is used when client code finds this project via
-# ``find_package()`` or ``pkg-config``. Each project listed will in
-# turn be ``find_package``\ -ed or is states as ``Requires`` in the
-# .pc file. Therefore their ``INCLUDE_DIRS`` and ``LIBRARIES`` will
-# be appended to ours. Only catkin projects should be used where it
-# be guarantee that they are *find_packagable* and have pkg-config
-# files.
-# :type CATKIN_DEPENDS: list of strings
-# :param DEPENDS: a list of CMake projects which this project depends
-# on. Since they might not be *find_packagable* or lack a pkg-config
-# file their ``INCLUDE_DIRS`` and ``LIBRARIES`` are passed directly.
-# This requires that it has been ``find_package``\ -ed before.
-# :type DEPENDS: list of strings
-# :param CFG_EXTRAS: a CMake file containing extra stuff that should
-# be accessible to users of this package after
-# ``find_package``\ -ing it. This file must live in the
-# subdirectory ``cmake`` or be an absolute path. Various additional
-# file extension are possible:
-# for a plain cmake file just ``.cmake``, for files expanded using
-# CMake's ``configure_file()`` use ``.cmake.in`` or for files expanded
-# by empy use ``.cmake.em``. The templates can distinguish between
-# devel- and installspace using the boolean variables ``DEVELSPACE``
-# and ``INSTALLSPACE``. For templated files it is also possible to
-# use the extensions ``.cmake.develspace.(in|em)`` or
-# ``.cmake.installspace.(em|in)`` to generate the files only for a
-# specific case.
-# If the global variable ${PROJECT_NAME}_CFG_EXTRAS is set it will be
-# prepended to the explicitly passed argument.
-# :type CFG_EXTRAS: string
-# :param EXPORTED_TARGETS: a list of target names which usually generate
-# code. Downstream packages can depend on these targets to ensure that
-# code is generated before it is being used. The generated CMake config
-# file will ensure that the targets exists.
-# If the global variable ${PROJECT_NAME}_EXPORTED_TARGETS is
-# set it will be prepended to the explicitly passed argument.
-# :type EXPORTED_TARGETS: list of strings
-# :param SKIP_CMAKE_CONFIG_GENERATION: the option to skip the generation
-# of the CMake config files for the package
-# :type SKIP_CMAKE_CONFIG_GENERATION: bool
-# :param SKIP_PKG_CONFIG_GENERATION: the option to skip the generation of
-# the pkg-config file for the package
-# :type SKIP_PKG_CONFIG_GENERATION: bool
-#
-# Example:
-# ::
-#
-# catkin_package(
-# INCLUDE_DIRS include
-# LIBRARIES projlib1 projlib2
-# CATKIN_DEPENDS roscpp
-# DEPENDS Eigen
-# CFG_EXTRAS proj-extras[.cmake|.cmake.in|.cmake(.develspace|.installspace)?.em]
-# )
-#
-# @public
-#
-macro(catkin_package)
- debug_message(10 "catkin_package() called in file ${CMAKE_CURRENT_LIST_FILE}")
-
- # verify that project() has been called before
- if(NOT PROJECT_NAME)
- message(FATAL_ERROR "catkin_package() PROJECT_NAME is not set. You must call project() before calling catkin_package().")
- endif()
- if(PROJECT_NAME STREQUAL "Project")
- message(FATAL_ERROR "catkin_package() PROJECT_NAME is set to 'Project', which is not a valid project name. You must call project() before calling catkin_package().")
- endif()
-
- # mark that catkin_package() was called in order to detect wrong order of calling with generate_messages()
- set(${PROJECT_NAME}_CATKIN_PACKAGE TRUE)
-
- # call catkin_package_xml() if it has not been called before
- if(NOT _CATKIN_CURRENT_PACKAGE)
- catkin_package_xml()
- endif()
-
- _catkin_package(${ARGN})
-endmacro()
-
-function(_catkin_package)
- cmake_parse_arguments(PROJECT "SKIP_CMAKE_CONFIG_GENERATION;SKIP_PKG_CONFIG_GENERATION" "" "INCLUDE_DIRS;LIBRARIES;CATKIN_DEPENDS;DEPENDS;CFG_EXTRAS;EXPORTED_TARGETS" ${ARGN})
- if(PROJECT_UNPARSED_ARGUMENTS)
- message(FATAL_ERROR "catkin_package() called with unused arguments: ${PROJECT_UNPARSED_ARGUMENTS}")
- endif()
-
- if(NOT ${PROJECT_NAME} STREQUAL "catkin")
- list(FIND ${PROJECT_NAME}_BUILDTOOL_DEPENDS "catkin" _index)
- if(_index EQUAL -1)
- list(FIND ${PROJECT_NAME}_BUILD_DEPENDS "catkin" _index)
- if(_index EQUAL -1)
- message(FATAL_ERROR "catkin_package() 'catkin' must be listed as a buildtool dependency in the package.xml")
- endif()
- message("WARNING: 'catkin' should be listed as a buildtool dependency in the package.xml (instead of build dependency)")
- endif()
- endif()
-
- # prepend INCLUDE_DIRS and LIBRARIES passed using a variable
- if(${PROJECT_NAME}_INCLUDE_DIRS)
- list(INSERT PROJECT_INCLUDE_DIRS 0 ${${PROJECT_NAME}_INCLUDE_DIRS})
- endif()
- if(${PROJECT_NAME}_LIBRARIES)
- list(INSERT PROJECT_LIBRARIES 0 ${${PROJECT_NAME}_LIBRARIES})
- endif()
-
- # unset previously found directory of this package, so that this package overlays the other cleanly
- if(${PROJECT_NAME}_DIR)
- set(${PROJECT_NAME}_DIR "" CACHE PATH "" FORCE)
- endif()
-
- set(_PROJECT_CATKIN_DEPENDS ${PROJECT_CATKIN_DEPENDS})
-
- set(PROJECT_DEPENDENCIES_INCLUDE_DIRS "")
- set(PROJECT_DEPENDENCIES_LIBRARIES "")
- foreach(depend ${PROJECT_DEPENDS})
- string(REPLACE " " ";" depend_list ${depend})
- # check if the second argument is the COMPONENTS keyword
- list(LENGTH depend_list count)
- set(second_item "")
- if(${count} GREATER 1)
- list(GET depend_list 1 second_item)
- endif()
- if("${second_item}" STREQUAL "COMPONENTS")
- list(GET depend_list 0 depend_name)
- if(NOT ${${depend_name}_FOUND})
- message(FATAL_ERROR "catkin_package() DEPENDS on '${depend}' which must be find_package()-ed before")
- endif()
- message(WARNING "catkin_package() DEPENDS on '${depend}' which is deprecated. find_package() it before and only DEPENDS on '${depend_name}' instead")
- list(APPEND PROJECT_DEPENDENCIES_INCLUDE_DIRS ${${depend_name}_INCLUDE_DIRS})
- list(APPEND PROJECT_DEPENDENCIES_LIBRARIES ${${depend_name}_LIBRARIES})
- else()
- # split multiple names (without COMPONENTS) into separate dependencies
- foreach(depend_name ${depend_list})
- if(${depend_name}_FOUND_CATKIN_PROJECT)
- #message(WARNING "catkin_package() DEPENDS on catkin package '${depend_name}' which is deprecated. Use CATKIN_DEPENDS for catkin packages instead.")
- list(APPEND _PROJECT_CATKIN_DEPENDS ${depend_name})
- else()
- if(NOT ${${depend_name}_FOUND})
- message(FATAL_ERROR "catkin_package() DEPENDS on '${depend_name}' which must be find_package()-ed before. If it is a catkin package it can be declared as CATKIN_DEPENDS instead without find_package()-ing it.")
- endif()
- list(APPEND PROJECT_DEPENDENCIES_INCLUDE_DIRS ${${depend_name}_INCLUDE_DIRS})
- list(APPEND PROJECT_DEPENDENCIES_LIBRARIES ${${depend_name}_LIBRARIES})
- endif()
- endforeach()
- endif()
- endforeach()
-
- # for catkin packages it can be guaranteed that they are find_package()-able and have pkg-config files
- set(PROJECT_DEPENDENCIES "")
- foreach(depend_name ${_PROJECT_CATKIN_DEPENDS})
- # verify that all catkin packages which have been find_package()-ed are listed as build dependencies
- if(${depend_name}_FOUND)
- # verify that these packages are really catkin packages
- if(NOT ${depend_name}_FOUND_CATKIN_PROJECT)
- if(DEFINED ${depend_name}_CONFIG)
- message(FATAL_ERROR "catkin_package() CATKIN_DEPENDS on '${depend_name}', which has been found in '${${depend_name}_CONFIG}', but it is not a catkin package")
- else()
- message(FATAL_ERROR "catkin_package() CATKIN_DEPENDS on '${depend_name}', but it is not a catkin package")
- endif()
- endif()
- if(catkin_ALL_FOUND_COMPONENTS)
- list(FIND catkin_ALL_FOUND_COMPONENTS ${depend_name} _index)
- else()
- set(_index -1)
- endif()
- if(NOT _index EQUAL -1)
- list(FIND ${PROJECT_NAME}_BUILD_DEPENDS ${depend_name} _index)
- if(_index EQUAL -1)
- message(FATAL_ERROR "catkin_package() the catkin package '${depend_name}' has been find_package()-ed but is not listed as a build dependency in the package.xml")
- endif()
- # verify versioned dependency constraints
- if(DEFINED ${PROJECT_NAME}_BUILD_DEPENDS_${depend_name}_VERSION_LT AND
- NOT "${${depend_name}_VERSION}" VERSION_LESS "${${PROJECT_NAME}_BUILD_DEPENDS_${depend_name}_VERSION_LT}")
- message(WARNING "catkin_package() version mismatch: the package.xml of '${PROJECT_NAME}' build_depends on '${depend_name} < ${${PROJECT_NAME}_BUILD_DEPENDS_${depend_name}_VERSION_LT}', but '${depend_name} ${${depend_name}_VERSION}' found")
- endif()
- if(DEFINED ${PROJECT_NAME}_BUILD_DEPENDS_${depend_name}_VERSION_LTE AND
- "${${depend_name}_VERSION}" VERSION_GREATER "${${PROJECT_NAME}_BUILD_DEPENDS_${depend_name}_VERSION_LTE}")
- message(WARNING "catkin_package() version mismatch: the package.xml of '${PROJECT_NAME}' build_depends on '${depend_name} <= ${${PROJECT_NAME}_BUILD_DEPENDS_${depend_name}_VERSION_LTE}', but '${depend_name} ${${depend_name}_VERSION}' found")
- endif()
- if(DEFINED ${PROJECT_NAME}_BUILD_DEPENDS_${depend_name}_VERSION_EQ AND
- NOT "${${depend_name}_VERSION}" VERSION_EQUAL "${${PROJECT_NAME}_BUILD_DEPENDS_${depend_name}_VERSION_EQ}")
- message(WARNING "catkin_package() version mismatch: the package.xml of '${PROJECT_NAME}' build_depends on '${depend_name} = ${${PROJECT_NAME}_BUILD_DEPENDS_${depend_name}_VERSION_EQ}', but '${depend_name} ${${depend_name}_VERSION}' found")
- endif()
- if(DEFINED ${PROJECT_NAME}_BUILD_DEPENDS_${depend_name}_VERSION_GTE AND
- "${${depend_name}_VERSION}" VERSION_LESS "${${PROJECT_NAME}_BUILD_DEPENDS_${depend_name}_VERSION_GTE}")
- message(WARNING "catkin_package() version mismatch: the package.xml of '${PROJECT_NAME}' build_depends on '${depend_name} >= ${${PROJECT_NAME}_BUILD_DEPENDS_${depend_name}_VERSION_GTE}', but '${depend_name} ${${depend_name}_VERSION}' found")
- endif()
- if(DEFINED ${PROJECT_NAME}_BUILD_DEPENDS_${depend_name}_VERSION_GT AND
- NOT "${${depend_name}_VERSION}" VERSION_GREATER "${${PROJECT_NAME}_BUILD_DEPENDS_${depend_name}_VERSION_GT}")
- message(WARNING "catkin_package() version mismatch: the package.xml of '${PROJECT_NAME}' build_depends on '${depend_name} > ${${PROJECT_NAME}_BUILD_DEPENDS_${depend_name}_VERSION_GT}', but '${depend_name} ${${depend_name}_VERSION}' found")
- endif()
- endif()
- endif()
- # verify that all catkin packages are listed as run dependencies
- list(FIND ${PROJECT_NAME}_RUN_DEPENDS ${depend_name} _index)
- if(_index EQUAL -1)
- message(FATAL_ERROR "catkin_package() DEPENDS on the catkin package '${depend_name}' which must therefore be listed as a run dependency in the package.xml")
- endif()
- list(APPEND PROJECT_DEPENDENCIES ${depend_name})
- endforeach()
-
- # package version provided by package.cmake/xml
- set(PROJECT_VERSION ${${PROJECT_NAME}_VERSION})
-
- # flag if package is deprecated provided by package.cmake/xml
- set(PROJECT_DEPRECATED ${${PROJECT_NAME}_DEPRECATED})
-
- # package maintainer provided by package.cmake/xml
- set(PROJECT_MAINTAINER ${${PROJECT_NAME}_MAINTAINER})
-
- # get library paths from all workspaces
- set(lib_paths "")
- foreach(workspace ${CATKIN_WORKSPACES})
- list_append_unique(lib_paths ${workspace}/lib)
- endforeach()
-
- # merge explicitly listed libraries and libraries from non-catkin but find_package()-ed packages
- set(_PKG_CONFIG_LIBRARIES "")
- if(PROJECT_LIBRARIES)
- list(APPEND _PKG_CONFIG_LIBRARIES ${PROJECT_LIBRARIES})
- endif()
- if(PROJECT_DEPENDENCIES_LIBRARIES)
- list(APPEND _PKG_CONFIG_LIBRARIES ${PROJECT_DEPENDENCIES_LIBRARIES})
- endif()
-
- # resolve imported library targets
- catkin_replace_imported_library_targets(_PKG_CONFIG_LIBRARIES ${_PKG_CONFIG_LIBRARIES})
-
- # deduplicate libraries while maintaining build configuration keywords
- catkin_pack_libraries_with_build_configuration(_PKG_CONFIG_LIBRARIES ${_PKG_CONFIG_LIBRARIES})
- set(PKG_CONFIG_LIBRARIES "")
- foreach(library ${_PKG_CONFIG_LIBRARIES})
- list_append_deduplicate(PKG_CONFIG_LIBRARIES ${library})
- endforeach()
- catkin_unpack_libraries_with_build_configuration(PKG_CONFIG_LIBRARIES ${PKG_CONFIG_LIBRARIES})
-
- # .pc files can not handle build configuration keywords therefore filter them out based on the current build type
- set(PKG_CONFIG_LIBRARIES_WITH_PREFIX "")
- catkin_filter_libraries_for_build_configuration(libraries ${PKG_CONFIG_LIBRARIES})
- foreach(library ${libraries})
- if(IS_ABSOLUTE ${library})
- get_filename_component(suffix ${library} EXT)
- if(NOT "${suffix}" STREQUAL "${CMAKE_STATIC_LIBRARY_SUFFIX}")
- set(library "-l:${library}")
- endif()
- else()
- set(library "-l${library}")
- endif()
- list_append_deduplicate(PKG_CONFIG_LIBRARIES_WITH_PREFIX ${library})
- endforeach()
-
- #
- # DEVEL SPACE
- #
-
- # used in the cmake extra files
- set(DEVELSPACE TRUE)
- set(INSTALLSPACE FALSE)
-
- set(PROJECT_SPACE_DIR ${CATKIN_DEVEL_PREFIX})
- set(PKG_INCLUDE_PREFIX ${CMAKE_CURRENT_SOURCE_DIR})
-
- # absolute path to include dirs and validate that they are existing either absolute or relative to packages source
- set(PROJECT_CMAKE_CONFIG_INCLUDE_DIRS "")
- set(PROJECT_PKG_CONFIG_INCLUDE_DIRS "")
- foreach(idir ${PROJECT_INCLUDE_DIRS})
- if(IS_ABSOLUTE ${idir})
- if(IS_DIRECTORY ${idir})
- set(include ${idir})
- else()
- message(FATAL_ERROR "catkin_package() absolute include dir '${idir}' does not exist")
- endif()
- elseif(IS_DIRECTORY ${PKG_INCLUDE_PREFIX}/${idir})
- set(include ${PKG_INCLUDE_PREFIX}/${idir})
- else()
- message(FATAL_ERROR "catkin_package() include dir '${idir}' does not exist relative to '${PKG_INCLUDE_PREFIX}'")
- endif()
- list_append_unique(PROJECT_CMAKE_CONFIG_INCLUDE_DIRS ${include})
- list_append_unique(PROJECT_PKG_CONFIG_INCLUDE_DIRS ${include})
- endforeach()
- if(PROJECT_DEPENDENCIES_INCLUDE_DIRS)
- list_append_unique(PROJECT_CMAKE_CONFIG_INCLUDE_DIRS ${PROJECT_DEPENDENCIES_INCLUDE_DIRS})
- list_append_unique(PROJECT_PKG_CONFIG_INCLUDE_DIRS ${PROJECT_DEPENDENCIES_INCLUDE_DIRS})
- endif()
-
- # prepend library path of this workspace
- set(PKG_CONFIG_LIB_PATHS ${lib_paths})
- list(INSERT PKG_CONFIG_LIB_PATHS 0 ${PROJECT_SPACE_DIR}/lib)
- set(PKG_CMAKE_DIR ${PROJECT_SPACE_DIR}/share/${PROJECT_NAME}/cmake)
- if("${PROJECT_NAME}" STREQUAL "catkin")
- set(PKG_CMAKE_DIR "${catkin_EXTRAS_DIR}")
- endif()
-
- if(NOT PROJECT_SKIP_PKG_CONFIG_GENERATION)
- # ensure that output folder exists
- file(MAKE_DIRECTORY ${CATKIN_DEVEL_PREFIX}/lib/pkgconfig)
- # generate devel space pc for project
- em_expand(${catkin_EXTRAS_DIR}/templates/pkg.context.pc.in
- ${CMAKE_CURRENT_BINARY_DIR}/catkin_generated/pkg.develspace.context.pc.py
- ${catkin_EXTRAS_DIR}/em/pkg.pc.em
- ${CATKIN_DEVEL_PREFIX}/lib/pkgconfig/${PROJECT_NAME}.pc)
- endif()
-
- # generate devel space cfg-extras for project
- set(PKG_CFG_EXTRAS "")
- foreach(extra ${${PROJECT_NAME}_CFG_EXTRAS} ${PROJECT_CFG_EXTRAS})
- if(IS_ABSOLUTE ${extra})
- set(base ${extra})
- get_filename_component(extra ${extra} NAME)
- else()
- set(base ${CMAKE_CURRENT_SOURCE_DIR}/cmake/${extra})
- endif()
- if(EXISTS ${base}.em OR EXISTS ${base}.develspace.em)
- if(EXISTS ${base}.develspace.em)
- set(em_template ${base}.develspace.em)
- else()
- set(em_template ${base}.em)
- endif()
- em_expand(${catkin_EXTRAS_DIR}/templates/cfg-extras.context.py.in
- ${CMAKE_CURRENT_BINARY_DIR}/catkin_generated/${extra}.develspace.context.cmake.py
- ${em_template}
- ${CATKIN_DEVEL_PREFIX}/share/${PROJECT_NAME}/cmake/${extra})
- list(APPEND PKG_CFG_EXTRAS ${extra})
- elseif(EXISTS ${base}.in OR EXISTS ${base}.develspace.in)
- if(EXISTS ${base}.develspace.in)
- set(in_template ${base}.develspace.in)
- else()
- set(in_template ${base}.in)
- endif()
- configure_file(${in_template}
- ${CATKIN_DEVEL_PREFIX}/share/${PROJECT_NAME}/cmake/${extra}
- @ONLY
- )
- list(APPEND PKG_CFG_EXTRAS ${extra})
- elseif(EXISTS ${base})
- list(APPEND PKG_CFG_EXTRAS ${base})
- elseif(NOT EXISTS ${base}.installspace.em AND NOT EXISTS ${base}.installspace.in)
- message(FATAL_ERROR "catkin_package() could not find CFG_EXTRAS file. Either 'cmake/${extra}.develspace.em', 'cmake/${extra}.em', 'cmake/${extra}.develspace.in', 'cmake/${extra}.in', 'cmake/${extra}' or a variant specific to the installspace must exist.")
- endif()
- endforeach()
-
- if(NOT PROJECT_SKIP_CMAKE_CONFIG_GENERATION)
- set(PKG_EXPORTED_TARGETS ${${PROJECT_NAME}_EXPORTED_TARGETS} ${PROJECT_EXPORTED_TARGETS})
- foreach(t ${PKG_EXPORTED_TARGETS})
- if(NOT TARGET ${t})
- message(FATAL_ERROR "catkin_package() could not find target '${t}' for code generation.")
- endif()
- endforeach()
-
- # generate devel space config for project
- set(infile ${${PROJECT_NAME}_EXTRAS_DIR}/${PROJECT_NAME}Config.cmake.in)
- if(NOT EXISTS ${infile})
- set(infile ${catkin_EXTRAS_DIR}/templates/pkgConfig.cmake.in)
- endif()
- configure_file(${infile}
- ${CATKIN_DEVEL_PREFIX}/share/${PROJECT_NAME}/cmake/${PROJECT_NAME}Config.cmake
- @ONLY
- )
- # generate devel space config-version for project
- configure_file(${catkin_EXTRAS_DIR}/templates/pkgConfig-version.cmake.in
- ${CATKIN_DEVEL_PREFIX}/share/${PROJECT_NAME}/cmake/${PROJECT_NAME}Config-version.cmake
- @ONLY
- )
- endif()
-
- #
- # INSTALLSPACE
- #
-
- # used in the cmake extra files
- set(DEVELSPACE FALSE)
- set(INSTALLSPACE TRUE)
-
- set(PROJECT_SPACE_DIR ${CMAKE_INSTALL_PREFIX})
- set(PKG_INCLUDE_PREFIX ${PROJECT_SPACE_DIR})
-
- # absolute path to include dir under install prefix if any include dir is set
- set(PROJECT_CMAKE_CONFIG_INCLUDE_DIRS "")
- set(PROJECT_PKG_CONFIG_INCLUDE_DIRS "")
- foreach(idir ${PROJECT_INCLUDE_DIRS})
- # include dirs in source / build / devel space are handled like relative ones
- # since these files are supposed to be installed to the include folder in install space
- string_starts_with("${idir}/" "${CMAKE_CURRENT_SOURCE_DIR}/" _is_source_prefix)
- string_starts_with("${idir}/" "${CMAKE_CURRENT_BINARY_DIR}/" _is_build_prefix)
- string_starts_with("${idir}/" "${CATKIN_DEVEL_PREFIX}/" _is_devel_prefix)
- if(_is_source_prefix OR _is_build_prefix OR _is_devel_prefix)
- # generated header files should be places in the devel space rather then in the build space
- if(_is_build_prefix)
- message(WARNING "catkin_package() include dir '${idir}' should be placed in the devel space instead of the build space")
- endif()
- # the value doesn't matter as long as it doesn't match IS_ABSOLUTE
- set(idir "${CATKIN_GLOBAL_INCLUDE_DESTINATION}")
- endif()
- if(IS_ABSOLUTE ${idir})
- list_append_unique(PROJECT_CMAKE_CONFIG_INCLUDE_DIRS "${idir}")
- list_append_unique(PROJECT_PKG_CONFIG_INCLUDE_DIRS "${idir}")
- else()
- list_append_unique(PROJECT_CMAKE_CONFIG_INCLUDE_DIRS "${CATKIN_GLOBAL_INCLUDE_DESTINATION}")
- list_append_unique(PROJECT_PKG_CONFIG_INCLUDE_DIRS "${PKG_INCLUDE_PREFIX}/${CATKIN_GLOBAL_INCLUDE_DESTINATION}")
- endif()
- endforeach()
- if(PROJECT_DEPENDENCIES_INCLUDE_DIRS)
- list_append_unique(PROJECT_CMAKE_CONFIG_INCLUDE_DIRS ${PROJECT_DEPENDENCIES_INCLUDE_DIRS})
- list_append_unique(PROJECT_PKG_CONFIG_INCLUDE_DIRS ${PROJECT_DEPENDENCIES_INCLUDE_DIRS})
- endif()
-
- # prepend library path of this workspace
- set(PKG_CONFIG_LIB_PATHS ${lib_paths})
- list(INSERT PKG_CONFIG_LIB_PATHS 0 ${PROJECT_SPACE_DIR}/lib)
- # package cmake dir is the folder where the generated pkgConfig.cmake is located
- set(PKG_CMAKE_DIR "\${${PROJECT_NAME}_DIR}")
-
- if(NOT PROJECT_SKIP_PKG_CONFIG_GENERATION)
- # ensure that output folder exists
- file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/catkin_generated/installspace)
- # generate and install pc for project
- em_expand(${catkin_EXTRAS_DIR}/templates/pkg.context.pc.in
- ${CMAKE_CURRENT_BINARY_DIR}/catkin_generated/pkg.installspace.context.pc.py
- ${catkin_EXTRAS_DIR}/em/pkg.pc.em
- ${CMAKE_CURRENT_BINARY_DIR}/catkin_generated/installspace/${PROJECT_NAME}.pc)
- install(FILES ${CMAKE_CURRENT_BINARY_DIR}/catkin_generated/installspace/${PROJECT_NAME}.pc
- DESTINATION lib/pkgconfig
- )
- endif()
-
- # generate and install cfg-extras for project
- set(PKG_CFG_EXTRAS "")
- set(installable_cfg_extras "")
- foreach(extra ${${PROJECT_NAME}_CFG_EXTRAS} ${PROJECT_CFG_EXTRAS})
- if(IS_ABSOLUTE ${extra})
- set(base ${extra})
- get_filename_component(extra ${extra} NAME)
- else()
- set(base ${CMAKE_CURRENT_SOURCE_DIR}/cmake/${extra})
- endif()
- if(EXISTS ${base}.em OR EXISTS ${base}.installspace.em)
- if(EXISTS ${base}.installspace.em)
- set(em_template ${base}.installspace.em)
- else()
- set(em_template ${base}.em)
- endif()
- em_expand(${catkin_EXTRAS_DIR}/templates/cfg-extras.context.py.in
- ${CMAKE_CURRENT_BINARY_DIR}/catkin_generated/${extra}.installspace.context.cmake.py
- ${em_template}
- ${CMAKE_CURRENT_BINARY_DIR}/catkin_generated/installspace/${extra})
- list(APPEND installable_cfg_extras ${CMAKE_CURRENT_BINARY_DIR}/catkin_generated/installspace/${extra})
- list(APPEND PKG_CFG_EXTRAS ${extra})
- elseif(EXISTS ${base}.in OR EXISTS ${base}.installspace.in)
- if(EXISTS ${base}.installspace.in)
- set(in_template ${base}.installspace.in)
- else()
- set(in_template ${base}.in)
- endif()
- configure_file(${in_template}
- ${CMAKE_CURRENT_BINARY_DIR}/catkin_generated/installspace/${extra}
- @ONLY
- )
- list(APPEND installable_cfg_extras ${CMAKE_CURRENT_BINARY_DIR}/catkin_generated/installspace/${extra})
- list(APPEND PKG_CFG_EXTRAS ${extra})
- elseif(EXISTS ${base})
- list(APPEND installable_cfg_extras ${base})
- list(APPEND PKG_CFG_EXTRAS ${extra})
- elseif(NOT EXISTS ${base}.develspace.em AND NOT EXISTS ${base}.develspace.in)
- message(FATAL_ERROR "catkin_package() could not find CFG_EXTRAS file. Either 'cmake/${extra}.installspace.em', 'cmake/${extra}.em', 'cmake/${extra}.installspace.in', 'cmake/${extra}.in', 'cmake/${extra}'or a variant specific to the develspace must exist.")
- endif()
- endforeach()
- install(FILES
- ${installable_cfg_extras}
- DESTINATION share/${PROJECT_NAME}/cmake
- )
-
- if(NOT PROJECT_SKIP_CMAKE_CONFIG_GENERATION)
- # generate config for project
- set(infile ${${PROJECT_NAME}_EXTRAS_DIR}/${PROJECT_NAME}Config.cmake.in)
- if(NOT EXISTS ${infile})
- set(infile ${catkin_EXTRAS_DIR}/templates/pkgConfig.cmake.in)
- endif()
- configure_file(${infile}
- ${CMAKE_CURRENT_BINARY_DIR}/catkin_generated/installspace/${PROJECT_NAME}Config.cmake
- @ONLY
- )
- # generate config-version for project
- set(infile ${${PROJECT_NAME}_EXTRAS_DIR}/${PROJECT_NAME}Config-version.cmake.in)
- if(NOT EXISTS ${infile})
- set(infile ${catkin_EXTRAS_DIR}/templates/pkgConfig-version.cmake.in)
- endif()
- configure_file(${infile}
- ${CMAKE_CURRENT_BINARY_DIR}/catkin_generated/installspace/${PROJECT_NAME}Config-version.cmake
- @ONLY
- )
- # install config, config-version and cfg-extras for project
- install(FILES
- ${CMAKE_CURRENT_BINARY_DIR}/catkin_generated/installspace/${PROJECT_NAME}Config.cmake
- ${CMAKE_CURRENT_BINARY_DIR}/catkin_generated/installspace/${PROJECT_NAME}Config-version.cmake
- DESTINATION share/${PROJECT_NAME}/cmake
- )
- endif()
-
- # install package.xml
- install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/package.xml
- DESTINATION share/${PROJECT_NAME}
- )
-
- if (EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/nodelet_plugins.xml)
- install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/nodelet_plugins.xml
- DESTINATION share/${PROJECT_NAME} )
- endif ()
-endfunction()
diff --git a/cmake/catkin/catkin_package_xml.cmake b/cmake/catkin/catkin_package_xml.cmake
deleted file mode 100644
index 99dc212add..0000000000
--- a/cmake/catkin/catkin_package_xml.cmake
+++ /dev/null
@@ -1,69 +0,0 @@
-#
-# Parse package.xml from ``CMAKE_CURRENT_SOURCE_DIR`` and
-# make several information available to CMake.
-#
-# .. note:: It is called automatically by ``catkin_package()`` if not
-# called manually before. It must be called once in each package,
-# after calling ``project()`` where the project name must match the
-# package name. The macro should only be called manually if the
-# variables are use to parameterize ``catkin_package()``.
-#
-# :param DIRECTORY: the directory of the package.xml (default
-# ``${CMAKE_CURRENT_SOURCE_DIR}``).
-# :type DIRECTORY: string
-#
-# :outvar _VERSION: the version number
-# :outvar _MAINTAINER: the name and email of the
-# maintainer(s)
-# :outvar _CATKIN_CURRENT_PACKAGE: the name of the package from the
-# manifest
-#
-# .. note:: It is calling ``catkin_destinations()`` which will provide
-# additional output variables.
-#
-# @public
-#
-macro(catkin_package_xml)
- debug_message(10 "catkin_package_xml()")
-
- # verify that project() has been called before
- if(NOT PROJECT_NAME)
- message(FATAL_ERROR "catkin_package_xml() PROJECT_NAME is not set. You must call project() before you can call catkin_package_xml().")
- endif()
-
- # ensure that function is not called multiple times per package
- if(DEFINED _CATKIN_CURRENT_PACKAGE)
- message(FATAL_ERROR "catkin_package_xml(): in '${CMAKE_CURRENT_LIST_FILE}', _CATKIN_CURRENT_PACKAGE is already set (to: ${_CATKIN_CURRENT_PACKAGE}). Did you called catkin_package_xml() multiple times?")
- endif()
-
- _catkin_package_xml(${CMAKE_CURRENT_BINARY_DIR}/catkin_generated ${ARGN})
-
- # verify that the package name from package.xml equals the project() name
- if(NOT _CATKIN_CURRENT_PACKAGE STREQUAL PROJECT_NAME)
- message(FATAL_ERROR "catkin_package_xml() package name '${_CATKIN_CURRENT_PACKAGE}' in '${_PACKAGE_XML_DIRECTORY}/package.xml' does not match current PROJECT_NAME '${PROJECT_NAME}'. You must call project() with the same package name before.")
- endif()
-
- catkin_destinations()
-endmacro()
-
-macro(_catkin_package_xml dest_dir)
- cmake_parse_arguments(_PACKAGE_XML "" "DIRECTORY" "" ${ARGN})
- if(_PACKAGE_XML_UNPARSED_ARGUMENTS)
- message(FATAL_ERROR "catkin_package_xml() called with unused arguments: ${_PACKAGE_XML_UNPARSED_ARGUMENTS}")
- endif()
-
- # set default directory
- if(NOT _PACKAGE_XML_DIRECTORY)
- set(_PACKAGE_XML_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
- endif()
-
- # stamp and parse package.xml
- stamp(${_PACKAGE_XML_DIRECTORY}/package.xml)
- file(MAKE_DIRECTORY ${dest_dir})
- safe_execute_process(COMMAND ${PYTHON_EXECUTABLE}
- ${catkin_EXTRAS_DIR}/parse_package_xml.py
- ${_PACKAGE_XML_DIRECTORY}/package.xml
- ${dest_dir}/package.cmake)
- # load extracted variable into cmake
- include(${dest_dir}/package.cmake)
-endmacro()
diff --git a/cmake/catkin/catkin_python_setup.cmake b/cmake/catkin/catkin_python_setup.cmake
deleted file mode 100644
index 2a8a0f7558..0000000000
--- a/cmake/catkin/catkin_python_setup.cmake
+++ /dev/null
@@ -1,150 +0,0 @@
-# This macro will interrogate the Python setup.py file in
-# ``${${PROJECT_NAME}_SOURCE_DIR}``, and then creates forwarding
-# Python :term:`pkgutil` infrastructure in devel space
-# accordingly for the scripts and packages declared in setup.py.
-#
-# Doing so enables mixing :term:`generated code` in
-# devel space with :term:`static code` from sourcespace within a
-# single Python package.
-#
-# In addition, it adds the install command of
-# distutils/setuputils to the install target.
-#
-# .. note:: If the project also uses genmsg message generation via
-# ``generate_messages()`` this function must be called before.
-#
-# @public
-#
-function(catkin_python_setup)
- if(ARGN)
- message(FATAL_ERROR "catkin_python_setup() called with unused arguments: ${ARGN}")
- endif()
-
- if(${PROJECT_NAME}_GENERATE_MESSAGES)
- message(FATAL_ERROR "generate_messages() must be called after catkin_python_setup() in project '${PROJECT_NAME}'")
- endif()
- if(${PROJECT_NAME}_GENERATE_DYNAMIC_RECONFIGURE)
- message(FATAL_ERROR "generate_dynamic_reconfigure_options() must be called after catkin_python_setup() in project '${PROJECT_NAME}'")
- endif()
-
- if(NOT EXISTS ${${PROJECT_NAME}_SOURCE_DIR}/setup.py)
- message(FATAL_ERROR "catkin_python_setup() called without 'setup.py' in project folder ' ${${PROJECT_NAME}_SOURCE_DIR}'")
- endif()
-
- assert(PYTHON_INSTALL_DIR)
- set(INSTALL_CMD_WORKING_DIRECTORY ${${PROJECT_NAME}_SOURCE_DIR})
- if(NOT WIN32)
- set(INSTALL_SCRIPT
- ${CMAKE_CURRENT_BINARY_DIR}/catkin_generated/python_distutils_install.sh)
- configure_file(${catkin_EXTRAS_DIR}/templates/python_distutils_install.sh.in
- ${INSTALL_SCRIPT}
- @ONLY)
- else()
- # need to convert install prefix to native path for python setuptools --prefix (its fussy about \'s)
- file(TO_NATIVE_PATH ${CMAKE_INSTALL_PREFIX} PYTHON_INSTALL_PREFIX)
- set(INSTALL_SCRIPT
- ${CMAKE_CURRENT_BINARY_DIR}/catkin_generated/python_distutils_install.bat)
- configure_file(${catkin_EXTRAS_DIR}/templates/python_distutils_install.bat.in
- ${INSTALL_SCRIPT}
- @ONLY)
- endif()
-
- # generate python script which gets executed at install time
- configure_file(${catkin_EXTRAS_DIR}/templates/safe_execute_install.cmake.in
- ${CMAKE_CURRENT_BINARY_DIR}/catkin_generated/safe_execute_install.cmake)
- install(SCRIPT ${CMAKE_CURRENT_BINARY_DIR}/catkin_generated/safe_execute_install.cmake)
-
- # interrogate setup.py
- stamp(${${PROJECT_NAME}_SOURCE_DIR}/setup.py)
- assert(CATKIN_ENV)
- assert(PYTHON_EXECUTABLE)
- set(cmd
- ${CATKIN_ENV} ${PYTHON_EXECUTABLE}
- ${catkin_EXTRAS_DIR}/interrogate_setup_dot_py.py
- ${PROJECT_NAME}
- ${${PROJECT_NAME}_SOURCE_DIR}/setup.py
- ${${PROJECT_NAME}_BINARY_DIR}/catkin_generated/setup_py_interrogation.cmake
- )
- debug_message(10 "catkin_python_setup() in project '{PROJECT_NAME}' executes: ${cmd}")
- safe_execute_process(COMMAND ${cmd})
- include(${${PROJECT_NAME}_BINARY_DIR}/catkin_generated/setup_py_interrogation.cmake)
-
- # call catkin_package_xml() if it has not been called before
- if(NOT _CATKIN_CURRENT_PACKAGE)
- catkin_package_xml()
- endif()
- assert(${PROJECT_NAME}_VERSION)
- # verify that version from setup.py is equal to version from package.xml
- if(NOT "${${PROJECT_NAME}_SETUP_PY_VERSION}" STREQUAL "${${PROJECT_NAME}_VERSION}")
- message(FATAL_ERROR "catkin_python_setup() version in setup.py (${${PROJECT_NAME}_SETUP_PY_VERSION}) differs from version in package.xml (${${PROJECT_NAME}_VERSION})")
- endif()
-
- # generate relaying __init__.py for each python package
- if(${PROJECT_NAME}_SETUP_PY_PACKAGES)
- list(LENGTH ${PROJECT_NAME}_SETUP_PY_PACKAGES pkgs_count)
- math(EXPR pkgs_range "${pkgs_count} - 1")
- foreach(index RANGE ${pkgs_range})
- list(GET ${PROJECT_NAME}_SETUP_PY_PACKAGES ${index} pkg)
- if("${pkg}" STREQUAL "${PROJECT_NAME}")
- # mark that catkin_python_setup() was called and the setup.py file contains a package with the same name as the current project
- # in order to disable installation of generated __init__.py files in generate_messages() and generate_dynamic_reconfigure_options()
- set(${PROJECT_NAME}_CATKIN_PYTHON_SETUP_HAS_PACKAGE_INIT TRUE PARENT_SCOPE)
- endif()
- list(GET ${PROJECT_NAME}_SETUP_PY_PACKAGE_DIRS ${index} pkg_dir)
- get_filename_component(name ${pkg_dir} NAME)
- if(NOT ("${pkg}" STREQUAL "${name}"))
- message(FATAL_ERROR "The package name '${pkg}' differs from the basename of the path '${pkg_dir}' in project '${PROJECT_NAME}'")
- endif()
- get_filename_component(path ${pkg_dir} PATH)
- set(PACKAGE_PYTHONPATH ${CMAKE_CURRENT_SOURCE_DIR}/${path})
- configure_file(${catkin_EXTRAS_DIR}/templates/__init__.py.in
- ${CATKIN_DEVEL_PREFIX}/${PYTHON_INSTALL_DIR}/${pkg}/__init__.py
- @ONLY)
- endforeach()
- endif()
-
- # generate relay-script for each python module (and __init__.py files) if available
- if(${PROJECT_NAME}_SETUP_PY_MODULES)
- list(LENGTH ${PROJECT_NAME}_SETUP_PY_MODULES modules_count)
- math(EXPR modules_range "${modules_count} - 1")
- foreach(index RANGE ${modules_range})
- list(GET ${PROJECT_NAME}_SETUP_PY_MODULES ${index} module)
- list(GET ${PROJECT_NAME}_SETUP_PY_MODULE_DIRS ${index} module_dir)
- set(PYTHON_SCRIPT ${CMAKE_CURRENT_SOURCE_DIR}/${module_dir}/${module})
- if(EXISTS ${PYTHON_SCRIPT})
- get_filename_component(path ${module} PATH)
- file(MAKE_DIRECTORY "${CATKIN_DEVEL_PREFIX}/${CATKIN_GLOBAL_PYTHON_DESTINATION}/${path}")
- configure_file(${catkin_EXTRAS_DIR}/templates/relay.py.in
- ${CATKIN_DEVEL_PREFIX}/${CATKIN_GLOBAL_PYTHON_DESTINATION}/${module}
- @ONLY)
- # relay parent __init__.py files if they exist
- while(NOT "${path}" STREQUAL "")
- set(PYTHON_SCRIPT ${CMAKE_CURRENT_SOURCE_DIR}/${module_dir}/${path}/__init__.py)
- if(EXISTS ${PYTHON_SCRIPT})
- file(MAKE_DIRECTORY "${CATKIN_DEVEL_PREFIX}/${CATKIN_GLOBAL_PYTHON_DESTINATION}/${path}")
- configure_file(${catkin_EXTRAS_DIR}/templates/relay.py.in
- ${CATKIN_DEVEL_PREFIX}/${CATKIN_GLOBAL_PYTHON_DESTINATION}/${path}/__init__.py
- @ONLY)
- else()
- message(WARNING "The module '${module_dir}/${module}' lacks an '__init__.py' file in the parent folder '${module_dir}/${path}' in project '${PROJECT_NAME}'")
- endif()
- get_filename_component(path ${path} PATH)
- endwhile()
- endif()
- endforeach()
- endif()
-
- # generate relay-script for each python script
- foreach(script ${${PROJECT_NAME}_SETUP_PY_SCRIPTS})
- get_filename_component(name ${script} NAME)
- if(NOT EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${script})
- message(FATAL_ERROR "The script '${name}' as listed in 'setup.py' of '${PROJECT_NAME}' doesn't exist")
- endif()
- set(PYTHON_SCRIPT ${CMAKE_CURRENT_SOURCE_DIR}/${script})
- atomic_configure_file(${catkin_EXTRAS_DIR}/templates/script.py.in
- ${CATKIN_DEVEL_PREFIX}/${CATKIN_GLOBAL_BIN_DESTINATION}/${name}
- @ONLY)
- endforeach()
-endfunction()
-
-stamp(${catkin_EXTRAS_DIR}/interrogate_setup_dot_py.py)
diff --git a/cmake/catkin/catkin_workspace.cmake b/cmake/catkin/catkin_workspace.cmake
deleted file mode 100644
index d346ff0fde..0000000000
--- a/cmake/catkin/catkin_workspace.cmake
+++ /dev/null
@@ -1,122 +0,0 @@
-#
-# Search all subfolders in the workspace for ``package.xml`` files.
-# Based on the dependencies specified in the ``build_depends``,
-# ``buildtool_depends`` and (as of package format version 2)
-# ``test_depends`` tags it performs a topological sort and calls
-# ``add_subdirectory()`` for each directory.
-#
-# The functions is only called in catkin's ``toplevel.cmake``, which
-# is usually symlinked to the workspace root directory (which
-# contains multiple packages).
-#
-function(catkin_workspace)
- debug_message(10 "catkin_workspace() called in file '${CMAKE_CURRENT_LIST_FILE}'")
-
- # set global output directories for artifacts and create them if necessary
- set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CATKIN_DEVEL_PREFIX}/lib)
- set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CATKIN_DEVEL_PREFIX}/lib)
- if(NOT IS_DIRECTORY ${CMAKE_LIBRARY_OUTPUT_DIRECTORY})
- file(MAKE_DIRECTORY ${CMAKE_LIBRARY_OUTPUT_DIRECTORY})
- endif()
-
- # tools/libraries.cmake
- configure_shared_library_build_settings()
-
- set(CATKIN_WHITELIST_PACKAGES "" CACHE STRING "List of ';' separated packages to build")
- set(CATKIN_BLACKLIST_PACKAGES "" CACHE STRING "List of ';' separated packages to exclude")
- if(NOT "${CATKIN_WHITELIST_PACKAGES}" STREQUAL "")
- message(STATUS "Using CATKIN_WHITELIST_PACKAGES: ${CATKIN_WHITELIST_PACKAGES}")
- endif()
- if(NOT "${CATKIN_BLACKLIST_PACKAGES}" STREQUAL "")
- message(STATUS "Using CATKIN_BLACKLIST_PACKAGES: ${CATKIN_BLACKLIST_PACKAGES}")
- endif()
-
- assert(catkin_EXTRAS_DIR)
- em_expand(
- ${catkin_EXTRAS_DIR}/templates/order_packages.context.py.in
- ${CMAKE_CURRENT_BINARY_DIR}/catkin_generated/order_packages.py
- ${catkin_EXTRAS_DIR}/em/order_packages.cmake.em
- ${CMAKE_CURRENT_BINARY_DIR}/catkin_generated/order_packages.cmake
- )
- debug_message(10 "catkin_workspace() including order_packages.cmake")
- include(${CMAKE_CURRENT_BINARY_DIR}/catkin_generated/order_packages.cmake)
-
- if(CATKIN_ORDERED_PACKAGES)
- set(CATKIN_NONCONFORMANT_METAPACKAGE FALSE)
- set(CATKIN_NONHOMOGENEOUS_WORKSPACE FALSE)
- list(LENGTH CATKIN_ORDERED_PACKAGES count)
- message(STATUS "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~")
- message(STATUS "~~ traversing ${count} packages in topological order:")
- math(EXPR range "${count} - 1")
- foreach(index RANGE ${range})
- list(GET CATKIN_ORDERED_PACKAGES ${index} name)
- list(GET CATKIN_ORDERED_PACKAGE_PATHS ${index} path)
- list(GET CATKIN_ORDERED_PACKAGES_IS_META ${index} is_meta)
- list(GET CATKIN_ORDERED_PACKAGES_BUILD_TYPE ${index} build_type)
- if(${is_meta})
- message(STATUS "~~ - ${name} (metapackage)")
- # verify that CMakeLists.txt of metapackage conforms to standard
- set(metapackage_arguments "")
- assert(CATKIN_METAPACKAGE_CMAKE_TEMPLATE)
- configure_file(${CATKIN_METAPACKAGE_CMAKE_TEMPLATE}
- ${CMAKE_CURRENT_BINARY_DIR}/catkin_generated/metapackages/${name}/CMakeLists.txt
- @ONLY)
- if(EXISTS ${CMAKE_SOURCE_DIR}/${path}/CMakeLists.txt)
- # compare CMakeLists.txt with standard content
- file(STRINGS ${CMAKE_CURRENT_BINARY_DIR}/catkin_generated/metapackages/${name}/CMakeLists.txt generated_cmakelists)
- file(STRINGS ${path}/CMakeLists.txt existing_cmakelists)
- if(NOT "${generated_cmakelists}" STREQUAL "${existing_cmakelists}")
- set(CATKIN_NONHOMOGENEOUS_WORKSPACE TRUE)
- message("WARNING: The CMakeLists.txt of the metapackage '${name}' contains non standard content. Use the content of the following file instead: ${CMAKE_CURRENT_BINARY_DIR}/catkin_generated/metapackages/${name}/CMakeLists.txt")
- endif()
- else()
- message("WARNING: The metapackage '${name}' has no CMakeLists.txt. Please add one to the package source. You can use the following file: ${CMAKE_CURRENT_BINARY_DIR}/catkin_generated/metapackages/${name}/CMakeLists.txt")
- endif()
- else()
- if(${build_type} MATCHES catkin)
- message(STATUS "~~ - ${name}")
- else()
- set(CATKIN_NONHOMOGENEOUS_WORKSPACE TRUE)
- if(${build_type} MATCHES cmake)
- message(STATUS "~~ - ${name} (plain cmake)")
- else()
- message(STATUS "~~ - ${name} (unknown)")
- message(WARNING "Unknown build type '${build_type}' for package '${name}'")
- endif()
- endif()
- endif()
- endforeach()
- message(STATUS "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~")
-
- if(${CATKIN_NONCONFORMANT_METAPACKAGE})
- message(FATAL_ERROR "This workspace contains metapackages with a non-standard CMakeLists.txt.")
- endif()
- if(${CATKIN_NONHOMOGENEOUS_WORKSPACE})
- message(FATAL_ERROR "This workspace contains non-catkin packages in it, and catkin cannot build a non-homogeneous workspace without isolation. Try the 'catkin_make_isolated' command instead.")
- endif()
-
- foreach(index RANGE ${range})
- list(GET CATKIN_ORDERED_PACKAGES ${index} name)
- list(GET CATKIN_ORDERED_PACKAGE_PATHS ${index} path)
- list(GET CATKIN_ORDERED_PACKAGES_IS_META ${index} is_meta)
- list(GET CATKIN_ORDERED_PACKAGES_BUILD_TYPE ${index} build_type)
- if(${is_meta})
- message(STATUS "+++ processing catkin metapackage: '${name}'")
- if(EXISTS ${CMAKE_SOURCE_DIR}/${path}/CMakeLists.txt)
- message(STATUS "==> add_subdirectory(${path})")
- add_subdirectory(${path})
- else()
- message(STATUS "==> add_subdirectory(${path}) (using generated file from /catkin_generated/metapackages/${name})")
- message("WARNING: Add a CMakeLists.txt file to the metapackage '${name}'")
- add_subdirectory(${CMAKE_CURRENT_BINARY_DIR}/catkin_generated/metapackages/${name} ${CMAKE_BINARY_DIR}/${path})
- endif()
- elseif(${build_type} MATCHES catkin)
- message(STATUS "+++ processing catkin package: '${name}'")
- message(STATUS "==> add_subdirectory(${path})")
- add_subdirectory(${path})
- else()
- message(FATAL_ERROR "Non-catkin package found, non-homogeneous workspaces are not supported.")
- endif()
- endforeach()
- endif()
-endfunction()
diff --git a/cmake/catkin/debug_message.cmake b/cmake/catkin/debug_message.cmake
deleted file mode 100644
index bdb94e5a11..0000000000
--- a/cmake/catkin/debug_message.cmake
+++ /dev/null
@@ -1,16 +0,0 @@
-# Log levels
-# 0 Normal use
-# 1 Catkin developer use (Stuff being developed)
-# 2 Catkin developer use (Stuff working)
-# 3 Also Print True Assert Statements
-
-macro(debug_message level)
- set(loglevel ${CATKIN_LOG})
- if(NOT loglevel)
- set(loglevel 0)
- endif()
-
- if(NOT ${level} GREATER ${loglevel})
- message(STATUS " ${ARGN}")
- endif()
-endmacro()
diff --git a/cmake/catkin/em/order_packages.cmake.em b/cmake/catkin/em/order_packages.cmake.em
deleted file mode 100644
index 087d4d802e..0000000000
--- a/cmake/catkin/em/order_packages.cmake.em
+++ /dev/null
@@ -1,56 +0,0 @@
-# generated from catkin/cmake/em/order_packages.cmake.em
-@{
-import os
-try:
- from catkin_pkg.cmake import get_metapackage_cmake_template_path
-except ImportError as e:
- raise RuntimeError('ImportError: "from catkin_pkg.cmake import get_metapackage_cmake_template_path" failed: %s\nMake sure that you have installed "catkin_pkg", it is up to date and on the PYTHONPATH.' % e)
-try:
- from catkin_pkg.topological_order import topological_order
-except ImportError as e:
- raise RuntimeError('ImportError: "from catkin_pkg.topological_order import topological_order" failed: %s\nMake sure that you have installed "catkin_pkg", it is up to date and on the PYTHONPATH.' % e)
-try:
- from catkin_pkg.package import InvalidPackage
-except ImportError as e:
- raise RuntimeError('ImportError: "from catkin_pkg.package import InvalidPackage" failed: %s\nMake sure that you have installed "catkin_pkg", it is up to date and on the PYTHONPATH.' % e)
-# vars defined in order_packages.context.py.in
-try:
- ordered_packages = topological_order(os.path.normpath(source_root_dir), whitelisted=whitelisted_packages, blacklisted=blacklisted_packages, underlay_workspaces=underlay_workspaces)
-except InvalidPackage as e:
- print('message(FATAL_ERROR "%s")' % ('%s' % e).replace('"', '\\"'))
- ordered_packages = []
-fatal_error = False
-}@
-
-set(CATKIN_ORDERED_PACKAGES "")
-set(CATKIN_ORDERED_PACKAGE_PATHS "")
-set(CATKIN_ORDERED_PACKAGES_IS_META "")
-set(CATKIN_ORDERED_PACKAGES_BUILD_TYPE "")
-@[for path, package in ordered_packages]@
-@[if path is None]@
-message(FATAL_ERROR "Circular dependency in subset of packages:\n@package")
-@{
-fatal_error = True
-}@
-@[elif package.name != 'catkin']@
-list(APPEND CATKIN_ORDERED_PACKAGES "@(package.name)")
-list(APPEND CATKIN_ORDERED_PACKAGE_PATHS "@(path.replace('\\','/'))")
-list(APPEND CATKIN_ORDERED_PACKAGES_IS_META "@(str('metapackage' in [e.tagname for e in package.exports]))")
-list(APPEND CATKIN_ORDERED_PACKAGES_BUILD_TYPE "@(str([e.content for e in package.exports if e.tagname == 'build_type'][0]) if 'build_type' in [e.tagname for e in package.exports] else 'catkin')")
-@{
-deprecated = [e for e in package.exports if e.tagname == 'deprecated']
-}@
-@[if deprecated]@
-message("WARNING: Package '@(package.name)' is deprecated@(' (%s)' % deprecated[0].content if deprecated[0].content else '')")
-@[end if]@
-@[end if]@
-@[end for]@
-
-@[if not fatal_error]@
-@{
-message_generators = [package.name for (_, package) in ordered_packages if 'message_generator' in [e.tagname for e in package.exports]]
-}@
-set(CATKIN_MESSAGE_GENERATORS @(' '.join(message_generators)))
-@[end if]@
-
-set(CATKIN_METAPACKAGE_CMAKE_TEMPLATE "@(get_metapackage_cmake_template_path().replace('\\','/'))")
diff --git a/cmake/catkin/em/pkg.pc.em b/cmake/catkin/em/pkg.pc.em
deleted file mode 100644
index a4f72576cf..0000000000
--- a/cmake/catkin/em/pkg.pc.em
+++ /dev/null
@@ -1,8 +0,0 @@
-prefix=@PROJECT_SPACE_DIR
-
-Name: @(CATKIN_PACKAGE_PREFIX + PROJECT_NAME)
-Description: Description of @PROJECT_NAME
-Version: @PROJECT_VERSION
-Cflags: @(' '.join(['-I%s' % include for include in PROJECT_PKG_CONFIG_INCLUDE_DIRS]))
-Libs: -L@PROJECT_SPACE_DIR/lib @(' '.join(PKG_CONFIG_LIBRARIES_WITH_PREFIX))
-Requires: @(PROJECT_CATKIN_DEPENDS)
diff --git a/cmake/catkin/em_expand.cmake b/cmake/catkin/em_expand.cmake
deleted file mode 100644
index 0cca5f4667..0000000000
--- a/cmake/catkin/em_expand.cmake
+++ /dev/null
@@ -1,31 +0,0 @@
-macro(em_expand context_in context_out em_file_in file_out)
- assert_file_exists("${context_in}" "input file for context missing")
- assert_file_exists("${em_file_in}" "template file missing")
- debug_message(2 "configure_file(${context_in}, ${context_out})")
- configure_file(${context_in} ${context_out} @ONLY)
- assert_file_exists("${context_out}" "context file was not generated correctly")
-
- stamp(${em_file_in})
-
- # create directory if necessary
- get_filename_component(_folder_out ${file_out} PATH)
- if(NOT IS_DIRECTORY ${_folder_out})
- file(MAKE_DIRECTORY ${_folder_out})
- endif()
-
- debug_message(2 "Evaluate template '${em_file_in}' to '${file_out}' (with context from '${context_out}')")
- assert(EMPY_SCRIPT)
- # since empy contains a specific python version in its shebang line
- # override the used python version by invoking it explicitly
- set(command "${PYTHON_EXECUTABLE};${EMPY_SCRIPT}")
- # prepend environment if set
- if(CATKIN_ENV)
- set(command ${CATKIN_ENV} ${command})
- endif()
- safe_execute_process(COMMAND
- ${command}
- --raw-errors
- -F ${context_out}
- -o ${file_out}
- ${em_file_in})
-endmacro()
diff --git a/cmake/catkin/empy.cmake b/cmake/catkin/empy.cmake
deleted file mode 100644
index 3328ce513d..0000000000
--- a/cmake/catkin/empy.cmake
+++ /dev/null
@@ -1,39 +0,0 @@
-function(find_python_module module)
- # cribbed from http://www.cmake.org/pipermail/cmake/2011-January/041666.html
- string(TOUPPER ${module} module_upper)
- if(NOT PY_${module_upper})
- if(ARGC GREATER 1 AND ARGV1 STREQUAL "REQUIRED")
- set(${module}_FIND_REQUIRED TRUE)
- endif()
- # A module's location is usually a directory, but for
- # binary modules
- # it's a .so file.
- execute_process(COMMAND "${PYTHON_EXECUTABLE}" "-c" "import re, ${module}; print(re.compile('/__init__.py.*').sub('',${module}.__file__))"
- RESULT_VARIABLE _${module}_status
- OUTPUT_VARIABLE _${module}_location
- ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE)
- if(NOT _${module}_status)
- set(PY_${module_upper} ${_${module}_location} CACHE STRING "Location of Python module ${module}")
- endif(NOT _${module}_status)
- endif(NOT PY_${module_upper})
- include(FindPackageHandleStandardArgs)
- find_package_handle_standard_args(PY_${module} DEFAULT_MSG PY_${module_upper})
-endfunction(find_python_module)
-
-if(NOT EMPY_SCRIPT)
- find_program(EMPY_EXECUTABLE empy)
- if(NOT EMPY_EXECUTABLE)
- # On OSX, there's an em.py, but not an executable empy script
- find_python_module(em)
- if(NOT PY_EM)
- message(FATAL_ERROR "Unable to find either executable 'empy' or Python module 'em'... try installing the package 'python-empy'")
- endif()
- # ensure to use cmake-style path separators on Windows
- file(TO_CMAKE_PATH "${PY_EM}" EMPY_SCRIPT)
- else()
- # ensure to use cmake-style path separators on Windows
- file(TO_CMAKE_PATH "${EMPY_EXECUTABLE}" EMPY_SCRIPT)
- endif()
- set(EMPY_SCRIPT "${EMPY_SCRIPT}" CACHE STRING "Empy script" FORCE)
-endif()
-#message(STATUS "Using empy: ${EMPY_SCRIPT}")
diff --git a/cmake/catkin/env-hooks/05.catkin-test-results.bat.develspace.in b/cmake/catkin/env-hooks/05.catkin-test-results.bat.develspace.in
deleted file mode 100644
index e2eb02379b..0000000000
--- a/cmake/catkin/env-hooks/05.catkin-test-results.bat.develspace.in
+++ /dev/null
@@ -1,4 +0,0 @@
-REM generated from catkin/cmake/env-hooks/05.catkin-test-results.bat.develspace.in
-
-set CATKIN_TEST_RESULTS_DIR="@CATKIN_TEST_RESULTS_DIR@"
-set ROS_TEST_RESULTS_DIR=%CATKIN_TEST_RESULTS_DIR%
diff --git a/cmake/catkin/env-hooks/05.catkin-test-results.sh.develspace.in b/cmake/catkin/env-hooks/05.catkin-test-results.sh.develspace.in
deleted file mode 100644
index dcbf018650..0000000000
--- a/cmake/catkin/env-hooks/05.catkin-test-results.sh.develspace.in
+++ /dev/null
@@ -1,4 +0,0 @@
-# generated from catkin/cmake/env-hooks/05.catkin-test-results.sh.develspace.in
-
-export CATKIN_TEST_RESULTS_DIR="@CATKIN_TEST_RESULTS_DIR@"
-export ROS_TEST_RESULTS_DIR="$CATKIN_TEST_RESULTS_DIR"
diff --git a/cmake/catkin/env-hooks/05.catkin_make.bash b/cmake/catkin/env-hooks/05.catkin_make.bash
deleted file mode 100644
index 621d668a46..0000000000
--- a/cmake/catkin/env-hooks/05.catkin_make.bash
+++ /dev/null
@@ -1,67 +0,0 @@
-function _catkin_make()
-{
- local cur prev
- cur=${COMP_WORDS[COMP_CWORD]}
- prev=${COMP_WORDS[COMP_CWORD-1]}
-
- # autocomplete path arguments for -C, --directory, --source, --build
- case $prev in
- -C|--directory|--source|--build)
- _filedir -d
- return 0
- ;;
- esac
-
- if [[ "$cur" == -DCMAKE_BUILD_TYPE=* ]]; then
- # autocomplete CMake argument CMAKE_BUILD_TYPE with its options
- COMPREPLY=( $( compgen -P "-DCMAKE_BUILD_TYPE=" -W "None Debug Release RelWithDebInfo MinSizeRel" -- "${cur:19}" ) )
- elif [[ "$cur" == -DCATKIN_ENABLE_TESTING=* ]]; then
- # autocomplete catkin argument CATKIN_ENABLE_TESTING with its options
- COMPREPLY=( $( compgen -P "-DCATKIN_ENABLE_TESTING=" -W "0 1" -- "${cur:24}" ) )
- elif [[ "$cur" == -DCATKIN_DEVEL_PREFIX=* || "$cur" == -DCMAKE_INSTALL_PREFIX=* ]]; then
- COMPREPLY=()
- elif [[ "$cur" == -* ]]; then
- local opts="$( _parse_help "$1" )"
- [[ $opts ]] || opts="$( _parse_usage "$1" )"
- if [[ "$cur" == -* ]]; then
- # suggest some common CMake arguments
- opts="$opts -DCATKIN_DEVEL_PREFIX= -DCATKIN_ENABLE_TESTING= -DCMAKE_INSTALL_PREFIX= -DCMAKE_BUILD_TYPE="
- fi
- COMPREPLY=( $( compgen -W "$opts" -- "$cur" ) )
- [[ $COMPREPLY == *= ]] && compopt -o nospace
- else
- # check if custom workspace root has been specified on the command line
- local workspace_dir="."
- for (( i=0; i < ${#COMP_WORDS[@]}; i++ )); do
- if [[ ${COMP_WORDS[i]} == -C || ${COMP_WORDS[i]} == --directory ]]; then
- # eval to expand tilde
- eval workspace_dir=${COMP_WORDS[i+1]}
- fi
- done
- # check if custom build folder has been specified on the command line
- local build_dir="build"
- for (( i=0; i < ${#COMP_WORDS[@]}; i++ )); do
- if [[ ${COMP_WORDS[i]} == --build ]]; then
- # eval to expand tilde
- eval build_dir=${COMP_WORDS[i+1]}
- fi
- done
-
- # determine location of Makefile
- local makefile_dir
- if [[ "$build_dir" = /* ]]; then
- makefile_dir="$build_dir"
- else
- makefile_dir="$workspace_dir/$build_dir"
- fi
- COMPREPLY=()
- if [ -f "$makefile_dir/Makefile" ]; then
- cur=${COMP_WORDS[COMP_CWORD]}
- COMPREPLY=( $( compgen -W "`make -C $makefile_dir -qp 2>/dev/null | awk -F':' '/^[a-zA-Z0-9][a-zA-Z0-9_\.]*:/ { print $1 }'`" -- $cur ))
- elif [ -f "$makefile_dir/build.ninja" ]; then
- cur=${COMP_WORDS[COMP_CWORD]}
- COMPREPLY=( $( compgen -W "`ninja -C $makefile_dir -t targets 2>/dev/null | awk -F':' '/^[a-zA-Z0-9][a-zA-Z0-9_\.]*:/ { print $1 }'`" -- $cur ))
- fi
- fi
-} &&
-complete -F _catkin_make catkin_make
diff --git a/cmake/catkin/env-hooks/05.catkin_make_isolated.bash b/cmake/catkin/env-hooks/05.catkin_make_isolated.bash
deleted file mode 100644
index 99e5d30164..0000000000
--- a/cmake/catkin/env-hooks/05.catkin_make_isolated.bash
+++ /dev/null
@@ -1,65 +0,0 @@
-function _catkin_make_isolated()
-{
- local cur prev
- cur=${COMP_WORDS[COMP_CWORD]}
- prev=${COMP_WORDS[COMP_CWORD-1]}
-
- # autocomplete path arguments for -C, --directory, --source, --build, --devel, --install
- case $prev in
- -C|--directory|--source|--build|--devel|--install)
- _filedir -d
- return 0
- ;;
- esac
-
- if [[ "$cur" == -DCMAKE_BUILD_TYPE=* ]]; then
- # autocomplete CMake argument CMAKE_BUILD_TYPE with its options
- COMPREPLY=( $( compgen -P "-DCMAKE_BUILD_TYPE=" -W "None Debug Release RelWithDebInfo MinSizeRel" -- "${cur:19}" ) )
- elif [[ "$cur" == -DCATKIN_ENABLE_TESTING=* ]]; then
- # autocomplete catkin argument CATKIN_ENABLE_TESTING with its options
- COMPREPLY=( $( compgen -P "-DCATKIN_ENABLE_TESTING=" -W "0 1" -- "${cur:24}" ) )
- elif [[ "$cur" == -* ]]; then
- local opts="$( _parse_help "$1" )"
- [[ $opts ]] || opts="$( _parse_usage "$1" )"
- if [[ "$cur" == -* ]]; then
- # suggest some common CMake arguments
- opts="$opts -DCATKIN_ENABLE_TESTING= -DCMAKE_BUILD_TYPE="
- fi
- COMPREPLY=( $( compgen -W "$opts" -- "$cur" ) )
- [[ $COMPREPLY == *= ]] && compopt -o nospace
- else
- # check if custom workspace root has been specified on the command line
- local workspace_dir="."
- for (( i=0; i < ${#COMP_WORDS[@]}; i++ )); do
- if [[ ${COMP_WORDS[i]} == -C || ${COMP_WORDS[i]} == --directory ]]; then
- # eval to expand tilde
- eval workspace_dir=${COMP_WORDS[i+1]}
- fi
- done
- # check if custom build folder has been specified on the command line
- local build_dir="build_isolated"
- for (( i=0; i < ${#COMP_WORDS[@]}; i++ )); do
- if [[ ${COMP_WORDS[i]} == --build ]]; then
- # eval to expand tilde
- eval build_dir=${COMP_WORDS[i+1]}
- fi
- done
-
- # determine location of Makefile
- local makefile_dir
- if [[ "$build_dir" = /* ]]; then
- makefile_dir="$build_dir"
- else
- makefile_dir="$workspace_dir/$build_dir"
- fi
- COMPREPLY=()
- if [ -f "$makefile_dir/Makefile" ]; then
- cur=${COMP_WORDS[COMP_CWORD]}
- COMPREPLY=( $( compgen -W "`make -C $makefile_dir -qp 2>/dev/null | awk -F':' '/^[a-zA-Z0-9][a-zA-Z0-9_\.]*:/ { print $1 }'`" -- $cur ))
- elif [ -f "$makefile_dir/build.ninja" ]; then
- cur=${COMP_WORDS[COMP_CWORD]}
- COMPREPLY=( $( compgen -W "`ninja -C $makefile_dir -t targets 2>/dev/null | awk -F':' '/^[a-zA-Z0-9][a-zA-Z0-9_\.]*:/ { print $1 }'`" -- $cur ))
- fi
- fi
-} &&
-complete -F _catkin_make_isolated catkin_make_isolated
diff --git a/cmake/catkin/find_program_required.cmake b/cmake/catkin/find_program_required.cmake
deleted file mode 100644
index 4cd3ab0c79..0000000000
--- a/cmake/catkin/find_program_required.cmake
+++ /dev/null
@@ -1,9 +0,0 @@
-function(find_program_required ARG_VAR ARG_PROGRAM_NAME)
- cmake_parse_arguments(ARG "NO_DEFAULT_PATH;NO_CMAKE_FIND_ROOT_PATH" "" "PATHS" ${ARGN})
- find_program(${ARG_VAR} ${ARG_PROGRAM_NAME} PATHS ${ARG_PATHS} ${ARG_NO_DEFAULT_PATH} ${ARG_NO_CMAKE_FIND_ROOT_PATH})
- if(NOT ${ARG_VAR})
- message(FATAL_ERROR "${ARG_PROGRAM_NAME} not found")
- else()
- debug_message(1 "${ARG_PROGRAM_NAME} was found at ${${ARG_VAR}}")
- endif()
-endfunction()
diff --git a/cmake/catkin/interrogate_setup_dot_py.py b/cmake/catkin/interrogate_setup_dot_py.py
deleted file mode 100644
index 26882f02aa..0000000000
--- a/cmake/catkin/interrogate_setup_dot_py.py
+++ /dev/null
@@ -1,250 +0,0 @@
-#!/usr/bin/env python
-
-# Software License Agreement (BSD License)
-#
-# Copyright (c) 2012, Willow Garage, Inc.
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-#
-# * Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# * Redistributions in binary form must reproduce the above
-# copyright notice, this list of conditions and the following
-# disclaimer in the documentation and/or other materials provided
-# with the distribution.
-# * Neither the name of Willow Garage, Inc. nor the names of its
-# contributors may be used to endorse or promote products derived
-# from this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
-# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
-# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-# POSSIBILITY OF SUCH DAMAGE.
-
-from __future__ import print_function
-import os
-import sys
-
-import distutils.core
-try:
- import setuptools
-except ImportError:
- pass
-
-from argparse import ArgumentParser
-
-
-def _get_locations(pkgs, package_dir):
- """
- based on setuptools logic and the package_dir dict, builds a dict
- of location roots for each pkg in pkgs.
- See http://docs.python.org/distutils/setupscript.html
-
- :returns: a dict {pkgname: root} for each pkgname in pkgs (and each of their parents)
- """
- # package_dir contains a dict {package_name: relativepath}
- # Example {'': 'src', 'foo': 'lib', 'bar': 'lib2'}
- #
- # '' means where to look for any package unless a parent package
- # is listed so package bar.pot is expected at lib2/bar/pot,
- # whereas package sup.dee is expected at src/sup/dee
- #
- # if package_dir does not state anything about a package,
- # setuptool expects the package folder to be in the root of the
- # project
- locations = {}
- allprefix = package_dir.get('', '')
- for pkg in pkgs:
- parent_location = None
- splits = pkg.split('.')
- # we iterate over compound name from parent to child
- # so once we found parent, children just append to their parent
- for key_len in range(len(splits)):
- key = '.'.join(splits[:key_len + 1])
- if key not in locations:
- if key in package_dir:
- locations[key] = package_dir[key]
- elif parent_location is not None:
- locations[key] = parent_location
- else:
- locations[key] = allprefix
- parent_location = locations[key]
- return locations
-
-
-def generate_cmake_file(package_name, version, scripts, package_dir, pkgs, modules):
- """
- Generates lines to add to a cmake file which will set variables
-
- :param version: str, format 'int.int.int'
- :param scripts: [list of str]: relative paths to scripts
- :param package_dir: {modulename: path}
- :pkgs: [list of str] python_packages declared in catkin package
- :modules: [list of str] python modules
- """
- prefix = '%s_SETUP_PY' % package_name
- result = []
- result.append(r'set(%s_VERSION "%s")' % (prefix, version))
- result.append(r'set(%s_SCRIPTS "%s")' % (prefix, ';'.join(scripts)))
-
- # Remove packages with '.' separators.
- #
- # setuptools allows specifying submodules in other folders than
- # their parent
- #
- # The symlink approach of catkin does not work with such submodules.
- # In the common case, this does not matter as the submodule is
- # within the containing module. We verify this assumption, and if
- # it passes, we remove submodule packages.
- locations = _get_locations(pkgs, package_dir)
- for pkgname, location in locations.items():
- if not '.' in pkgname:
- continue
- splits = pkgname.split('.')
- # hack: ignore write-combining setup.py files for msg and srv files
- if splits[1] in ['msg', 'srv']:
- continue
- # check every child has the same root folder as its parent
- parent_name = '.'.join(splits[:1])
- if location != locations[parent_name]:
- raise RuntimeError(
- "catkin_export_python does not support setup.py files that combine across multiple directories: %s in %s, %s in %s" % (pkgname, location, parent_name, locations[parent_name]))
-
- # If checks pass, remove all submodules
- pkgs = [p for p in pkgs if '.' not in p]
-
- resolved_pkgs = []
- for pkg in pkgs:
- resolved_pkgs += [os.path.join(locations[pkg], pkg)]
-
- result.append(r'set(%s_PACKAGES "%s")' % (prefix, ';'.join(pkgs)))
- result.append(r'set(%s_PACKAGE_DIRS "%s")' % (prefix, ';'.join(resolved_pkgs).replace("\\", "/")))
-
- # skip modules which collide with package names
- filtered_modules = []
- for modname in modules:
- splits = modname.split('.')
- # check all parents too
- equals_package = [('.'.join(splits[:-i]) in locations) for i in range(len(splits))]
- if any(equals_package):
- continue
- filtered_modules.append(modname)
- module_locations = _get_locations(filtered_modules, package_dir)
-
- result.append(r'set(%s_MODULES "%s")' % (prefix, ';'.join(['%s.py' % m.replace('.', '/') for m in filtered_modules])))
- result.append(r'set(%s_MODULE_DIRS "%s")' % (prefix, ';'.join([module_locations[m] for m in filtered_modules]).replace("\\", "/")))
-
- return result
-
-
-def _create_mock_setup_function(package_name, outfile):
- """
- Creates a function to call instead of distutils.core.setup or
- setuptools.setup, which just captures some args and writes them
- into a file that can be used from cmake
-
- :param package_name: name of the package
- :param outfile: filename that cmake will use afterwards
- :returns: a function to replace disutils.core.setup and setuptools.setup
- """
-
- def setup(*args, **kwargs):
- '''
- Checks kwargs and writes a scriptfile
- '''
- if 'version' not in kwargs:
- sys.stderr.write("\n*** Unable to find 'version' in setup.py of %s\n" % package_name)
- raise RuntimeError("version not found in setup.py")
- version = kwargs['version']
- package_dir = kwargs.get('package_dir', {})
-
- pkgs = kwargs.get('packages', [])
- scripts = kwargs.get('scripts', [])
- modules = kwargs.get('py_modules', [])
-
- unsupported_args = [
- 'entry_points',
- 'exclude_package_data',
- 'ext_modules ',
- 'ext_package',
- 'include_package_data',
- 'namespace_packages',
- 'setup_requires',
- 'use_2to3',
- 'zip_safe']
- used_unsupported_args = [arg for arg in unsupported_args if arg in kwargs]
- if used_unsupported_args:
- sys.stderr.write("*** Arguments %s to setup() not supported in catkin devel space in setup.py of %s\n" % (used_unsupported_args, package_name))
-
- result = generate_cmake_file(package_name=package_name,
- version=version,
- scripts=scripts,
- package_dir=package_dir,
- pkgs=pkgs,
- modules=modules)
- with open(outfile, 'w') as out:
- out.write('\n'.join(result))
-
- return setup
-
-
-def main():
- """
- Script main, parses arguments and invokes Dummy.setup indirectly.
- """
- parser = ArgumentParser(description='Utility to read setup.py values from cmake macros. Creates a file with CMake set commands setting variables.')
- parser.add_argument('package_name', help='Name of catkin package')
- parser.add_argument('setupfile_path', help='Full path to setup.py')
- parser.add_argument('outfile', help='Where to write result to')
-
- args = parser.parse_args()
-
- # print("%s" % sys.argv)
- # PACKAGE_NAME = sys.argv[1]
- # OUTFILE = sys.argv[3]
- # print("Interrogating setup.py for package %s into %s " % (PACKAGE_NAME, OUTFILE),
- # file=sys.stderr)
-
- # print("executing %s" % args.setupfile_path)
-
- # be sure you're in the directory containing
- # setup.py so the sys.path manipulation works,
- # so the import of __version__ works
- os.chdir(os.path.dirname(os.path.abspath(args.setupfile_path)))
-
- # patch setup() function of distutils and setuptools for the
- # context of evaluating setup.py
- try:
- fake_setup = _create_mock_setup_function(package_name=args.package_name,
- outfile=args.outfile)
-
- distutils_backup = distutils.core.setup
- distutils.core.setup = fake_setup
- try:
- setuptools_backup = setuptools.setup
- setuptools.setup = fake_setup
- except NameError:
- pass
-
- with open(args.setupfile_path, 'r') as fh:
- exec(fh.read())
- finally:
- distutils.core.setup = distutils_backup
- try:
- setuptools.setup = setuptools_backup
- except NameError:
- pass
-
-if __name__ == '__main__':
- main()
diff --git a/cmake/catkin/legacy.cmake b/cmake/catkin/legacy.cmake
deleted file mode 100644
index a4c65c2146..0000000000
--- a/cmake/catkin/legacy.cmake
+++ /dev/null
@@ -1,3 +0,0 @@
-function(catkin_stack)
- message(FATAL_ERROR "catkin_stack() is not supported by catkin as of groovy. Please update the package to the latest catkin version.")
-endfunction()
diff --git a/cmake/catkin/list_append_deduplicate.cmake b/cmake/catkin/list_append_deduplicate.cmake
deleted file mode 100644
index e59a61bb14..0000000000
--- a/cmake/catkin/list_append_deduplicate.cmake
+++ /dev/null
@@ -1,16 +0,0 @@
-#
-# Append elements to a list and remove existing duplicates from the list.
-#
-# .. note:: Using CMake's ``list(APPEND ..)`` and
-# ``list(REMOVE_DUPLICATES ..)`` is not sufficient since its
-# implementation uses a set internally which makes the operation
-# unstable.
-#
-macro(list_append_deduplicate listname)
- if(NOT "${ARGN}" STREQUAL "")
- if(${listname})
- list(REMOVE_ITEM ${listname} ${ARGN})
- endif()
- list(APPEND ${listname} ${ARGN})
- endif()
-endmacro()
diff --git a/cmake/catkin/list_append_unique.cmake b/cmake/catkin/list_append_unique.cmake
deleted file mode 100644
index 4c9bb1df86..0000000000
--- a/cmake/catkin/list_append_unique.cmake
+++ /dev/null
@@ -1,16 +0,0 @@
-#
-# Append elements to a list if they are not already in the list.
-#
-# .. note:: Using CMake's ``list(APPEND ..)`` and
-# ``list(REMOVE_DUPLICATES ..)`` is not sufficient since its
-# implementation uses a set internally which makes the operation
-# unstable.
-#
-macro(list_append_unique listname)
- foreach(_item ${ARGN})
- list(FIND ${listname} ${_item} _index)
- if(_index EQUAL -1)
- list(APPEND ${listname} ${_item})
- endif()
- endforeach()
-endmacro()
diff --git a/cmake/catkin/list_insert_in_workspace_order.cmake b/cmake/catkin/list_insert_in_workspace_order.cmake
deleted file mode 100644
index 57ade4a493..0000000000
--- a/cmake/catkin/list_insert_in_workspace_order.cmake
+++ /dev/null
@@ -1,35 +0,0 @@
-#
-# Insert elements to a list in the same order as the chained catkin workspaces.
-#
-set(CATKIN_ORDERED_SPACES "")
-foreach(_space ${CATKIN_DEVEL_PREFIX} ${CATKIN_WORKSPACES})
- list(APPEND CATKIN_ORDERED_SPACES ${_space})
- if(NOT EXISTS "${_space}/.catkin")
- message(FATAL_ERROR "The path '${_space}' is in CATKIN_WORKSPACES but does not have a .catkin file")
- endif()
- # prepend to existing list of sourcespaces
- file(READ "${_space}/.catkin" _sourcespaces)
- list(APPEND CATKIN_ORDERED_SPACES ${_sourcespaces})
-endforeach()
-
-debug_message(10 "CATKIN_ORDERED_SPACES ${CATKIN_ORDERED_SPACES}")
-
-macro(list_insert_in_workspace_order listname)
- if(NOT "${ARGN}" STREQUAL "")
- assert(CATKIN_ENV)
- assert(PYTHON_EXECUTABLE)
- set(cmd
- ${CATKIN_ENV} ${PYTHON_EXECUTABLE}
- ${catkin_EXTRAS_DIR}/order_paths.py
- ${${PROJECT_NAME}_BINARY_DIR}/catkin_generated/ordered_paths.cmake
- --paths-to-order ${ARGN}
- --prefixes ${CATKIN_ORDERED_SPACES}
- )
- debug_message(10 "list_insert_in_workspace_order() in project '{PROJECT_NAME}' executes: ${cmd}")
- safe_execute_process(COMMAND ${cmd})
- include(${${PROJECT_NAME}_BINARY_DIR}/catkin_generated/ordered_paths.cmake)
- set(${listname} ${ORDERED_PATHS})
- else()
- set(${listname} "")
- endif()
-endmacro()
diff --git a/cmake/catkin/order_paths.py b/cmake/catkin/order_paths.py
deleted file mode 100644
index d2a3eca105..0000000000
--- a/cmake/catkin/order_paths.py
+++ /dev/null
@@ -1,37 +0,0 @@
-#!/usr/bin/env python
-
-from __future__ import print_function
-
-from argparse import ArgumentParser
-import os
-import sys
-
-try:
- from catkin_pkg.workspaces import order_paths
-except ImportError as e:
- sys.exit('ImportError: "from catkin_pkg.package import parse_package" failed: %s\nMake sure that you have installed "catkin_pkg", it is up to date and on the PYTHONPATH.' % e)
-
-
-def main():
- """
- Order a list of paths according to a list of prefixes which define the order.
- """
- parser = ArgumentParser(description='Utility to order a list of paths according to a list of prefixes. Creates a file with CMake set command setting a variable.')
- parser.add_argument('outfile', help='The filename of the generated CMake file')
- parser.add_argument('--paths-to-order', nargs='*', help='The semicolon-separated paths to order')
- parser.add_argument('--prefixes', nargs='*', help='The semicolon-separated prefixes defining the order')
- args = parser.parse_args()
-
- ordered_paths = order_paths(args.paths_to_order, args.prefixes)
-
- # create directory if necessary
- outdir = os.path.dirname(args.outfile)
- if not os.path.exists(outdir):
- os.makedirs(outdir)
-
- with open(args.outfile, 'w') as fh:
- fh.write('set(ORDERED_PATHS "%s")' % ';'.join(ordered_paths))
-
-
-if __name__ == '__main__':
- main()
diff --git a/cmake/catkin/parse_package_xml.py b/cmake/catkin/parse_package_xml.py
deleted file mode 100755
index 71e3e91877..0000000000
--- a/cmake/catkin/parse_package_xml.py
+++ /dev/null
@@ -1,98 +0,0 @@
-#!/usr/bin/env python
-
-# Software License Agreement (BSD License)
-#
-# Copyright (c) 2012, Willow Garage, Inc.
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-#
-# * Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# * Redistributions in binary form must reproduce the above
-# copyright notice, this list of conditions and the following
-# disclaimer in the documentation and/or other materials provided
-# with the distribution.
-# * Neither the name of Willow Garage, Inc. nor the names of its
-# contributors may be used to endorse or promote products derived
-# from this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
-# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
-# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-# POSSIBILITY OF SUCH DAMAGE.
-
-from __future__ import print_function
-import sys
-import argparse
-
-try:
- from catkin_pkg.package import parse_package
-except ImportError as e:
- sys.exit('ImportError: "from catkin_pkg.package import parse_package" failed: %s\nMake sure that you have installed "catkin_pkg", it is up to date and on the PYTHONPATH.' % e)
-
-
-def _get_output(package):
- """
- returns a list of strings with cmake commands to execute to set cmake variables
-
- :param package: Package object
- :returns: list of str, lines to output
- """
- values = {}
- values['VERSION'] = '"%s"' % package.version
-
- values['MAINTAINER'] = '"%s"' % (', '.join([str(m) for m in package.maintainers]))
-
- values.update(_get_dependency_values('BUILD_DEPENDS', package.build_depends))
- values.update(_get_dependency_values('BUILDTOOL_DEPENDS', package.buildtool_depends))
- values.update(_get_dependency_values('RUN_DEPENDS', package.run_depends))
-
- deprecated = [e.content for e in package.exports if e.tagname == 'deprecated']
- values['DEPRECATED'] = '"%s"' % ((deprecated[0] if deprecated[0] else 'TRUE') if deprecated else '')
-
- output = []
- output.append(r'set(_CATKIN_CURRENT_PACKAGE "%s")' % package.name)
- for k, v in values.items():
- output.append('set(%s_%s %s)' % (package.name, k, v))
- return output
-
-def _get_dependency_values(key, depends):
- values = {}
- values[key] = ' '.join(['"%s"' % str(d) for d in depends])
- for d in depends:
- comparisons = ['version_lt', 'version_lte', 'version_eq', 'version_gte', 'version_gt']
- for comp in comparisons:
- value = getattr(d, comp, None)
- if value is not None:
- values['%s_%s_%s' % (key, str(d), comp.upper())] = '"%s"' % value
- return values
-
-
-def main(argv=sys.argv[1:]):
- """
- Reads given package_xml and writes extracted variables to outfile.
- """
- parser = argparse.ArgumentParser(description="Read package.xml and write extracted variables to stdout")
- parser.add_argument('package_xml')
- parser.add_argument('outfile')
- args = parser.parse_args(argv)
- package = parse_package(args.package_xml)
-
- lines = _get_output(package)
- with open(args.outfile, 'w') as ofile:
- ofile.write('\n'.join(lines))
-
-
-if __name__ == '__main__':
- main()
diff --git a/cmake/catkin/platform/lsb.cmake b/cmake/catkin/platform/lsb.cmake
deleted file mode 100644
index 7aca48b5f5..0000000000
--- a/cmake/catkin/platform/lsb.cmake
+++ /dev/null
@@ -1,28 +0,0 @@
-find_program(LSB_RELEASE_EXECUTABLE lsb_release)
-
-if(LSB_RELEASE_EXECUTABLE)
- set(LSB_FOUND TRUE CACHE BOOL "lsb_release executable was found")
- execute_process(COMMAND ${LSB_RELEASE_EXECUTABLE} -si
- OUTPUT_VARIABLE LSB_DISTRIB_ID
- OUTPUT_STRIP_TRAILING_WHITESPACE)
- string(TOUPPER ${LSB_DISTRIB_ID} v)
- set(${v} TRUE CACHE BOOL "LSB Distrib tag")
-
- execute_process(COMMAND ${LSB_RELEASE_EXECUTABLE} -sd
- OUTPUT_VARIABLE LSB_DESCRIPTION
- OUTPUT_STRIP_TRAILING_WHITESPACE)
- execute_process(COMMAND ${LSB_RELEASE_EXECUTABLE} -sr
- OUTPUT_VARIABLE LSB_RELEASE
- OUTPUT_STRIP_TRAILING_WHITESPACE)
- execute_process(COMMAND ${LSB_RELEASE_EXECUTABLE} -sc
- OUTPUT_VARIABLE LSB_CODENAME
- OUTPUT_STRIP_TRAILING_WHITESPACE)
-
- string(TOUPPER ${LSB_DISTRIB_ID} v)
- set(${v} TRUE CACHE BOOL "LSB Distribution")
- #message(STATUS "${v} is on")
-
- string(TOUPPER ${LSB_DISTRIB_ID}_${LSB_CODENAME} v)
- set(${v} TRUE CACHE BOOL "LSB Distrib - codename tag")
- #message(STATUS "${v} is on")
-endif()
diff --git a/cmake/catkin/platform/ubuntu.cmake b/cmake/catkin/platform/ubuntu.cmake
deleted file mode 100644
index 3850736270..0000000000
--- a/cmake/catkin/platform/ubuntu.cmake
+++ /dev/null
@@ -1,4 +0,0 @@
-# requires lsb to be included first
-if(UBUNTU)
- # ubuntu-specifics go here
-endif()
diff --git a/cmake/catkin/platform/windows.cmake b/cmake/catkin/platform/windows.cmake
deleted file mode 100644
index 35e61be15c..0000000000
--- a/cmake/catkin/platform/windows.cmake
+++ /dev/null
@@ -1,56 +0,0 @@
-# BUILD_SHARED_LIBS is a global cmake variable (usually defaults to on)
-# that determines the build type of libraries:
-# http://www.cmake.org/cmake/help/cmake-2-8-docs.html#variable:BUILD_SHARED_LIBS
-# It defaults to shared.
-
-# Make sure this is already defined as a cached variable (@sa tools/libraries.cmake)
-if(NOT DEFINED BUILD_SHARED_LIBS)
- option(BUILD_SHARED_LIBS "Build dynamically-linked binaries" ON)
-endif()
-
-# Windows/cmake make things difficult if building dll's.
-# By default:
-# .dll -> CMAKE_RUNTIME_OUTPUT_DIRECTORY
-# .exe -> CMAKE_RUNTIME_OUTPUT_DIRECTORY
-# .lib -> CMAKE_LIBRARY_OUTPUT_DIRECTORY
-#
-# Subsequently, .dll's and .exe's use the same variable and by
-# default must be installed to the same place. Which is not
-# what we want for catkin. We wish:
-#
-# .dll -> CATKIN_GLOBAL_BIN_DESTINATION
-# .exe -> CATKIN_PACKAGE_BIN_DESTINATION
-# .lib -> CATKIN_PACKAGE_LIB_DESTINATION
-#
-# Since we can't put CMAKE_RUNTIME_OUTPUT_DIRECTORY to
-# two values at once, we have this ugly workaround here.
-#
-# Note - we want to move away from redefining
-# add_library style calls, but necessary until a better solution
-# is available for windows. Alternatives are to set_target_properties
-# on every lib (painful) or to make exe's public (name conflicts
-# bound to arise).
-#
-# Another feature that would be desirable, is to install .pdb's for
-# debugging along with the library. Can't do that here as we do not
-# know for sure if the library target is intended for installation
-# or not. Might a good idea to have a script that searches for all
-# pdb's under CATKIN_DEVEL_PREFIX and copies them over at the end
-# of the cmake build.
-if(BUILD_SHARED_LIBS)
- if(WIN32)
- function(add_library library)
- # Check if its an external, imported library (e.g. boost libs via cmake module definition)
- list(FIND ARGN "IMPORTED" FIND_POS)
- _add_library(${ARGV0} ${ARGN})
- if(${FIND_POS} EQUAL -1)
- set_target_properties(${ARGV0}
- PROPERTIES
- RUNTIME_OUTPUT_DIRECTORY ${CATKIN_DEVEL_PREFIX}/${CATKIN_GLOBAL_BIN_DESTINATION}
- LIBRARY_OUTPUT_DIRECTORY ${CATKIN_DEVEL_PREFIX}/${CATKIN_PACKAGE_LIB_DESTINATION}
- ARCHIVE_OUTPUT_DIRECTORY ${CATKIN_DEVEL_PREFIX}/${CATKIN_PACKAGE_LIB_DESTINATION}
- )
- endif()
- endfunction()
- endif()
-endif()
diff --git a/cmake/catkin/python.cmake b/cmake/catkin/python.cmake
deleted file mode 100644
index c82f31b479..0000000000
--- a/cmake/catkin/python.cmake
+++ /dev/null
@@ -1,41 +0,0 @@
-# the CMake variable PYTHON_INSTALL_DIR has the same value as the Python function catkin.builder.get_python_install_dir()
-
-set(PYTHON_VERSION "" CACHE STRING "Specify specific Python version to use ('major.minor' or 'major')")
-if(PYTHON_VERSION)
- set(PythonInterp_FIND_VERSION "${PYTHON_VERSION}")
-endif()
-
-find_package(PythonInterp REQUIRED)
-#message(STATUS "Using PYTHON_EXECUTABLE: ${PYTHON_EXECUTABLE}")
-
-set(_PYTHON_PATH_VERSION_SUFFIX "${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}")
-
-set(enable_setuptools_deb_layout OFF)
-if(EXISTS "/etc/debian_version")
- set(enable_setuptools_deb_layout ON)
-endif()
-option(SETUPTOOLS_DEB_LAYOUT "Enable debian style python package layout" ${enable_setuptools_deb_layout})
-
-if(SETUPTOOLS_DEB_LAYOUT)
- #message(STATUS "Using Debian Python package layout")
- set(PYTHON_PACKAGES_DIR dist-packages)
- set(SETUPTOOLS_ARG_EXTRA "--install-layout=deb")
- # use major version only when installing 3.x with debian layout
- if("${PYTHON_VERSION_MAJOR}" STREQUAL "3")
- set(_PYTHON_PATH_VERSION_SUFFIX "${PYTHON_VERSION_MAJOR}")
- endif()
-else()
- #message(STATUS "Using default Python package layout")
- set(PYTHON_PACKAGES_DIR site-packages)
- # setuptools is fussy about windows paths, make sure the install prefix is in native format
- file(TO_NATIVE_PATH "${CMAKE_INSTALL_PREFIX}" SETUPTOOLS_INSTALL_PREFIX)
-endif()
-
-if(NOT WIN32)
- set(PYTHON_INSTALL_DIR lib/python${_PYTHON_PATH_VERSION_SUFFIX}/${PYTHON_PACKAGES_DIR}
- CACHE INTERNAL "This needs to be in PYTHONPATH when 'setup.py install' is called. And it needs to match. But setuptools won't tell us where it will install things.")
-else()
- # Windows setuptools installs to lib/site-packages not lib/python2.7/site-packages
- set(PYTHON_INSTALL_DIR lib/${PYTHON_PACKAGES_DIR}
- CACHE INTERNAL "This needs to be in PYTHONPATH when 'setup.py install' is called. And it needs to match. But setuptools won't tell us where it will install things.")
-endif()
diff --git a/cmake/catkin/safe_execute_process.cmake b/cmake/catkin/safe_execute_process.cmake
deleted file mode 100644
index 3f6ea9aad4..0000000000
--- a/cmake/catkin/safe_execute_process.cmake
+++ /dev/null
@@ -1,13 +0,0 @@
-macro(safe_execute_process cmd_keyword arg1)
- set(_cmd ${arg1})
- foreach(_arg ${ARGN})
- set(_cmd "${_cmd} \"${_arg}\"")
- endforeach()
-
- debug_message(2 "execute_process(${_cmd})")
- execute_process(${ARGV} RESULT_VARIABLE _res)
-
- if(NOT _res EQUAL 0)
- message(FATAL_ERROR "execute_process(${_cmd}) returned error code ${_res}")
- endif()
-endmacro()
diff --git a/cmake/catkin/shell.cmake b/cmake/catkin/shell.cmake
deleted file mode 100644
index 4b150d419e..0000000000
--- a/cmake/catkin/shell.cmake
+++ /dev/null
@@ -1,17 +0,0 @@
-function(shell arg1)
- set(cmd ${arg1})
- foreach(arg ${ARGN})
- set(cmd "${cmd} ${arg}")
- endforeach()
-
- execute_process(COMMAND ${arg1} ${ARGN}
- RESULT_VARIABLE res
- OUTPUT_VARIABLE out
- ERROR_VARIABLE out)
-
- if(res EQUAL 0)
- debug_message(2 "execute_process(${cmd}) succeeded returning: ${out}")
- else()
- message(FATAL_ERROR "execute_process(${cmd})\n***FAILED with ERROR:***\n${out}")
- endif()
-endfunction()
diff --git a/cmake/catkin/stamp.cmake b/cmake/catkin/stamp.cmake
deleted file mode 100644
index 91de185de5..0000000000
--- a/cmake/catkin/stamp.cmake
+++ /dev/null
@@ -1,13 +0,0 @@
-#
-# :param path: file name
-#
-# Uses ``configure_file`` to generate a file ``filepath.stamp`` hidden
-# somewhere in the build tree. This will cause cmake to rebuild its
-# cache when ``filepath`` is modified.
-#
-function(stamp path)
- get_filename_component(filename "${path}" NAME)
- configure_file(${path}
- ${CMAKE_CURRENT_BINARY_DIR}/catkin_generated/stamps/${PROJECT_NAME}/${filename}.stamp
- COPYONLY)
-endfunction()
diff --git a/cmake/catkin/string_starts_with.cmake b/cmake/catkin/string_starts_with.cmake
deleted file mode 100644
index 85483ec9e7..0000000000
--- a/cmake/catkin/string_starts_with.cmake
+++ /dev/null
@@ -1,22 +0,0 @@
-#
-# Check if a string starts with a prefix.
-#
-# :param str: the string
-# :type str: string
-# :param prefix: the prefix
-# :type prefix: string
-# :param var: the output variable name
-# :type var: bool
-#
-function(string_starts_with str prefix var)
- string(LENGTH "${str}" str_length)
- string(LENGTH "${prefix}" prefix_length)
- set(value FALSE)
- if(NOT ${str_length} LESS ${prefix_length})
- string(SUBSTRING "${str}" 0 ${prefix_length} str_prefix)
- if("${str_prefix}" STREQUAL "${prefix}")
- set(value TRUE)
- endif()
- endif()
- set(${var} ${value} PARENT_SCOPE)
-endfunction()
diff --git a/cmake/catkin/templates/Doxyfile.in b/cmake/catkin/templates/Doxyfile.in
deleted file mode 100644
index f64c9bdff0..0000000000
--- a/cmake/catkin/templates/Doxyfile.in
+++ /dev/null
@@ -1,1630 +0,0 @@
-# Doxyfile 1.7.1
-# generated from catkin/cmake/template/Doxyfile.in
-# This file describes the settings to be used by the documentation system
-# doxygen (www.doxygen.org) for a project
-#
-# All text after a hash (#) is considered a comment and will be ignored
-# The format is:
-# TAG = value [value, ...]
-# For lists items can also be appended using:
-# TAG += value [value, ...]
-# Values that contain spaces should be placed between quotes (" ")
-
-#---------------------------------------------------------------------------
-# Project related configuration options
-#---------------------------------------------------------------------------
-
-# This tag specifies the encoding used for all characters in the config file
-# that follow. The default is UTF-8 which is also the encoding used for all
-# text before the first occurrence of this tag. Doxygen uses libiconv (or the
-# iconv built into libc) for the transcoding. See
-# http://www.gnu.org/software/libiconv for the list of possible encodings.
-
-DOXYFILE_ENCODING = UTF-8
-
-# The PROJECT_NAME tag is a single word (or a sequence of words surrounded
-# by quotes) that should identify the project.
-
-PROJECT_NAME = @PROJECT_NAME@
-
-# The PROJECT_NUMBER tag can be used to enter a project or revision number.
-# This could be handy for archiving the generated documentation or
-# if some version control system is used.
-
-PROJECT_NUMBER = @PACKAGE_VERSION@
-
-# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute)
-# base path where the generated documentation will be put.
-# If a relative path is entered, it will be relative to the location
-# where doxygen was started. If left blank the current directory will be used.
-
-OUTPUT_DIRECTORY = api
-
-# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create
-# 4096 sub-directories (in 2 levels) under the output directory of each output
-# format and will distribute the generated files over these directories.
-# Enabling this option can be useful when feeding doxygen a huge amount of
-# source files, where putting all generated files in the same directory would
-# otherwise cause performance problems for the file system.
-
-CREATE_SUBDIRS = NO
-
-# The OUTPUT_LANGUAGE tag is used to specify the language in which all
-# documentation generated by doxygen is written. Doxygen will use this
-# information to generate all constant output in the proper language.
-# The default language is English, other supported languages are:
-# Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional,
-# Croatian, Czech, Danish, Dutch, Esperanto, Farsi, Finnish, French, German,
-# Greek, Hungarian, Italian, Japanese, Japanese-en (Japanese with English
-# messages), Korean, Korean-en, Lithuanian, Norwegian, Macedonian, Persian,
-# Polish, Portuguese, Romanian, Russian, Serbian, Serbian-Cyrilic, Slovak,
-# Slovene, Spanish, Swedish, Ukrainian, and Vietnamese.
-
-OUTPUT_LANGUAGE = English
-
-# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will
-# include brief member descriptions after the members that are listed in
-# the file and class documentation (similar to JavaDoc).
-# Set to NO to disable this.
-
-BRIEF_MEMBER_DESC = YES
-
-# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend
-# the brief description of a member or function before the detailed description.
-# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the
-# brief descriptions will be completely suppressed.
-
-REPEAT_BRIEF = YES
-
-# This tag implements a quasi-intelligent brief description abbreviator
-# that is used to form the text in various listings. Each string
-# in this list, if found as the leading text of the brief description, will be
-# stripped from the text and the result after processing the whole list, is
-# used as the annotated text. Otherwise, the brief description is used as-is.
-# If left blank, the following values are used ("$name" is automatically
-# replaced with the name of the entity): "The $name class" "The $name widget"
-# "The $name file" "is" "provides" "specifies" "contains"
-# "represents" "a" "an" "the"
-
-ABBREVIATE_BRIEF =
-
-# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then
-# Doxygen will generate a detailed section even if there is only a brief
-# description.
-
-ALWAYS_DETAILED_SEC = NO
-
-# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all
-# inherited members of a class in the documentation of that class as if those
-# members were ordinary class members. Constructors, destructors and assignment
-# operators of the base classes will not be shown.
-
-INLINE_INHERITED_MEMB = NO
-
-# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full
-# path before files name in the file list and in the header files. If set
-# to NO the shortest path that makes the file name unique will be used.
-
-FULL_PATH_NAMES = YES
-
-# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag
-# can be used to strip a user-defined part of the path. Stripping is
-# only done if one of the specified strings matches the left-hand part of
-# the path. The tag can be used to show relative paths in the file list.
-# If left blank the directory from which doxygen is run is used as the
-# path to strip.
-
-STRIP_FROM_PATH =
-
-# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of
-# the path mentioned in the documentation of a class, which tells
-# the reader which header file to include in order to use a class.
-# If left blank only the name of the header file containing the class
-# definition is used. Otherwise one should specify the include paths that
-# are normally passed to the compiler using the -I flag.
-
-STRIP_FROM_INC_PATH =
-
-# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter
-# (but less readable) file names. This can be useful is your file systems
-# doesn't support long names like on DOS, Mac, or CD-ROM.
-
-SHORT_NAMES = NO
-
-# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen
-# will interpret the first line (until the first dot) of a JavaDoc-style
-# comment as the brief description. If set to NO, the JavaDoc
-# comments will behave just like regular Qt-style comments
-# (thus requiring an explicit @brief command for a brief description.)
-
-JAVADOC_AUTOBRIEF = NO
-
-# If the QT_AUTOBRIEF tag is set to YES then Doxygen will
-# interpret the first line (until the first dot) of a Qt-style
-# comment as the brief description. If set to NO, the comments
-# will behave just like regular Qt-style comments (thus requiring
-# an explicit \brief command for a brief description.)
-
-QT_AUTOBRIEF = NO
-
-# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen
-# treat a multi-line C++ special comment block (i.e. a block of //! or ///
-# comments) as a brief description. This used to be the default behaviour.
-# The new default is to treat a multi-line C++ comment block as a detailed
-# description. Set this tag to YES if you prefer the old behaviour instead.
-
-MULTILINE_CPP_IS_BRIEF = NO
-
-# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented
-# member inherits the documentation from any documented member that it
-# re-implements.
-
-INHERIT_DOCS = YES
-
-# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce
-# a new page for each member. If set to NO, the documentation of a member will
-# be part of the file/class/namespace that contains it.
-
-SEPARATE_MEMBER_PAGES = NO
-
-# The TAB_SIZE tag can be used to set the number of spaces in a tab.
-# Doxygen uses this value to replace tabs by spaces in code fragments.
-
-TAB_SIZE = 4
-
-# This tag can be used to specify a number of aliases that acts
-# as commands in the documentation. An alias has the form "name=value".
-# For example adding "sideeffect=\par Side Effects:\n" will allow you to
-# put the command \sideeffect (or @sideeffect) in the documentation, which
-# will result in a user-defined paragraph with heading "Side Effects:".
-# You can put \n's in the value part of an alias to insert newlines.
-
-ALIASES =
-
-# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C
-# sources only. Doxygen will then generate output that is more tailored for C.
-# For instance, some of the names that are used will be different. The list
-# of all members will be omitted, etc.
-
-OPTIMIZE_OUTPUT_FOR_C = NO
-
-# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java
-# sources only. Doxygen will then generate output that is more tailored for
-# Java. For instance, namespaces will be presented as packages, qualified
-# scopes will look different, etc.
-
-OPTIMIZE_OUTPUT_JAVA = NO
-
-# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran
-# sources only. Doxygen will then generate output that is more tailored for
-# Fortran.
-
-OPTIMIZE_FOR_FORTRAN = NO
-
-# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL
-# sources. Doxygen will then generate output that is tailored for
-# VHDL.
-
-OPTIMIZE_OUTPUT_VHDL = NO
-
-# Doxygen selects the parser to use depending on the extension of the files it
-# parses. With this tag you can assign which parser to use for a given extension.
-# Doxygen has a built-in mapping, but you can override or extend it using this
-# tag. The format is ext=language, where ext is a file extension, and language
-# is one of the parsers supported by doxygen: IDL, Java, Javascript, CSharp, C,
-# C++, D, PHP, Objective-C, Python, Fortran, VHDL, C, C++. For instance to make
-# doxygen treat .inc files as Fortran files (default is PHP), and .f files as C
-# (default is Fortran), use: inc=Fortran f=C. Note that for custom extensions
-# you also need to set FILE_PATTERNS otherwise the files are not read by doxygen.
-
-EXTENSION_MAPPING =
-
-# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want
-# to include (a tag file for) the STL sources as input, then you should
-# set this tag to YES in order to let doxygen match functions declarations and
-# definitions whose arguments contain STL classes (e.g. func(std::string); v.s.
-# func(std::string) {}). This also make the inheritance and collaboration
-# diagrams that involve STL classes more complete and accurate.
-
-BUILTIN_STL_SUPPORT = NO
-
-# If you use Microsoft's C++/CLI language, you should set this option to YES to
-# enable parsing support.
-
-CPP_CLI_SUPPORT = NO
-
-# Set the SIP_SUPPORT tag to YES if your project consists of sip sources only.
-# Doxygen will parse them like normal C++ but will assume all classes use public
-# instead of private inheritance when no explicit protection keyword is present.
-
-SIP_SUPPORT = NO
-
-# For Microsoft's IDL there are propget and propput attributes to indicate getter
-# and setter methods for a property. Setting this option to YES (the default)
-# will make doxygen to replace the get and set methods by a property in the
-# documentation. This will only work if the methods are indeed getting or
-# setting a simple type. If this is not the case, or you want to show the
-# methods anyway, you should set this option to NO.
-
-IDL_PROPERTY_SUPPORT = YES
-
-# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC
-# tag is set to YES, then doxygen will reuse the documentation of the first
-# member in the group (if any) for the other members of the group. By default
-# all members of a group must be documented explicitly.
-
-DISTRIBUTE_GROUP_DOC = NO
-
-# Set the SUBGROUPING tag to YES (the default) to allow class member groups of
-# the same type (for instance a group of public functions) to be put as a
-# subgroup of that type (e.g. under the Public Functions section). Set it to
-# NO to prevent subgrouping. Alternatively, this can be done per class using
-# the \nosubgrouping command.
-
-SUBGROUPING = YES
-
-# When TYPEDEF_HIDES_STRUCT is enabled, a typedef of a struct, union, or enum
-# is documented as struct, union, or enum with the name of the typedef. So
-# typedef struct TypeS {} TypeT, will appear in the documentation as a struct
-# with name TypeT. When disabled the typedef will appear as a member of a file,
-# namespace, or class. And the struct will be named TypeS. This can typically
-# be useful for C code in case the coding convention dictates that all compound
-# types are typedef'ed and only the typedef is referenced, never the tag name.
-
-TYPEDEF_HIDES_STRUCT = NO
-
-# The SYMBOL_CACHE_SIZE determines the size of the internal cache use to
-# determine which symbols to keep in memory and which to flush to disk.
-# When the cache is full, less often used symbols will be written to disk.
-# For small to medium size projects (<1000 input files) the default value is
-# probably good enough. For larger projects a too small cache size can cause
-# doxygen to be busy swapping symbols to and from disk most of the time
-# causing a significant performance penality.
-# If the system has enough physical memory increasing the cache will improve the
-# performance by keeping more symbols in memory. Note that the value works on
-# a logarithmic scale so increasing the size by one will rougly double the
-# memory usage. The cache size is given by this formula:
-# 2^(16+SYMBOL_CACHE_SIZE). The valid range is 0..9, the default is 0,
-# corresponding to a cache size of 2^16 = 65536 symbols
-
-SYMBOL_CACHE_SIZE = 0
-
-#---------------------------------------------------------------------------
-# Build related configuration options
-#---------------------------------------------------------------------------
-
-# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in
-# documentation are documented, even if no documentation was available.
-# Private class members and static file members will be hidden unless
-# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES
-
-EXTRACT_ALL = YES
-
-# If the EXTRACT_PRIVATE tag is set to YES all private members of a class
-# will be included in the documentation.
-
-EXTRACT_PRIVATE = YES
-
-# If the EXTRACT_STATIC tag is set to YES all static members of a file
-# will be included in the documentation.
-
-EXTRACT_STATIC = YES
-
-# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs)
-# defined locally in source files will be included in the documentation.
-# If set to NO only classes defined in header files are included.
-
-EXTRACT_LOCAL_CLASSES = YES
-
-# This flag is only useful for Objective-C code. When set to YES local
-# methods, which are defined in the implementation section but not in
-# the interface are included in the documentation.
-# If set to NO (the default) only methods in the interface are included.
-
-EXTRACT_LOCAL_METHODS = NO
-
-# If this flag is set to YES, the members of anonymous namespaces will be
-# extracted and appear in the documentation as a namespace called
-# 'anonymous_namespace{file}', where file will be replaced with the base
-# name of the file that contains the anonymous namespace. By default
-# anonymous namespace are hidden.
-
-EXTRACT_ANON_NSPACES = NO
-
-# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all
-# undocumented members of documented classes, files or namespaces.
-# If set to NO (the default) these members will be included in the
-# various overviews, but no documentation section is generated.
-# This option has no effect if EXTRACT_ALL is enabled.
-
-HIDE_UNDOC_MEMBERS = NO
-
-# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all
-# undocumented classes that are normally visible in the class hierarchy.
-# If set to NO (the default) these classes will be included in the various
-# overviews. This option has no effect if EXTRACT_ALL is enabled.
-
-HIDE_UNDOC_CLASSES = NO
-
-# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all
-# friend (class|struct|union) declarations.
-# If set to NO (the default) these declarations will be included in the
-# documentation.
-
-HIDE_FRIEND_COMPOUNDS = NO
-
-# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any
-# documentation blocks found inside the body of a function.
-# If set to NO (the default) these blocks will be appended to the
-# function's detailed documentation block.
-
-HIDE_IN_BODY_DOCS = NO
-
-# The INTERNAL_DOCS tag determines if documentation
-# that is typed after a \internal command is included. If the tag is set
-# to NO (the default) then the documentation will be excluded.
-# Set it to YES to include the internal documentation.
-
-INTERNAL_DOCS = NO
-
-# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate
-# file names in lower-case letters. If set to YES upper-case letters are also
-# allowed. This is useful if you have classes or files whose names only differ
-# in case and if your file system supports case sensitive file names. Windows
-# and Mac users are advised to set this option to NO.
-
-CASE_SENSE_NAMES = YES
-
-# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen
-# will show members with their full class and namespace scopes in the
-# documentation. If set to YES the scope will be hidden.
-
-HIDE_SCOPE_NAMES = NO
-
-# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen
-# will put a list of the files that are included by a file in the documentation
-# of that file.
-
-SHOW_INCLUDE_FILES = YES
-
-# If the FORCE_LOCAL_INCLUDES tag is set to YES then Doxygen
-# will list include files with double quotes in the documentation
-# rather than with sharp brackets.
-
-FORCE_LOCAL_INCLUDES = NO
-
-# If the INLINE_INFO tag is set to YES (the default) then a tag [inline]
-# is inserted in the documentation for inline members.
-
-INLINE_INFO = YES
-
-# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen
-# will sort the (detailed) documentation of file and class members
-# alphabetically by member name. If set to NO the members will appear in
-# declaration order.
-
-SORT_MEMBER_DOCS = YES
-
-# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the
-# brief documentation of file, namespace and class members alphabetically
-# by member name. If set to NO (the default) the members will appear in
-# declaration order.
-
-SORT_BRIEF_DOCS = NO
-
-# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen
-# will sort the (brief and detailed) documentation of class members so that
-# constructors and destructors are listed first. If set to NO (the default)
-# the constructors will appear in the respective orders defined by
-# SORT_MEMBER_DOCS and SORT_BRIEF_DOCS.
-# This tag will be ignored for brief docs if SORT_BRIEF_DOCS is set to NO
-# and ignored for detailed docs if SORT_MEMBER_DOCS is set to NO.
-
-SORT_MEMBERS_CTORS_1ST = NO
-
-# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the
-# hierarchy of group names into alphabetical order. If set to NO (the default)
-# the group names will appear in their defined order.
-
-SORT_GROUP_NAMES = NO
-
-# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be
-# sorted by fully-qualified names, including namespaces. If set to
-# NO (the default), the class list will be sorted only by class name,
-# not including the namespace part.
-# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES.
-# Note: This option applies only to the class list, not to the
-# alphabetical list.
-
-SORT_BY_SCOPE_NAME = NO
-
-# The GENERATE_TODOLIST tag can be used to enable (YES) or
-# disable (NO) the todo list. This list is created by putting \todo
-# commands in the documentation.
-
-GENERATE_TODOLIST = YES
-
-# The GENERATE_TESTLIST tag can be used to enable (YES) or
-# disable (NO) the test list. This list is created by putting \test
-# commands in the documentation.
-
-GENERATE_TESTLIST = YES
-
-# The GENERATE_BUGLIST tag can be used to enable (YES) or
-# disable (NO) the bug list. This list is created by putting \bug
-# commands in the documentation.
-
-GENERATE_BUGLIST = YES
-
-# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or
-# disable (NO) the deprecated list. This list is created by putting
-# \deprecated commands in the documentation.
-
-GENERATE_DEPRECATEDLIST = YES
-
-# The ENABLED_SECTIONS tag can be used to enable conditional
-# documentation sections, marked by \if sectionname ... \endif.
-
-ENABLED_SECTIONS =
-
-# The MAX_INITIALIZER_LINES tag determines the maximum number of lines
-# the initial value of a variable or define consists of for it to appear in
-# the documentation. If the initializer consists of more lines than specified
-# here it will be hidden. Use a value of 0 to hide initializers completely.
-# The appearance of the initializer of individual variables and defines in the
-# documentation can be controlled using \showinitializer or \hideinitializer
-# command in the documentation regardless of this setting.
-
-MAX_INITIALIZER_LINES = 30
-
-# Set the SHOW_USED_FILES tag to NO to disable the list of files generated
-# at the bottom of the documentation of classes and structs. If set to YES the
-# list will mention the files that were used to generate the documentation.
-
-SHOW_USED_FILES = YES
-
-# If the sources in your project are distributed over multiple directories
-# then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy
-# in the documentation. The default is NO.
-
-SHOW_DIRECTORIES = NO
-
-# Set the SHOW_FILES tag to NO to disable the generation of the Files page.
-# This will remove the Files entry from the Quick Index and from the
-# Folder Tree View (if specified). The default is YES.
-
-SHOW_FILES = YES
-
-# Set the SHOW_NAMESPACES tag to NO to disable the generation of the
-# Namespaces page.
-# This will remove the Namespaces entry from the Quick Index
-# and from the Folder Tree View (if specified). The default is YES.
-
-SHOW_NAMESPACES = YES
-
-# The FILE_VERSION_FILTER tag can be used to specify a program or script that
-# doxygen should invoke to get the current version for each file (typically from
-# the version control system). Doxygen will invoke the program by executing (via
-# popen()) the command , where is the value of
-# the FILE_VERSION_FILTER tag, and is the name of an input file
-# provided by doxygen. Whatever the program writes to standard output
-# is used as the file version. See the manual for examples.
-
-FILE_VERSION_FILTER =
-
-# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed
-# by doxygen. The layout file controls the global structure of the generated
-# output files in an output format independent way. The create the layout file
-# that represents doxygen's defaults, run doxygen with the -l option.
-# You can optionally specify a file name after the option, if omitted
-# DoxygenLayout.xml will be used as the name of the layout file.
-
-LAYOUT_FILE =
-
-#---------------------------------------------------------------------------
-# configuration options related to warning and progress messages
-#---------------------------------------------------------------------------
-
-# The QUIET tag can be used to turn on/off the messages that are generated
-# by doxygen. Possible values are YES and NO. If left blank NO is used.
-
-QUIET = NO
-
-# The WARNINGS tag can be used to turn on/off the warning messages that are
-# generated by doxygen. Possible values are YES and NO. If left blank
-# NO is used.
-
-WARNINGS = YES
-
-# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings
-# for undocumented members. If EXTRACT_ALL is set to YES then this flag will
-# automatically be disabled.
-
-WARN_IF_UNDOCUMENTED = YES
-
-# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for
-# potential errors in the documentation, such as not documenting some
-# parameters in a documented function, or documenting parameters that
-# don't exist or using markup commands wrongly.
-
-WARN_IF_DOC_ERROR = YES
-
-# This WARN_NO_PARAMDOC option can be abled to get warnings for
-# functions that are documented, but have no documentation for their parameters
-# or return value. If set to NO (the default) doxygen will only warn about
-# wrong or incomplete parameter documentation, but not about the absence of
-# documentation.
-
-WARN_NO_PARAMDOC = NO
-
-# The WARN_FORMAT tag determines the format of the warning messages that
-# doxygen can produce. The string should contain the $file, $line, and $text
-# tags, which will be replaced by the file and line number from which the
-# warning originated and the warning text. Optionally the format may contain
-# $version, which will be replaced by the version of the file (if it could
-# be obtained via FILE_VERSION_FILTER)
-
-WARN_FORMAT = "$file:$line: $text"
-
-# The WARN_LOGFILE tag can be used to specify a file to which warning
-# and error messages should be written. If left blank the output is written
-# to stderr.
-
-WARN_LOGFILE =
-
-#---------------------------------------------------------------------------
-# configuration options related to the input files
-#---------------------------------------------------------------------------
-
-# The INPUT tag can be used to specify the files and/or directories that contain
-# documented source files. You may enter file names like "myfile.cpp" or
-# directories like "/usr/src/myproject". Separate the files or directories
-# with spaces.
-
-INPUT = @doc_sources@
-
-# This tag can be used to specify the character encoding of the source files
-# that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is
-# also the default input encoding. Doxygen uses libiconv (or the iconv built
-# into libc) for the transcoding. See http://www.gnu.org/software/libiconv for
-# the list of possible encodings.
-
-INPUT_ENCODING = UTF-8
-
-# If the value of the INPUT tag contains directories, you can use the
-# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
-# and *.h) to filter out the source-files in the directories. If left
-# blank the following patterns are tested:
-# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx
-# *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.py *.f90
-
-FILE_PATTERNS = *.hpp
-
-# The RECURSIVE tag can be used to turn specify whether or not subdirectories
-# should be searched for input files as well. Possible values are YES and NO.
-# If left blank NO is used.
-
-RECURSIVE = YES
-
-# The EXCLUDE tag can be used to specify files and/or directories that should
-# excluded from the INPUT source files. This way you can easily exclude a
-# subdirectory from a directory tree whose root is specified with the INPUT tag.
-
-EXCLUDE =
-
-# The EXCLUDE_SYMLINKS tag can be used select whether or not files or
-# directories that are symbolic links (a Unix filesystem feature) are excluded
-# from the input.
-
-EXCLUDE_SYMLINKS = NO
-
-# If the value of the INPUT tag contains directories, you can use the
-# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude
-# certain files from those directories. Note that the wildcards are matched
-# against the file with absolute path, so to exclude all test directories
-# for example use the pattern */test/*
-
-EXCLUDE_PATTERNS =
-
-# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names
-# (namespaces, classes, functions, etc.) that should be excluded from the
-# output. The symbol name can be a fully qualified name, a word, or if the
-# wildcard * is used, a substring. Examples: ANamespace, AClass,
-# AClass::ANamespace, ANamespace::*Test
-
-EXCLUDE_SYMBOLS =
-
-# The EXAMPLE_PATH tag can be used to specify one or more files or
-# directories that contain example code fragments that are included (see
-# the \include command).
-
-EXAMPLE_PATH =
-
-# If the value of the EXAMPLE_PATH tag contains directories, you can use the
-# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
-# and *.h) to filter out the source-files in the directories. If left
-# blank all files are included.
-
-EXAMPLE_PATTERNS =
-
-# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be
-# searched for input files to be used with the \include or \dontinclude
-# commands irrespective of the value of the RECURSIVE tag.
-# Possible values are YES and NO. If left blank NO is used.
-
-EXAMPLE_RECURSIVE = NO
-
-# The IMAGE_PATH tag can be used to specify one or more files or
-# directories that contain image that are included in the documentation (see
-# the \image command).
-
-IMAGE_PATH =
-
-# The INPUT_FILTER tag can be used to specify a program that doxygen should
-# invoke to filter for each input file. Doxygen will invoke the filter program
-# by executing (via popen()) the command , where
-# is the value of the INPUT_FILTER tag, and is the name of an
-# input file. Doxygen will then use the output that the filter program writes
-# to standard output.
-# If FILTER_PATTERNS is specified, this tag will be
-# ignored.
-
-# INPUT_FILTER = *.hpp
-
-# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern
-# basis.
-# Doxygen will compare the file name with each pattern and apply the
-# filter if there is a match.
-# The filters are a list of the form:
-# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further
-# info on how filters are used. If FILTER_PATTERNS is empty, INPUT_FILTER
-# is applied to all files.
-
-# FILTER_PATTERNS = *.py=/usr/bin/doxypy
-
-# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using
-# INPUT_FILTER) will be used to filter the input files when producing source
-# files to browse (i.e. when SOURCE_BROWSER is set to YES).
-
-FILTER_SOURCE_FILES = YES
-
-#---------------------------------------------------------------------------
-# configuration options related to source browsing
-#---------------------------------------------------------------------------
-
-# If the SOURCE_BROWSER tag is set to YES then a list of source files will
-# be generated. Documented entities will be cross-referenced with these sources.
-# Note: To get rid of all source code in the generated output, make sure also
-# VERBATIM_HEADERS is set to NO.
-
-SOURCE_BROWSER = NO
-
-# Setting the INLINE_SOURCES tag to YES will include the body
-# of functions and classes directly in the documentation.
-
-INLINE_SOURCES = NO
-
-# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct
-# doxygen to hide any special comment blocks from generated source code
-# fragments. Normal C and C++ comments will always remain visible.
-
-STRIP_CODE_COMMENTS = YES
-
-# If the REFERENCED_BY_RELATION tag is set to YES
-# then for each documented function all documented
-# functions referencing it will be listed.
-
-REFERENCED_BY_RELATION = NO
-
-# If the REFERENCES_RELATION tag is set to YES
-# then for each documented function all documented entities
-# called/used by that function will be listed.
-
-REFERENCES_RELATION = NO
-
-# If the REFERENCES_LINK_SOURCE tag is set to YES (the default)
-# and SOURCE_BROWSER tag is set to YES, then the hyperlinks from
-# functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will
-# link to the source code.
-# Otherwise they will link to the documentation.
-
-REFERENCES_LINK_SOURCE = YES
-
-# If the USE_HTAGS tag is set to YES then the references to source code
-# will point to the HTML generated by the htags(1) tool instead of doxygen
-# built-in source browser. The htags tool is part of GNU's global source
-# tagging system (see http://www.gnu.org/software/global/global.html). You
-# will need version 4.8.6 or higher.
-
-USE_HTAGS = NO
-
-# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen
-# will generate a verbatim copy of the header file for each class for
-# which an include is specified. Set to NO to disable this.
-
-VERBATIM_HEADERS = YES
-
-#---------------------------------------------------------------------------
-# configuration options related to the alphabetical class index
-#---------------------------------------------------------------------------
-
-# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index
-# of all compounds will be generated. Enable this if the project
-# contains a lot of classes, structs, unions or interfaces.
-
-ALPHABETICAL_INDEX = YES
-
-# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then
-# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns
-# in which this list will be split (can be a number in the range [1..20])
-
-COLS_IN_ALPHA_INDEX = 5
-
-# In case all classes in a project start with a common prefix, all
-# classes will be put under the same header in the alphabetical index.
-# The IGNORE_PREFIX tag can be used to specify one or more prefixes that
-# should be ignored while generating the index headers.
-
-IGNORE_PREFIX =
-
-#---------------------------------------------------------------------------
-# configuration options related to the HTML output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_HTML tag is set to YES (the default) Doxygen will
-# generate HTML output.
-
-GENERATE_HTML = YES
-
-# The HTML_OUTPUT tag is used to specify where the HTML docs will be put.
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be
-# put in front of it. If left blank `html' will be used as the default path.
-
-HTML_OUTPUT = html
-
-# The HTML_FILE_EXTENSION tag can be used to specify the file extension for
-# each generated HTML page (for example: .htm,.php,.asp). If it is left blank
-# doxygen will generate files with .html extension.
-
-HTML_FILE_EXTENSION = .html
-
-# The HTML_HEADER tag can be used to specify a personal HTML header for
-# each generated HTML page. If it is left blank doxygen will generate a
-# standard header.
-
-HTML_HEADER =
-
-# The HTML_FOOTER tag can be used to specify a personal HTML footer for
-# each generated HTML page. If it is left blank doxygen will generate a
-# standard footer.
-
-HTML_FOOTER =
-
-# The HTML_STYLESHEET tag can be used to specify a user-defined cascading
-# style sheet that is used by each HTML page. It can be used to
-# fine-tune the look of the HTML output. If the tag is left blank doxygen
-# will generate a default style sheet. Note that doxygen will try to copy
-# the style sheet file to the HTML output directory, so don't put your own
-# stylesheet in the HTML output directory as well, or it will be erased!
-
-HTML_STYLESHEET =
-
-# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output.
-# Doxygen will adjust the colors in the stylesheet and background images
-# according to this color. Hue is specified as an angle on a colorwheel,
-# see http://en.wikipedia.org/wiki/Hue for more information.
-# For instance the value 0 represents red, 60 is yellow, 120 is green,
-# 180 is cyan, 240 is blue, 300 purple, and 360 is red again.
-# The allowed range is 0 to 359.
-
-HTML_COLORSTYLE_HUE = 220
-
-# The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of
-# the colors in the HTML output. For a value of 0 the output will use
-# grayscales only. A value of 255 will produce the most vivid colors.
-
-HTML_COLORSTYLE_SAT = 100
-
-# The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to
-# the luminance component of the colors in the HTML output. Values below
-# 100 gradually make the output lighter, whereas values above 100 make
-# the output darker. The value divided by 100 is the actual gamma applied,
-# so 80 represents a gamma of 0.8, The value 220 represents a gamma of 2.2,
-# and 100 does not change the gamma.
-
-HTML_COLORSTYLE_GAMMA = 80
-
-# If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML
-# page will contain the date and time when the page was generated. Setting
-# this to NO can help when comparing the output of multiple runs.
-
-HTML_TIMESTAMP = YES
-
-# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes,
-# files or namespaces will be aligned in HTML using tables. If set to
-# NO a bullet list will be used.
-
-HTML_ALIGN_MEMBERS = YES
-
-# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML
-# documentation will contain sections that can be hidden and shown after the
-# page has loaded. For this to work a browser that supports
-# JavaScript and DHTML is required (for instance Mozilla 1.0+, Firefox
-# Netscape 6.0+, Internet explorer 5.0+, Konqueror, or Safari).
-
-HTML_DYNAMIC_SECTIONS = NO
-
-# If the GENERATE_DOCSET tag is set to YES, additional index files
-# will be generated that can be used as input for Apple's Xcode 3
-# integrated development environment, introduced with OSX 10.5 (Leopard).
-# To create a documentation set, doxygen will generate a Makefile in the
-# HTML output directory. Running make will produce the docset in that
-# directory and running "make install" will install the docset in
-# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find
-# it at startup.
-# See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html
-# for more information.
-
-GENERATE_DOCSET = NO
-
-# When GENERATE_DOCSET tag is set to YES, this tag determines the name of the
-# feed. A documentation feed provides an umbrella under which multiple
-# documentation sets from a single provider (such as a company or product suite)
-# can be grouped.
-
-DOCSET_FEEDNAME = "Doxygen generated docs"
-
-# When GENERATE_DOCSET tag is set to YES, this tag specifies a string that
-# should uniquely identify the documentation set bundle. This should be a
-# reverse domain-name style string, e.g. com.mycompany.MyDocSet. Doxygen
-# will append .docset to the name.
-
-DOCSET_BUNDLE_ID = org.doxygen.Project
-
-# When GENERATE_PUBLISHER_ID tag specifies a string that should uniquely identify
-# the documentation publisher. This should be a reverse domain-name style
-# string, e.g. com.mycompany.MyDocSet.documentation.
-
-DOCSET_PUBLISHER_ID = org.doxygen.Publisher
-
-# The GENERATE_PUBLISHER_NAME tag identifies the documentation publisher.
-
-DOCSET_PUBLISHER_NAME = Publisher
-
-# If the GENERATE_HTMLHELP tag is set to YES, additional index files
-# will be generated that can be used as input for tools like the
-# Microsoft HTML help workshop to generate a compiled HTML help file (.chm)
-# of the generated HTML documentation.
-
-GENERATE_HTMLHELP = NO
-
-# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can
-# be used to specify the file name of the resulting .chm file. You
-# can add a path in front of the file if the result should not be
-# written to the html output directory.
-
-CHM_FILE =
-
-# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can
-# be used to specify the location (absolute path including file name) of
-# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run
-# the HTML help compiler on the generated index.hhp.
-
-HHC_LOCATION =
-
-# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag
-# controls if a separate .chi index file is generated (YES) or that
-# it should be included in the master .chm file (NO).
-
-GENERATE_CHI = NO
-
-# If the GENERATE_HTMLHELP tag is set to YES, the CHM_INDEX_ENCODING
-# is used to encode HtmlHelp index (hhk), content (hhc) and project file
-# content.
-
-CHM_INDEX_ENCODING =
-
-# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag
-# controls whether a binary table of contents is generated (YES) or a
-# normal table of contents (NO) in the .chm file.
-
-BINARY_TOC = NO
-
-# The TOC_EXPAND flag can be set to YES to add extra items for group members
-# to the contents of the HTML help documentation and to the tree view.
-
-TOC_EXPAND = NO
-
-# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and
-# QHP_VIRTUAL_FOLDER are set, an additional index file will be generated
-# that can be used as input for Qt's qhelpgenerator to generate a
-# Qt Compressed Help (.qch) of the generated HTML documentation.
-
-GENERATE_QHP = NO
-
-# If the QHG_LOCATION tag is specified, the QCH_FILE tag can
-# be used to specify the file name of the resulting .qch file.
-# The path specified is relative to the HTML output folder.
-
-QCH_FILE =
-
-# The QHP_NAMESPACE tag specifies the namespace to use when generating
-# Qt Help Project output. For more information please see
-# http://doc.trolltech.com/qthelpproject.html#namespace
-
-QHP_NAMESPACE = org.doxygen.Project
-
-# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating
-# Qt Help Project output. For more information please see
-# http://doc.trolltech.com/qthelpproject.html#virtual-folders
-
-QHP_VIRTUAL_FOLDER = doc
-
-# If QHP_CUST_FILTER_NAME is set, it specifies the name of a custom filter to
-# add. For more information please see
-# http://doc.trolltech.com/qthelpproject.html#custom-filters
-
-QHP_CUST_FILTER_NAME =
-
-# The QHP_CUST_FILT_ATTRS tag specifies the list of the attributes of the
-# custom filter to add. For more information please see
-#
-# Qt Help Project / Custom Filters.
-
-QHP_CUST_FILTER_ATTRS =
-
-# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this
-# project's
-# filter section matches.
-#
-# Qt Help Project / Filter Attributes.
-
-QHP_SECT_FILTER_ATTRS =
-
-# If the GENERATE_QHP tag is set to YES, the QHG_LOCATION tag can
-# be used to specify the location of Qt's qhelpgenerator.
-# If non-empty doxygen will try to run qhelpgenerator on the generated
-# .qhp file.
-
-QHG_LOCATION =
-
-# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files
-# will be generated, which together with the HTML files, form an Eclipse help
-# plugin. To install this plugin and make it available under the help contents
-# menu in Eclipse, the contents of the directory containing the HTML and XML
-# files needs to be copied into the plugins directory of eclipse. The name of
-# the directory within the plugins directory should be the same as
-# the ECLIPSE_DOC_ID value. After copying Eclipse needs to be restarted before
-# the help appears.
-
-GENERATE_ECLIPSEHELP = NO
-
-# A unique identifier for the eclipse help plugin. When installing the plugin
-# the directory name containing the HTML and XML files should also have
-# this name.
-
-ECLIPSE_DOC_ID = org.doxygen.Project
-
-# The DISABLE_INDEX tag can be used to turn on/off the condensed index at
-# top of each HTML page. The value NO (the default) enables the index and
-# the value YES disables it.
-
-DISABLE_INDEX = NO
-
-# This tag can be used to set the number of enum values (range [1..20])
-# that doxygen will group on one line in the generated HTML documentation.
-
-ENUM_VALUES_PER_LINE = 4
-
-# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index
-# structure should be generated to display hierarchical information.
-# If the tag value is set to YES, a side panel will be generated
-# containing a tree-like index structure (just like the one that
-# is generated for HTML Help). For this to work a browser that supports
-# JavaScript, DHTML, CSS and frames is required (i.e. any modern browser).
-# Windows users are probably better off using the HTML help feature.
-
-GENERATE_TREEVIEW = NO
-
-# By enabling USE_INLINE_TREES, doxygen will generate the Groups, Directories,
-# and Class Hierarchy pages using a tree view instead of an ordered list.
-
-USE_INLINE_TREES = NO
-
-# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be
-# used to set the initial width (in pixels) of the frame in which the tree
-# is shown.
-
-TREEVIEW_WIDTH = 250
-
-# When the EXT_LINKS_IN_WINDOW option is set to YES doxygen will open
-# links to external symbols imported via tag files in a separate window.
-
-EXT_LINKS_IN_WINDOW = NO
-
-# Use this tag to change the font size of Latex formulas included
-# as images in the HTML documentation. The default is 10. Note that
-# when you change the font size after a successful doxygen run you need
-# to manually remove any form_*.png images from the HTML output directory
-# to force them to be regenerated.
-
-FORMULA_FONTSIZE = 10
-
-# Use the FORMULA_TRANPARENT tag to determine whether or not the images
-# generated for formulas are transparent PNGs. Transparent PNGs are
-# not supported properly for IE 6.0, but are supported on all modern browsers.
-# Note that when changing this option you need to delete any form_*.png files
-# in the HTML output before the changes have effect.
-
-FORMULA_TRANSPARENT = YES
-
-# When the SEARCHENGINE tag is enabled doxygen will generate a search box
-# for the HTML output. The underlying search engine uses javascript
-# and DHTML and should work on any modern browser. Note that when using
-# HTML help (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets
-# (GENERATE_DOCSET) there is already a search function so this one should
-# typically be disabled. For large projects the javascript based search engine
-# can be slow, then enabling SERVER_BASED_SEARCH may provide a better solution.
-
-SEARCHENGINE = YES
-
-# When the SERVER_BASED_SEARCH tag is enabled the search engine will be
-# implemented using a PHP enabled web server instead of at the web client
-# using Javascript. Doxygen will generate the search PHP script and index
-# file to put on the web server. The advantage of the server
-# based approach is that it scales better to large projects and allows
-# full text search. The disadvances is that it is more difficult to setup
-# and does not have live searching capabilities.
-
-SERVER_BASED_SEARCH = NO
-
-#---------------------------------------------------------------------------
-# configuration options related to the LaTeX output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will
-# generate Latex output.
-
-GENERATE_LATEX = YES
-
-# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put.
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be
-# put in front of it. If left blank `latex' will be used as the default path.
-
-LATEX_OUTPUT = latex
-
-# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be
-# invoked. If left blank `latex' will be used as the default command name.
-# Note that when enabling USE_PDFLATEX this option is only used for
-# generating bitmaps for formulas in the HTML output, but not in the
-# Makefile that is written to the output directory.
-
-LATEX_CMD_NAME = latex
-
-# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to
-# generate index for LaTeX. If left blank `makeindex' will be used as the
-# default command name.
-
-MAKEINDEX_CMD_NAME = makeindex
-
-# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact
-# LaTeX documents. This may be useful for small projects and may help to
-# save some trees in general.
-
-COMPACT_LATEX = NO
-
-# The PAPER_TYPE tag can be used to set the paper type that is used
-# by the printer. Possible values are: a4, a4wide, letter, legal and
-# executive. If left blank a4wide will be used.
-
-PAPER_TYPE = a4wide
-
-# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX
-# packages that should be included in the LaTeX output.
-
-EXTRA_PACKAGES =
-
-# The LATEX_HEADER tag can be used to specify a personal LaTeX header for
-# the generated latex document. The header should contain everything until
-# the first chapter. If it is left blank doxygen will generate a
-# standard header. Notice: only use this tag if you know what you are doing!
-
-LATEX_HEADER =
-
-# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated
-# is prepared for conversion to pdf (using ps2pdf). The pdf file will
-# contain links (just like the HTML output) instead of page references
-# This makes the output suitable for online browsing using a pdf viewer.
-
-PDF_HYPERLINKS = YES
-
-# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of
-# plain latex in the generated Makefile. Set this option to YES to get a
-# higher quality PDF documentation.
-
-USE_PDFLATEX = YES
-
-# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode.
-# command to the generated LaTeX files. This will instruct LaTeX to keep
-# running if errors occur, instead of asking the user for help.
-# This option is also used when generating formulas in HTML.
-
-LATEX_BATCHMODE = NO
-
-# If LATEX_HIDE_INDICES is set to YES then doxygen will not
-# include the index chapters (such as File Index, Compound Index, etc.)
-# in the output.
-
-LATEX_HIDE_INDICES = NO
-
-# If LATEX_SOURCE_CODE is set to YES then doxygen will include
-# source code with syntax highlighting in the LaTeX output.
-# Note that which sources are shown also depends on other settings
-# such as SOURCE_BROWSER.
-
-LATEX_SOURCE_CODE = NO
-
-#---------------------------------------------------------------------------
-# configuration options related to the RTF output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output
-# The RTF output is optimized for Word 97 and may not look very pretty with
-# other RTF readers or editors.
-
-GENERATE_RTF = NO
-
-# The RTF_OUTPUT tag is used to specify where the RTF docs will be put.
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be
-# put in front of it. If left blank `rtf' will be used as the default path.
-
-RTF_OUTPUT = rtf
-
-# If the COMPACT_RTF tag is set to YES Doxygen generates more compact
-# RTF documents. This may be useful for small projects and may help to
-# save some trees in general.
-
-COMPACT_RTF = NO
-
-# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated
-# will contain hyperlink fields. The RTF file will
-# contain links (just like the HTML output) instead of page references.
-# This makes the output suitable for online browsing using WORD or other
-# programs which support those fields.
-# Note: wordpad (write) and others do not support links.
-
-RTF_HYPERLINKS = NO
-
-# Load stylesheet definitions from file. Syntax is similar to doxygen's
-# config file, i.e. a series of assignments. You only have to provide
-# replacements, missing definitions are set to their default value.
-
-RTF_STYLESHEET_FILE =
-
-# Set optional variables used in the generation of an rtf document.
-# Syntax is similar to doxygen's config file.
-
-RTF_EXTENSIONS_FILE =
-
-#---------------------------------------------------------------------------
-# configuration options related to the man page output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_MAN tag is set to YES (the default) Doxygen will
-# generate man pages
-
-GENERATE_MAN = NO
-
-# The MAN_OUTPUT tag is used to specify where the man pages will be put.
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be
-# put in front of it. If left blank `man' will be used as the default path.
-
-MAN_OUTPUT = man
-
-# The MAN_EXTENSION tag determines the extension that is added to
-# the generated man pages (default is the subroutine's section .3)
-
-MAN_EXTENSION = .3
-
-# If the MAN_LINKS tag is set to YES and Doxygen generates man output,
-# then it will generate one additional man file for each entity
-# documented in the real man page(s). These additional files
-# only source the real man page, but without them the man command
-# would be unable to find the correct page. The default is NO.
-
-MAN_LINKS = NO
-
-#---------------------------------------------------------------------------
-# configuration options related to the XML output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_XML tag is set to YES Doxygen will
-# generate an XML file that captures the structure of
-# the code including all documentation.
-
-GENERATE_XML = YES
-
-# The XML_OUTPUT tag is used to specify where the XML pages will be put.
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be
-# put in front of it. If left blank `xml' will be used as the default path.
-
-XML_OUTPUT = xml
-
-# The XML_SCHEMA tag can be used to specify an XML schema,
-# which can be used by a validating XML parser to check the
-# syntax of the XML files.
-
-XML_SCHEMA =
-
-# The XML_DTD tag can be used to specify an XML DTD,
-# which can be used by a validating XML parser to check the
-# syntax of the XML files.
-
-XML_DTD =
-
-# If the XML_PROGRAMLISTING tag is set to YES Doxygen will
-# dump the program listings (including syntax highlighting
-# and cross-referencing information) to the XML output. Note that
-# enabling this will significantly increase the size of the XML output.
-
-XML_PROGRAMLISTING = YES
-
-#---------------------------------------------------------------------------
-# configuration options for the AutoGen Definitions output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will
-# generate an AutoGen Definitions (see autogen.sf.net) file
-# that captures the structure of the code including all
-# documentation. Note that this feature is still experimental
-# and incomplete at the moment.
-
-GENERATE_AUTOGEN_DEF = NO
-
-#---------------------------------------------------------------------------
-# configuration options related to the Perl module output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_PERLMOD tag is set to YES Doxygen will
-# generate a Perl module file that captures the structure of
-# the code including all documentation. Note that this
-# feature is still experimental and incomplete at the
-# moment.
-
-GENERATE_PERLMOD = NO
-
-# If the PERLMOD_LATEX tag is set to YES Doxygen will generate
-# the necessary Makefile rules, Perl scripts and LaTeX code to be able
-# to generate PDF and DVI output from the Perl module output.
-
-PERLMOD_LATEX = NO
-
-# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be
-# nicely formatted so it can be parsed by a human reader.
-# This is useful
-# if you want to understand what is going on.
-# On the other hand, if this
-# tag is set to NO the size of the Perl module output will be much smaller
-# and Perl will parse it just the same.
-
-PERLMOD_PRETTY = YES
-
-# The names of the make variables in the generated doxyrules.make file
-# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX.
-# This is useful so different doxyrules.make files included by the same
-# Makefile don't overwrite each other's variables.
-
-PERLMOD_MAKEVAR_PREFIX =
-
-#---------------------------------------------------------------------------
-# Configuration options related to the preprocessor
-#---------------------------------------------------------------------------
-
-# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will
-# evaluate all C-preprocessor directives found in the sources and include
-# files.
-
-ENABLE_PREPROCESSING = YES
-
-# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro
-# names in the source code. If set to NO (the default) only conditional
-# compilation will be performed. Macro expansion can be done in a controlled
-# way by setting EXPAND_ONLY_PREDEF to YES.
-
-MACRO_EXPANSION = NO
-
-# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES
-# then the macro expansion is limited to the macros specified with the
-# PREDEFINED and EXPAND_AS_DEFINED tags.
-
-EXPAND_ONLY_PREDEF = NO
-
-# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files
-# in the INCLUDE_PATH (see below) will be search if a #include is found.
-
-SEARCH_INCLUDES = YES
-
-# The INCLUDE_PATH tag can be used to specify one or more directories that
-# contain include files that are not input files but should be processed by
-# the preprocessor.
-
-# INCLUDE_PATH = ../include
-
-# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard
-# patterns (like *.h and *.hpp) to filter out the header-files in the
-# directories. If left blank, the patterns specified with FILE_PATTERNS will
-# be used.
-
-# INCLUDE_FILE_PATTERNS = *.hpp
-
-# The PREDEFINED tag can be used to specify one or more macro names that
-# are defined before the preprocessor is started (similar to the -D option of
-# gcc). The argument of the tag is a list of macros of the form: name
-# or name=definition (no spaces). If the definition and the = are
-# omitted =1 is assumed. To prevent a macro definition from being
-# undefined via #undef or recursively expanded use the := operator
-# instead of the = operator.
-
-PREDEFINED =
-
-# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then
-# this tag can be used to specify a list of macro names that should be expanded.
-# The macro definition that is found in the sources will be used.
-# Use the PREDEFINED tag if you want to use a different macro definition.
-
-EXPAND_AS_DEFINED =
-
-# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then
-# doxygen's preprocessor will remove all function-like macros that are alone
-# on a line, have an all uppercase name, and do not end with a semicolon. Such
-# function macros are typically used for boiler-plate code, and will confuse
-# the parser if not removed.
-
-SKIP_FUNCTION_MACROS = YES
-
-#---------------------------------------------------------------------------
-# Configuration::additions related to external references
-#---------------------------------------------------------------------------
-
-# The TAGFILES option can be used to specify one or more tagfiles.
-# Optionally an initial location of the external documentation
-# can be added for each tagfile. The format of a tag file without
-# this location is as follows:
-#
-# TAGFILES = file1 file2 ...
-# Adding location for the tag files is done as follows:
-#
-# TAGFILES = file1=loc1 "file2 = loc2" ...
-# where "loc1" and "loc2" can be relative or absolute paths or
-# URLs. If a location is present for each tag, the installdox tool
-# does not have to be run to correct the links.
-# Note that each tag file must have a unique name
-# (where the name does NOT include the path)
-# If a tag file is not located in the directory in which doxygen
-# is run, you must also specify the path to the tagfile here.
-
-TAGFILES =
-
-# When a file name is specified after GENERATE_TAGFILE, doxygen will create
-# a tag file that is based on the input files it reads.
-
-GENERATE_TAGFILE =
-
-# If the ALLEXTERNALS tag is set to YES all external classes will be listed
-# in the class index. If set to NO only the inherited external classes
-# will be listed.
-
-ALLEXTERNALS = NO
-
-# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed
-# in the modules index. If set to NO, only the current project's groups will
-# be listed.
-
-EXTERNAL_GROUPS = YES
-
-# The PERL_PATH should be the absolute path and name of the perl script
-# interpreter (i.e. the result of `which perl').
-
-PERL_PATH = /usr/bin/perl
-
-#---------------------------------------------------------------------------
-# Configuration options related to the dot tool
-#---------------------------------------------------------------------------
-
-# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will
-# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base
-# or super classes. Setting the tag to NO turns the diagrams off. Note that
-# this option is superseded by the HAVE_DOT option below. This is only a
-# fallback. It is recommended to install and use dot, since it yields more
-# powerful graphs.
-
-CLASS_DIAGRAMS = NO
-
-# You can define message sequence charts within doxygen comments using the \msc
-# command. Doxygen will then run the mscgen tool (see
-# http://www.mcternan.me.uk/mscgen/) to produce the chart and insert it in the
-# documentation. The MSCGEN_PATH tag allows you to specify the directory where
-# the mscgen tool resides. If left empty the tool is assumed to be found in the
-# default search path.
-
-MSCGEN_PATH =
-
-# If set to YES, the inheritance and collaboration graphs will hide
-# inheritance and usage relations if the target is undocumented
-# or is not a class.
-
-HIDE_UNDOC_RELATIONS = YES
-
-# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is
-# available from the path. This tool is part of Graphviz, a graph visualization
-# toolkit from AT&T and Lucent Bell Labs. The other options in this section
-# have no effect if this option is set to NO (the default)
-
-HAVE_DOT = YES
-
-# The DOT_NUM_THREADS specifies the number of dot invocations doxygen is
-# allowed to run in parallel. When set to 0 (the default) doxygen will
-# base this on the number of processors available in the system. You can set it
-# explicitly to a value larger than 0 to get control over the balance
-# between CPU load and processing speed.
-
-DOT_NUM_THREADS = 0
-
-# By default doxygen will write a font called FreeSans.ttf to the output
-# directory and reference it in all dot files that doxygen generates. This
-# font does not include all possible unicode characters however, so when you need
-# these (or just want a differently looking font) you can specify the font name
-# using DOT_FONTNAME. You need need to make sure dot is able to find the font,
-# which can be done by putting it in a standard location or by setting the
-# DOTFONTPATH environment variable or by setting DOT_FONTPATH to the directory
-# containing the font.
-
-DOT_FONTNAME = FreeSans.ttf
-
-# The DOT_FONTSIZE tag can be used to set the size of the font of dot graphs.
-# The default size is 10pt.
-
-DOT_FONTSIZE = 10
-
-# By default doxygen will tell dot to use the output directory to look for the
-# FreeSans.ttf font (which doxygen will put there itself). If you specify a
-# different font using DOT_FONTNAME you can set the path where dot
-# can find it using this tag.
-
-DOT_FONTPATH =
-
-# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen
-# will generate a graph for each documented class showing the direct and
-# indirect inheritance relations. Setting this tag to YES will force the
-# the CLASS_DIAGRAMS tag to NO.
-
-CLASS_GRAPH = YES
-
-# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen
-# will generate a graph for each documented class showing the direct and
-# indirect implementation dependencies (inheritance, containment, and
-# class references variables) of the class with other documented classes.
-
-COLLABORATION_GRAPH = YES
-
-# If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen
-# will generate a graph for groups, showing the direct groups dependencies
-
-GROUP_GRAPHS = YES
-
-# If the UML_LOOK tag is set to YES doxygen will generate inheritance and
-# collaboration diagrams in a style similar to the OMG's Unified Modeling
-# Language.
-
-UML_LOOK = NO
-
-# If set to YES, the inheritance and collaboration graphs will show the
-# relations between templates and their instances.
-
-TEMPLATE_RELATIONS = NO
-
-# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT
-# tags are set to YES then doxygen will generate a graph for each documented
-# file showing the direct and indirect include dependencies of the file with
-# other documented files.
-
-INCLUDE_GRAPH = YES
-
-# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and
-# HAVE_DOT tags are set to YES then doxygen will generate a graph for each
-# documented header file showing the documented files that directly or
-# indirectly include this file.
-
-INCLUDED_BY_GRAPH = YES
-
-# If the CALL_GRAPH and HAVE_DOT options are set to YES then
-# doxygen will generate a call dependency graph for every global function
-# or class method. Note that enabling this option will significantly increase
-# the time of a run. So in most cases it will be better to enable call graphs
-# for selected functions only using the \callgraph command.
-
-CALL_GRAPH = NO
-
-# If the CALLER_GRAPH and HAVE_DOT tags are set to YES then
-# doxygen will generate a caller dependency graph for every global function
-# or class method. Note that enabling this option will significantly increase
-# the time of a run. So in most cases it will be better to enable caller
-# graphs for selected functions only using the \callergraph command.
-
-CALLER_GRAPH = NO
-
-# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen
-# will graphical hierarchy of all classes instead of a textual one.
-
-GRAPHICAL_HIERARCHY = YES
-
-# If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES
-# then doxygen will show the dependencies a directory has on other directories
-# in a graphical way. The dependency relations are determined by the #include
-# relations between the files in the directories.
-
-DIRECTORY_GRAPH = YES
-
-# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images
-# generated by dot. Possible values are png, jpg, or gif
-# If left blank png will be used.
-
-DOT_IMAGE_FORMAT = png
-
-# The tag DOT_PATH can be used to specify the path where the dot tool can be
-# found. If left blank, it is assumed the dot tool can be found in the path.
-
-DOT_PATH =
-
-# The DOTFILE_DIRS tag can be used to specify one or more directories that
-# contain dot files that are included in the documentation (see the
-# \dotfile command).
-
-DOTFILE_DIRS =
-
-# The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of
-# nodes that will be shown in the graph. If the number of nodes in a graph
-# becomes larger than this value, doxygen will truncate the graph, which is
-# visualized by representing a node as a red box. Note that doxygen if the
-# number of direct children of the root node in a graph is already larger than
-# DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note
-# that the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH.
-
-DOT_GRAPH_MAX_NODES = 50
-
-# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the
-# graphs generated by dot. A depth value of 3 means that only nodes reachable
-# from the root by following a path via at most 3 edges will be shown. Nodes
-# that lay further from the root node will be omitted. Note that setting this
-# option to 1 or 2 may greatly reduce the computation time needed for large
-# code bases. Also note that the size of a graph can be further restricted by
-# DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction.
-
-MAX_DOT_GRAPH_DEPTH = 0
-
-# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent
-# background. This is disabled by default, because dot on Windows does not
-# seem to support this out of the box. Warning: Depending on the platform used,
-# enabling this option may lead to badly anti-aliased labels on the edges of
-# a graph (i.e. they become hard to read).
-
-DOT_TRANSPARENT = NO
-
-# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output
-# files in one run (i.e. multiple -o and -T options on the command line). This
-# makes dot run faster, but since only newer versions of dot (>1.8.10)
-# support this, this feature is disabled by default.
-
-DOT_MULTI_TARGETS = YES
-
-# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will
-# generate a legend page explaining the meaning of the various boxes and
-# arrows in the dot generated graphs.
-
-GENERATE_LEGEND = YES
-
-# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will
-# remove the intermediate dot files that are used to generate
-# the various graphs.
-
-DOT_CLEANUP = YES
diff --git a/cmake/catkin/templates/__init__.py.in b/cmake/catkin/templates/__init__.py.in
deleted file mode 100644
index 68f2f652ce..0000000000
--- a/cmake/catkin/templates/__init__.py.in
+++ /dev/null
@@ -1,37 +0,0 @@
-# generated from catkin/cmake/template/__init__.py.in
-# keep symbol table as clean as possible by deleting all unnecessary symbols
-
-from os import path as os_path
-from sys import path as sys_path
-
-from pkgutil import extend_path
-
-__extended_path = "@PACKAGE_PYTHONPATH@".split(";")
-for p in reversed(__extended_path):
- sys_path.insert(0, p)
- del p
-del sys_path
-
-__path__ = extend_path(__path__, __name__)
-del extend_path
-
-__execfiles = []
-for p in __extended_path:
- src_init_file = os_path.join(p, __name__ + '.py')
- if os_path.isfile(src_init_file):
- __execfiles.append(src_init_file)
- else:
- src_init_file = os_path.join(p, __name__, '__init__.py')
- if os_path.isfile(src_init_file):
- __execfiles.append(src_init_file)
- del src_init_file
- del p
-del os_path
-del __extended_path
-
-for __execfile in __execfiles:
- with open(__execfile, 'r') as __fh:
- exec(__fh.read())
- del __fh
- del __execfile
-del __execfiles
diff --git a/cmake/catkin/templates/_setup_util.py.in b/cmake/catkin/templates/_setup_util.py.in
deleted file mode 100755
index 46c8628052..0000000000
--- a/cmake/catkin/templates/_setup_util.py.in
+++ /dev/null
@@ -1,287 +0,0 @@
-#!@PYTHON_EXECUTABLE@
-
-# Software License Agreement (BSD License)
-#
-# Copyright (c) 2012, Willow Garage, Inc.
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-#
-# * Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# * Redistributions in binary form must reproduce the above
-# copyright notice, this list of conditions and the following
-# disclaimer in the documentation and/or other materials provided
-# with the distribution.
-# * Neither the name of Willow Garage, Inc. nor the names of its
-# contributors may be used to endorse or promote products derived
-# from this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
-# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
-# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-# POSSIBILITY OF SUCH DAMAGE.
-
-'''This file generates shell code for the setup.SHELL scripts to set environment variables'''
-
-from __future__ import print_function
-import argparse
-import copy
-import errno
-import os
-import platform
-import sys
-
-CATKIN_MARKER_FILE = '.catkin'
-
-system = platform.system()
-IS_DARWIN = (system == 'Darwin')
-IS_WINDOWS = (system == 'Windows')
-
-# subfolder of workspace prepended to CMAKE_PREFIX_PATH
-ENV_VAR_SUBFOLDERS = {
- 'CMAKE_PREFIX_PATH': '',
- 'CPATH': 'include',
- 'LD_LIBRARY_PATH' if not IS_DARWIN else 'DYLD_LIBRARY_PATH': @CATKIN_LIB_ENVIRONMENT_PATHS@,
- 'PATH': '@CATKIN_GLOBAL_BIN_DESTINATION@',
- 'PKG_CONFIG_PATH': @CATKIN_PKGCONFIG_ENVIRONMENT_PATHS@,
- 'PYTHONPATH': '@PYTHON_INSTALL_DIR@',
-}
-
-
-def rollback_env_variables(environ, env_var_subfolders):
- '''
- Generate shell code to reset environment variables
- by unrolling modifications based on all workspaces in CMAKE_PREFIX_PATH.
- This does not cover modifications performed by environment hooks.
- '''
- lines = []
- unmodified_environ = copy.copy(environ)
- for key in sorted(env_var_subfolders.keys()):
- subfolders = env_var_subfolders[key]
- if not isinstance(subfolders, list):
- subfolders = [subfolders]
- for subfolder in subfolders:
- value = _rollback_env_variable(unmodified_environ, key, subfolder)
- if value is not None:
- environ[key] = value
- lines.append(assignment(key, value))
- if lines:
- lines.insert(0, comment('reset environment variables by unrolling modifications based on all workspaces in CMAKE_PREFIX_PATH'))
- return lines
-
-
-def _rollback_env_variable(environ, name, subfolder):
- '''
- For each catkin workspace in CMAKE_PREFIX_PATH remove the first entry from env[NAME] matching workspace + subfolder.
-
- :param subfolder: str '' or subfoldername that may start with '/'
- :returns: the updated value of the environment variable.
- '''
- value = environ[name] if name in environ else ''
- env_paths = [path for path in value.split(os.pathsep) if path]
- value_modified = False
- if subfolder:
- if subfolder.startswith(os.path.sep) or (os.path.altsep and subfolder.startswith(os.path.altsep)):
- subfolder = subfolder[1:]
- if subfolder.endswith(os.path.sep) or (os.path.altsep and subfolder.endswith(os.path.altsep)):
- subfolder = subfolder[:-1]
- for ws_path in _get_workspaces(environ, include_fuerte=True, include_non_existing=True):
- path_to_find = os.path.join(ws_path, subfolder) if subfolder else ws_path
- path_to_remove = None
- for env_path in env_paths:
- env_path_clean = env_path[:-1] if env_path and env_path[-1] in [os.path.sep, os.path.altsep] else env_path
- if env_path_clean == path_to_find:
- path_to_remove = env_path
- break
- if path_to_remove:
- env_paths.remove(path_to_remove)
- value_modified = True
- new_value = os.pathsep.join(env_paths)
- return new_value if value_modified else None
-
-
-def _get_workspaces(environ, include_fuerte=False, include_non_existing=False):
- '''
- Based on CMAKE_PREFIX_PATH return all catkin workspaces.
-
- :param include_fuerte: The flag if paths starting with '/opt/ros/fuerte' should be considered workspaces, ``bool``
- '''
- # get all cmake prefix paths
- env_name = 'CMAKE_PREFIX_PATH'
- value = environ[env_name] if env_name in environ else ''
- paths = [path for path in value.split(os.pathsep) if path]
- # remove non-workspace paths
- workspaces = [path for path in paths if os.path.isfile(os.path.join(path, CATKIN_MARKER_FILE)) or (include_fuerte and path.startswith('/opt/ros/fuerte')) or (include_non_existing and not os.path.exists(path))]
- return workspaces
-
-
-def prepend_env_variables(environ, env_var_subfolders, workspaces):
- '''
- Generate shell code to prepend environment variables
- for the all workspaces.
- '''
- lines = []
- lines.append(comment('prepend folders of workspaces to environment variables'))
-
- paths = [path for path in workspaces.split(os.pathsep) if path]
-
- prefix = _prefix_env_variable(environ, 'CMAKE_PREFIX_PATH', paths, '')
- lines.append(prepend(environ, 'CMAKE_PREFIX_PATH', prefix))
-
- for key in sorted([key for key in env_var_subfolders.keys() if key != 'CMAKE_PREFIX_PATH']):
- subfolder = env_var_subfolders[key]
- prefix = _prefix_env_variable(environ, key, paths, subfolder)
- lines.append(prepend(environ, key, prefix))
- return lines
-
-
-def _prefix_env_variable(environ, name, paths, subfolders):
- '''
- Return the prefix to prepend to the environment variable NAME, adding any path in NEW_PATHS_STR without creating duplicate or empty items.
- '''
- value = environ[name] if name in environ else ''
- environ_paths = [path for path in value.split(os.pathsep) if path]
- checked_paths = []
- for path in paths:
- if not isinstance(subfolders, list):
- subfolders = [subfolders]
- for subfolder in subfolders:
- path_tmp = path
- if subfolder:
- path_tmp = os.path.join(path_tmp, subfolder)
- # exclude any path already in env and any path we already added
- if path_tmp not in environ_paths and path_tmp not in checked_paths:
- checked_paths.append(path_tmp)
- prefix_str = os.pathsep.join(checked_paths)
- if prefix_str != '' and environ_paths:
- prefix_str += os.pathsep
- return prefix_str
-
-
-def assignment(key, value):
- if not IS_WINDOWS:
- return 'export %s="%s"' % (key, value)
- else:
- return 'set %s=%s' % (key, value)
-
-
-def comment(msg):
- if not IS_WINDOWS:
- return '# %s' % msg
- else:
- return 'REM %s' % msg
-
-
-def prepend(environ, key, prefix):
- if key not in environ or not environ[key]:
- return assignment(key, prefix)
- if not IS_WINDOWS:
- return 'export %s="%s$%s"' % (key, prefix, key)
- else:
- return 'set %s=%s%%%s%%' % (key, prefix, key)
-
-
-def find_env_hooks(environ, cmake_prefix_path):
- '''
- Generate shell code with found environment hooks
- for the all workspaces.
- '''
- lines = []
- lines.append(comment('found environment hooks in workspaces'))
-
- generic_env_hooks = []
- generic_env_hooks_workspace = []
- specific_env_hooks = []
- specific_env_hooks_workspace = []
- generic_env_hooks_by_filename = {}
- specific_env_hooks_by_filename = {}
- generic_env_hook_ext = 'bat' if IS_WINDOWS else 'sh'
- specific_env_hook_ext = environ['CATKIN_SHELL'] if not IS_WINDOWS and 'CATKIN_SHELL' in environ and environ['CATKIN_SHELL'] else None
- # remove non-workspace paths
- workspaces = [path for path in cmake_prefix_path.split(os.pathsep) if path and os.path.isfile(os.path.join(path, CATKIN_MARKER_FILE))]
- for workspace in reversed(workspaces):
- env_hook_dir = os.path.join(workspace, 'etc', 'catkin', 'profile.d')
- if os.path.isdir(env_hook_dir):
- for filename in sorted(os.listdir(env_hook_dir)):
- if filename.endswith('.%s' % generic_env_hook_ext):
- # remove previous env hook with same name if present
- if filename in generic_env_hooks_by_filename:
- i = generic_env_hooks.index(generic_env_hooks_by_filename[filename])
- generic_env_hooks.pop(i)
- generic_env_hooks_workspace.pop(i)
- # append env hook
- generic_env_hooks.append(os.path.join(env_hook_dir, filename))
- generic_env_hooks_workspace.append(workspace)
- generic_env_hooks_by_filename[filename] = generic_env_hooks[-1]
- elif specific_env_hook_ext is not None and filename.endswith('.%s' % specific_env_hook_ext):
- # remove previous env hook with same name if present
- if filename in specific_env_hooks_by_filename:
- i = specific_env_hooks.index(specific_env_hooks_by_filename[filename])
- specific_env_hooks.pop(i)
- specific_env_hooks_workspace.pop(i)
- # append env hook
- specific_env_hooks.append(os.path.join(env_hook_dir, filename))
- specific_env_hooks_workspace.append(workspace)
- specific_env_hooks_by_filename[filename] = specific_env_hooks[-1]
- env_hooks = generic_env_hooks + specific_env_hooks
- env_hooks_workspace = generic_env_hooks_workspace + specific_env_hooks_workspace
- count = len(env_hooks)
- lines.append(assignment('_CATKIN_ENVIRONMENT_HOOKS_COUNT', count))
- for i in range(count):
- lines.append(assignment('_CATKIN_ENVIRONMENT_HOOKS_%d' % i, env_hooks[i]))
- lines.append(assignment('_CATKIN_ENVIRONMENT_HOOKS_%d_WORKSPACE' % i, env_hooks_workspace[i]))
- return lines
-
-
-def _parse_arguments(args=None):
- parser = argparse.ArgumentParser(description='Generates code blocks for the setup.SHELL script.')
- parser.add_argument('--extend', action='store_true', help='Skip unsetting previous environment variables to extend context')
- return parser.parse_known_args(args=args)[0]
-
-
-if __name__ == '__main__':
- try:
- try:
- args = _parse_arguments()
- except Exception as e:
- print(e, file=sys.stderr)
- sys.exit(1)
-
- # environment at generation time
- CMAKE_PREFIX_PATH = '@CMAKE_PREFIX_PATH_AS_IS@'.split(';')
- # prepend current workspace if not already part of CPP
- base_path = os.path.dirname(__file__)
- if base_path not in CMAKE_PREFIX_PATH:
- CMAKE_PREFIX_PATH.insert(0, base_path)
- CMAKE_PREFIX_PATH = os.pathsep.join(CMAKE_PREFIX_PATH)
-
- environ = dict(os.environ)
- lines = []
- if not args.extend:
- lines += rollback_env_variables(environ, ENV_VAR_SUBFOLDERS)
- lines += prepend_env_variables(environ, ENV_VAR_SUBFOLDERS, CMAKE_PREFIX_PATH)
- lines += find_env_hooks(environ, CMAKE_PREFIX_PATH)
- print('\n'.join(lines))
-
- # need to explicitly flush the output
- sys.stdout.flush()
- except IOError as e:
- # and catch potantial "broken pipe" if stdout is not writable
- # which can happen when piping the output to a file but the disk is full
- if e.errno == errno.EPIPE:
- print(e, file=sys.stderr)
- sys.exit(2)
- raise
-
- sys.exit(0)
diff --git a/cmake/catkin/templates/cfg-extras.context.py.in b/cmake/catkin/templates/cfg-extras.context.py.in
deleted file mode 100644
index 256bb69bd6..0000000000
--- a/cmake/catkin/templates/cfg-extras.context.py.in
+++ /dev/null
@@ -1,33 +0,0 @@
-# generated from catkin/cmake/template/cfg-extras.context.py.in
-DEVELSPACE = '@DEVELSPACE@' == 'TRUE'
-INSTALLSPACE = '@INSTALLSPACE@' == 'TRUE'
-
-CATKIN_DEVEL_PREFIX = '@CATKIN_DEVEL_PREFIX@'
-
-CATKIN_GLOBAL_BIN_DESTINATION = '@CATKIN_GLOBAL_BIN_DESTINATION@'
-CATKIN_GLOBAL_ETC_DESTINATION = '@CATKIN_GLOBAL_ETC_DESTINATION@'
-CATKIN_GLOBAL_INCLUDE_DESTINATION = '@CATKIN_GLOBAL_INCLUDE_DESTINATION@'
-CATKIN_GLOBAL_LIB_DESTINATION = '@CATKIN_GLOBAL_LIB_DESTINATION@'
-CATKIN_GLOBAL_LIBEXEC_DESTINATION = '@CATKIN_GLOBAL_LIBEXEC_DESTINATION@'
-CATKIN_GLOBAL_PYTHON_DESTINATION = '@CATKIN_GLOBAL_PYTHON_DESTINATION@'
-CATKIN_GLOBAL_SHARE_DESTINATION = '@CATKIN_GLOBAL_SHARE_DESTINATION@'
-
-CATKIN_PACKAGE_BIN_DESTINATION = '@CATKIN_PACKAGE_BIN_DESTINATION@'
-CATKIN_PACKAGE_ETC_DESTINATION = '@CATKIN_PACKAGE_ETC_DESTINATION@'
-CATKIN_PACKAGE_INCLUDE_DESTINATION = '@CATKIN_PACKAGE_INCLUDE_DESTINATION@'
-CATKIN_PACKAGE_LIB_DESTINATION = '@CATKIN_PACKAGE_LIB_DESTINATION@'
-CATKIN_PACKAGE_LIBEXEC_DESTINATION = '@CATKIN_PACKAGE_LIBEXEC_DESTINATION@'
-CATKIN_PACKAGE_PYTHON_DESTINATION = '@CATKIN_PACKAGE_PYTHON_DESTINATION@'
-CATKIN_PACKAGE_SHARE_DESTINATION = '@CATKIN_PACKAGE_SHARE_DESTINATION@'
-
-CMAKE_BINARY_DIR = '@CMAKE_BINARY_DIR@'
-CMAKE_CURRENT_BINARY_DIR = '@CMAKE_CURRENT_BINARY_DIR@'
-CMAKE_CURRENT_SOURCE_DIR = '@CMAKE_CURRENT_SOURCE_DIR@'
-CMAKE_INSTALL_PREFIX = '@CMAKE_INSTALL_PREFIX@'
-CMAKE_SOURCE_DIR = '@CMAKE_SOURCE_DIR@'
-
-PKG_CMAKE_DIR = '@PKG_CMAKE_DIR@'
-
-PROJECT_NAME = '@PROJECT_NAME@'
-PROJECT_BINARY_DIR = '@PROJECT_BINARY_DIR@'
-PROJECT_SOURCE_DIR = '@PROJECT_SOURCE_DIR@'
diff --git a/cmake/catkin/templates/env-hook.context.py.in b/cmake/catkin/templates/env-hook.context.py.in
deleted file mode 100644
index 57cb22de6f..0000000000
--- a/cmake/catkin/templates/env-hook.context.py.in
+++ /dev/null
@@ -1,33 +0,0 @@
-# generated from catkin/cmake/template/env-hook.context.py.in
-DEVELSPACE = @DEVELSPACE@
-INSTALLSPACE = @INSTALLSPACE@
-
-CATKIN_DEVEL_PREFIX = '@CATKIN_DEVEL_PREFIX@'
-
-CATKIN_GLOBAL_BIN_DESTINATION = '@CATKIN_GLOBAL_BIN_DESTINATION@'
-CATKIN_GLOBAL_ETC_DESTINATION = '@CATKIN_GLOBAL_ETC_DESTINATION@'
-CATKIN_GLOBAL_INCLUDE_DESTINATION = '@CATKIN_GLOBAL_INCLUDE_DESTINATION@'
-CATKIN_GLOBAL_LIB_DESTINATION = '@CATKIN_GLOBAL_LIB_DESTINATION@'
-CATKIN_GLOBAL_LIBEXEC_DESTINATION = '@CATKIN_GLOBAL_LIBEXEC_DESTINATION@'
-CATKIN_GLOBAL_PYTHON_DESTINATION = '@CATKIN_GLOBAL_PYTHON_DESTINATION@'
-CATKIN_GLOBAL_SHARE_DESTINATION = '@CATKIN_GLOBAL_SHARE_DESTINATION@'
-
-CATKIN_PACKAGE_BIN_DESTINATION = '@CATKIN_PACKAGE_BIN_DESTINATION@'
-CATKIN_PACKAGE_ETC_DESTINATION = '@CATKIN_PACKAGE_ETC_DESTINATION@'
-CATKIN_PACKAGE_INCLUDE_DESTINATION = '@CATKIN_PACKAGE_INCLUDE_DESTINATION@'
-CATKIN_PACKAGE_LIB_DESTINATION = '@CATKIN_PACKAGE_LIB_DESTINATION@'
-CATKIN_PACKAGE_LIBEXEC_DESTINATION = '@CATKIN_PACKAGE_LIBEXEC_DESTINATION@'
-CATKIN_PACKAGE_PYTHON_DESTINATION = '@CATKIN_PACKAGE_PYTHON_DESTINATION@'
-CATKIN_PACKAGE_SHARE_DESTINATION = '@CATKIN_PACKAGE_SHARE_DESTINATION@'
-
-CMAKE_BINARY_DIR = '@CMAKE_BINARY_DIR@'
-CMAKE_CURRENT_BINARY_DIR = '@CMAKE_CURRENT_BINARY_DIR@'
-CMAKE_CURRENT_SOURCE_DIR = '@CMAKE_CURRENT_SOURCE_DIR@'
-CMAKE_INSTALL_PREFIX = '@CMAKE_INSTALL_PREFIX@'
-CMAKE_SOURCE_DIR = '@CMAKE_SOURCE_DIR@'
-
-PROJECT_NAME = '@PROJECT_NAME@'
-PROJECT_BINARY_DIR = '@PROJECT_BINARY_DIR@'
-PROJECT_SOURCE_DIR = '@PROJECT_SOURCE_DIR@'
-
-PYTHON_EXECUTABLE = '@PYTHON_EXECUTABLE@'
diff --git a/cmake/catkin/templates/env.bat.in b/cmake/catkin/templates/env.bat.in
deleted file mode 100644
index 55d882ec14..0000000000
--- a/cmake/catkin/templates/env.bat.in
+++ /dev/null
@@ -1,11 +0,0 @@
-@echo off
-REM generated from catkin/cmake/templates/env.bat.in
-
-if "%1"=="" (
- echo "Usage: env.bat COMMANDS"
- echo "Calling env.bat without arguments is not supported anymore. Instead spawn a subshell and source a setup file manually."
- exit 1
-) else (
- call "@SETUP_DIR@/@SETUP_FILENAME@.bat"
- %*
-)
diff --git a/cmake/catkin/templates/env.sh.in b/cmake/catkin/templates/env.sh.in
deleted file mode 100755
index 4ffb7dd4b3..0000000000
--- a/cmake/catkin/templates/env.sh.in
+++ /dev/null
@@ -1,16 +0,0 @@
-#!/usr/bin/env sh
-# generated from catkin/cmake/templates/env.sh.in
-
-if [ $# -eq 0 ] ; then
- /bin/echo "Usage: env.sh COMMANDS"
- /bin/echo "Calling env.sh without arguments is not supported anymore. Instead spawn a subshell and source a setup file manually."
- exit 1
-fi
-
-# ensure to not use different shell type which was set before
-CATKIN_SHELL=sh
-
-# source @SETUP_FILENAME@.sh from same directory as this file
-_CATKIN_SETUP_DIR=$(cd "`dirname "$0"`" > /dev/null && pwd)
-. "$_CATKIN_SETUP_DIR/@SETUP_FILENAME@.sh"
-exec "$@"
diff --git a/cmake/catkin/templates/generate_cached_setup.py.in b/cmake/catkin/templates/generate_cached_setup.py.in
deleted file mode 100644
index c2848e04c5..0000000000
--- a/cmake/catkin/templates/generate_cached_setup.py.in
+++ /dev/null
@@ -1,29 +0,0 @@
-from __future__ import print_function
-import argparse
-import os
-import stat
-import sys
-
-# find the import for catkin's python package - either from source space or from an installed underlay
-if os.path.exists(os.path.join('@catkin_EXTRAS_DIR@', 'catkinConfig.cmake.in')):
- sys.path.insert(0, os.path.join('@catkin_EXTRAS_DIR@', '..', 'python'))
-try:
- from catkin.environment_cache import generate_environment_script
-except ImportError:
- # search for catkin package in all workspaces and prepend to path
- for workspace in "@CATKIN_WORKSPACES@".split(';'):
- python_path = os.path.join(workspace, '@CATKIN_GLOBAL_PYTHON_DESTINATION@')
- if os.path.isdir(os.path.join(python_path, 'catkin')):
- sys.path.insert(0, python_path)
- break
- from catkin.environment_cache import generate_environment_script
-
-code = generate_environment_script('@CATKIN_DEVEL_PREFIX@/env.@script_ext@')
-
-output_filename = '@SETUP_DIR@/@SETUP_FILENAME@.@script_ext@'
-with open(output_filename, 'w') as f:
- #print('Generate script for cached setup "%s"' % output_filename)
- f.write('\n'.join(code))
-
-mode = os.stat(output_filename).st_mode
-os.chmod(output_filename, mode | stat.S_IXUSR)
diff --git a/cmake/catkin/templates/order_packages.context.py.in b/cmake/catkin/templates/order_packages.context.py.in
deleted file mode 100644
index 3609c0b300..0000000000
--- a/cmake/catkin/templates/order_packages.context.py.in
+++ /dev/null
@@ -1,5 +0,0 @@
-# generated from catkin/cmake/template/order_packages.context.py.in
-source_root_dir = "@CMAKE_CURRENT_SOURCE_DIR@"
-whitelisted_packages = "@CATKIN_WHITELIST_PACKAGES@".split(';') if "@CATKIN_WHITELIST_PACKAGES@" != "" else []
-blacklisted_packages = "@CATKIN_BLACKLIST_PACKAGES@".split(';') if "@CATKIN_BLACKLIST_PACKAGES@" != "" else []
-underlay_workspaces = "@CATKIN_WORKSPACES@".split(';') if "@CATKIN_WORKSPACES@" != "" else []
diff --git a/cmake/catkin/templates/pkg.context.pc.in b/cmake/catkin/templates/pkg.context.pc.in
deleted file mode 100644
index 8e9cd6bc12..0000000000
--- a/cmake/catkin/templates/pkg.context.pc.in
+++ /dev/null
@@ -1,8 +0,0 @@
-# generated from catkin/cmake/template/pkg.context.pc.in
-CATKIN_PACKAGE_PREFIX = "@CATKIN_PACKAGE_PREFIX@"
-PROJECT_PKG_CONFIG_INCLUDE_DIRS = "@PROJECT_PKG_CONFIG_INCLUDE_DIRS@".split(';') if "@PROJECT_PKG_CONFIG_INCLUDE_DIRS@" != "" else []
-PROJECT_CATKIN_DEPENDS = "@_PROJECT_CATKIN_DEPENDS@".replace(';', ' ')
-PKG_CONFIG_LIBRARIES_WITH_PREFIX = "@PKG_CONFIG_LIBRARIES_WITH_PREFIX@".split(';') if "@PKG_CONFIG_LIBRARIES_WITH_PREFIX@" != "" else []
-PROJECT_NAME = "@PROJECT_NAME@"
-PROJECT_SPACE_DIR = "@PROJECT_SPACE_DIR@"
-PROJECT_VERSION = "@PROJECT_VERSION@"
diff --git a/cmake/catkin/templates/pkgConfig-version.cmake.in b/cmake/catkin/templates/pkgConfig-version.cmake.in
deleted file mode 100644
index f29cb36d47..0000000000
--- a/cmake/catkin/templates/pkgConfig-version.cmake.in
+++ /dev/null
@@ -1,14 +0,0 @@
-# generated from catkin/cmake/template/pkgConfig-version.cmake.in
-set(PACKAGE_VERSION "@PROJECT_VERSION@")
-
-set(PACKAGE_VERSION_EXACT False)
-set(PACKAGE_VERSION_COMPATIBLE False)
-
-if("${PACKAGE_FIND_VERSION}" VERSION_EQUAL "${PACKAGE_VERSION}")
- set(PACKAGE_VERSION_EXACT True)
- set(PACKAGE_VERSION_COMPATIBLE True)
-endif()
-
-if("${PACKAGE_FIND_VERSION}" VERSION_LESS "${PACKAGE_VERSION}")
- set(PACKAGE_VERSION_COMPATIBLE True)
-endif()
diff --git a/cmake/catkin/templates/pkgConfig.cmake.in b/cmake/catkin/templates/pkgConfig.cmake.in
deleted file mode 100644
index 91f6d65354..0000000000
--- a/cmake/catkin/templates/pkgConfig.cmake.in
+++ /dev/null
@@ -1,191 +0,0 @@
-# generated from catkin/cmake/template/pkgConfig.cmake.in
-
-# append elements to a list and remove existing duplicates from the list
-# copied from catkin/cmake/list_append_deduplicate.cmake to keep pkgConfig
-# self contained
-macro(_list_append_deduplicate listname)
- if(NOT "${ARGN}" STREQUAL "")
- if(${listname})
- list(REMOVE_ITEM ${listname} ${ARGN})
- endif()
- list(APPEND ${listname} ${ARGN})
- endif()
-endmacro()
-
-# append elements to a list if they are not already in the list
-# copied from catkin/cmake/list_append_unique.cmake to keep pkgConfig
-# self contained
-macro(_list_append_unique listname)
- foreach(_item ${ARGN})
- list(FIND ${listname} ${_item} _index)
- if(_index EQUAL -1)
- list(APPEND ${listname} ${_item})
- endif()
- endforeach()
-endmacro()
-
-# pack a list of libraries with optional build configuration keywords
-# copied from catkin/cmake/catkin_libraries.cmake to keep pkgConfig
-# self contained
-macro(_pack_libraries_with_build_configuration VAR)
- set(${VAR} "")
- set(_argn ${ARGN})
- list(LENGTH _argn _count)
- set(_index 0)
- while(${_index} LESS ${_count})
- list(GET _argn ${_index} lib)
- if("${lib}" MATCHES "^debug|optimized|general$")
- math(EXPR _index "${_index} + 1")
- if(${_index} EQUAL ${_count})
- message(FATAL_ERROR "_pack_libraries_with_build_configuration() the list of libraries '${ARGN}' ends with '${lib}' which is a build configuration keyword and must be followed by a library")
- endif()
- list(GET _argn ${_index} library)
- list(APPEND ${VAR} "${lib}${CATKIN_BUILD_CONFIGURATION_KEYWORD_SEPARATOR}${library}")
- else()
- list(APPEND ${VAR} "${lib}")
- endif()
- math(EXPR _index "${_index} + 1")
- endwhile()
-endmacro()
-
-# unpack a list of libraries with optional build configuration keyword prefixes
-# copied from catkin/cmake/catkin_libraries.cmake to keep pkgConfig
-# self contained
-macro(_unpack_libraries_with_build_configuration VAR)
- set(${VAR} "")
- foreach(lib ${ARGN})
- string(REGEX REPLACE "^(debug|optimized|general)${CATKIN_BUILD_CONFIGURATION_KEYWORD_SEPARATOR}(.+)$" "\\1;\\2" lib "${lib}")
- list(APPEND ${VAR} "${lib}")
- endforeach()
-endmacro()
-
-
-if(@PROJECT_NAME@_CONFIG_INCLUDED)
- return()
-endif()
-set(@PROJECT_NAME@_CONFIG_INCLUDED TRUE)
-
-# set variables for source/devel/install prefixes
-if("@DEVELSPACE@" STREQUAL "TRUE")
- set(@PROJECT_NAME@_SOURCE_PREFIX @CMAKE_CURRENT_SOURCE_DIR@)
- set(@PROJECT_NAME@_DEVEL_PREFIX @CATKIN_DEVEL_PREFIX@)
- set(@PROJECT_NAME@_INSTALL_PREFIX "")
- set(@PROJECT_NAME@_PREFIX ${@PROJECT_NAME@_DEVEL_PREFIX})
-else()
- set(@PROJECT_NAME@_SOURCE_PREFIX "")
- set(@PROJECT_NAME@_DEVEL_PREFIX "")
- set(@PROJECT_NAME@_INSTALL_PREFIX @CMAKE_INSTALL_PREFIX@)
- set(@PROJECT_NAME@_PREFIX ${@PROJECT_NAME@_INSTALL_PREFIX})
-endif()
-
-# warn when using a deprecated package
-if(NOT "@PROJECT_DEPRECATED@" STREQUAL "")
- set(_msg "WARNING: package '@PROJECT_NAME@' is deprecated")
- # append custom deprecation text if available
- if(NOT "@PROJECT_DEPRECATED@" STREQUAL "TRUE")
- set(_msg "${_msg} (@PROJECT_DEPRECATED@)")
- endif()
- message("${_msg}")
-endif()
-
-# flag project as catkin-based to distinguish if a find_package()-ed project is a catkin project
-set(@PROJECT_NAME@_FOUND_CATKIN_PROJECT TRUE)
-
-if(NOT "@PROJECT_CMAKE_CONFIG_INCLUDE_DIRS@" STREQUAL "")
- set(@PROJECT_NAME@_INCLUDE_DIRS "")
- set(_include_dirs "@PROJECT_CMAKE_CONFIG_INCLUDE_DIRS@")
- foreach(idir ${_include_dirs})
- if(IS_ABSOLUTE ${idir} AND IS_DIRECTORY ${idir})
- set(include ${idir})
- elseif("${idir}" STREQUAL "@CATKIN_GLOBAL_INCLUDE_DESTINATION@")
- get_filename_component(include "${@PROJECT_NAME@_DIR}/../../../@CATKIN_GLOBAL_INCLUDE_DESTINATION@" ABSOLUTE)
- if(NOT IS_DIRECTORY ${include})
- message(FATAL_ERROR "Project '@PROJECT_NAME@' specifies '${idir}' as an include dir, which is not found. It does not exist in '${include}'. Ask the maintainer '@PROJECT_MAINTAINER@' to fix it.")
- endif()
- else()
- message(FATAL_ERROR "Project '@PROJECT_NAME@' specifies '${idir}' as an include dir, which is not found. It does neither exist as an absolute directory nor in '@PKG_INCLUDE_PREFIX@/${idir}'. Ask the maintainer '@PROJECT_MAINTAINER@' to fix it.")
- endif()
- _list_append_unique(@PROJECT_NAME@_INCLUDE_DIRS ${include})
- endforeach()
-endif()
-
-set(libraries "@PKG_CONFIG_LIBRARIES@")
-foreach(library ${libraries})
- # keep build configuration keywords, target names and absolute libraries as-is
- if("${library}" MATCHES "^debug|optimized|general$")
- list(APPEND @PROJECT_NAME@_LIBRARIES ${library})
- elseif(TARGET ${library})
- list(APPEND @PROJECT_NAME@_LIBRARIES ${library})
- elseif(IS_ABSOLUTE ${library})
- list(APPEND @PROJECT_NAME@_LIBRARIES ${library})
- else()
- set(lib_path "")
- set(lib "${library}-NOTFOUND")
- # since the path where the library is found is returned we have to iterate over the paths manually
- foreach(path @PKG_CONFIG_LIB_PATHS@)
- find_library(lib ${library}
- PATHS ${path}
- NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH)
- if(lib)
- set(lib_path ${path})
- break()
- endif()
- endforeach()
- if(lib)
- _list_append_unique(@PROJECT_NAME@_LIBRARY_DIRS ${lib_path})
- list(APPEND @PROJECT_NAME@_LIBRARIES ${lib})
- else()
- # as a fall back for non-catkin libraries try to search globally
- find_library(lib ${library})
- if(NOT lib)
- message(FATAL_ERROR "Project '${PROJECT_NAME}' tried to find library '${library}'. The library is neither a target nor built/installed properly. Did you compile project '@PROJECT_NAME@'? Did you find_package() it before the subdirectory containing its code is included?")
- endif()
- list(APPEND @PROJECT_NAME@_LIBRARIES ${lib})
- endif()
- endif()
-endforeach()
-
-set(@PROJECT_NAME@_EXPORTED_TARGETS "@PKG_EXPORTED_TARGETS@")
-# create dummy targets for exported code generation targets to make life of users easier
-foreach(t ${@PROJECT_NAME@_EXPORTED_TARGETS})
- if(NOT TARGET ${t})
- add_custom_target(${t})
- endif()
-endforeach()
-
-set(depends "@PROJECT_DEPENDENCIES@")
-foreach(depend ${depends})
- string(REPLACE " " ";" depend_list ${depend})
- # the package name of the dependency must be kept in a unique variable so that it is not overwritten in recursive calls
- list(GET depend_list 0 @PROJECT_NAME@_dep)
- list(LENGTH depend_list count)
- if(${count} EQUAL 1)
- # simple dependencies must only be find_package()-ed once
- if(NOT ${@PROJECT_NAME@_dep}_FOUND)
- find_package(${@PROJECT_NAME@_dep} REQUIRED)
- endif()
- else()
- # dependencies with components must be find_package()-ed again
- list(REMOVE_AT depend_list 0)
- find_package(${@PROJECT_NAME@_dep} REQUIRED ${depend_list})
- endif()
- _list_append_unique(@PROJECT_NAME@_INCLUDE_DIRS ${${@PROJECT_NAME@_dep}_INCLUDE_DIRS})
-
- # merge build configuration keywords with library names to correctly deduplicate
- _pack_libraries_with_build_configuration(@PROJECT_NAME@_LIBRARIES ${@PROJECT_NAME@_LIBRARIES})
- _pack_libraries_with_build_configuration(_libraries ${${@PROJECT_NAME@_dep}_LIBRARIES})
- _list_append_deduplicate(@PROJECT_NAME@_LIBRARIES ${_libraries})
- # undo build configuration keyword merging after deduplication
- _unpack_libraries_with_build_configuration(@PROJECT_NAME@_LIBRARIES ${@PROJECT_NAME@_LIBRARIES})
-
- _list_append_unique(@PROJECT_NAME@_LIBRARY_DIRS ${${@PROJECT_NAME@_dep}_LIBRARY_DIRS})
- list(APPEND @PROJECT_NAME@_EXPORTED_TARGETS ${${@PROJECT_NAME@_dep}_EXPORTED_TARGETS})
-endforeach()
-
-set(pkg_cfg_extras "@PKG_CFG_EXTRAS@")
-foreach(extra ${pkg_cfg_extras})
- if(NOT IS_ABSOLUTE ${extra})
- set(extra ${@PROJECT_NAME@_DIR}/${extra})
- endif()
- include(${extra})
-endforeach()
diff --git a/cmake/catkin/templates/python_distutils_install.bat.in b/cmake/catkin/templates/python_distutils_install.bat.in
deleted file mode 100644
index fd9906a687..0000000000
--- a/cmake/catkin/templates/python_distutils_install.bat.in
+++ /dev/null
@@ -1,17 +0,0 @@
-@echo off
-
-if DEFINED DESTDIR (
- echo "Destdir.............%DESTDIR%"
- set DESTDIR_ARG="--root=%DESTDIR%"
-)
-
-cd "@INSTALL_CMD_WORKING_DIRECTORY@"
-
-cmd /V:on /C set PYTHONPATH="@CMAKE_INSTALL_PREFIX@/@PYTHON_INSTALL_DIR@;@CMAKE_BINARY_DIR@/@PYTHON_INSTALL_DIR@" ^
- && set CATKIN_BINARY_DIR="@CMAKE_BINARY_DIR@" ^
- && "@PYTHON_EXECUTABLE@" ^
- "@CMAKE_CURRENT_SOURCE_DIR@/setup.py" ^
- build --build-base "@CMAKE_CURRENT_BINARY_DIR@" ^
- install %DESTDIR_ARG% @SETUPTOOLS_ARG_EXTRA@ ^
- --prefix="@SETUPTOOLS_INSTALL_PREFIX@" ^
- --install-scripts="@SETUPTOOLS_INSTALL_PREFIX@\@CATKIN_GLOBAL_BIN_DESTINATION@"
diff --git a/cmake/catkin/templates/python_distutils_install.sh.in b/cmake/catkin/templates/python_distutils_install.sh.in
deleted file mode 100755
index e7b56c72d0..0000000000
--- a/cmake/catkin/templates/python_distutils_install.sh.in
+++ /dev/null
@@ -1,28 +0,0 @@
-#!/bin/sh -x
-
-if [ -n "$DESTDIR" ] ; then
- case $DESTDIR in
- /*) # ok
- ;;
- *)
- /bin/echo "DESTDIR argument must be absolute... "
- /bin/echo "otherwise python's distutils will bork things."
- exit 1
- esac
- DESTDIR_ARG="--root=$DESTDIR"
-fi
-
-cd "@INSTALL_CMD_WORKING_DIRECTORY@"
-
-# Note that PYTHONPATH is pulled from the environment to support installing
-# into one location when some dependencies were installed in another
-# location, #123.
-/usr/bin/env \
- PYTHONPATH="@CMAKE_INSTALL_PREFIX@/@PYTHON_INSTALL_DIR@:@CMAKE_BINARY_DIR@/@PYTHON_INSTALL_DIR@:$PYTHONPATH" \
- CATKIN_BINARY_DIR="@CMAKE_BINARY_DIR@" \
- "@PYTHON_EXECUTABLE@" \
- "@CMAKE_CURRENT_SOURCE_DIR@/setup.py" \
- build --build-base "@CMAKE_CURRENT_BINARY_DIR@" \
- install \
- $DESTDIR_ARG \
- @SETUPTOOLS_ARG_EXTRA@ --prefix="@CMAKE_INSTALL_PREFIX@" --install-scripts="@CMAKE_INSTALL_PREFIX@/@CATKIN_GLOBAL_BIN_DESTINATION@"
diff --git a/cmake/catkin/templates/relay.py.in b/cmake/catkin/templates/relay.py.in
deleted file mode 100644
index 5221f48dc7..0000000000
--- a/cmake/catkin/templates/relay.py.in
+++ /dev/null
@@ -1,4 +0,0 @@
-# creates a relay to a python script source file, acting as that file.
-# The purpose is that of a symlink
-with open("@PYTHON_SCRIPT@", 'r') as fh:
- exec(fh.read())
diff --git a/cmake/catkin/templates/rosinstall.in b/cmake/catkin/templates/rosinstall.in
deleted file mode 100644
index 17f78a2981..0000000000
--- a/cmake/catkin/templates/rosinstall.in
+++ /dev/null
@@ -1,2 +0,0 @@
-- setup-file:
- local-name: @SETUP_DIR@/setup.sh
diff --git a/cmake/catkin/templates/safe_execute_install.cmake.in b/cmake/catkin/templates/safe_execute_install.cmake.in
deleted file mode 100644
index 643c6eb4c9..0000000000
--- a/cmake/catkin/templates/safe_execute_install.cmake.in
+++ /dev/null
@@ -1,5 +0,0 @@
-execute_process(COMMAND "@INSTALL_SCRIPT@" RESULT_VARIABLE res)
-
-if(NOT res EQUAL 0)
- message(FATAL_ERROR "execute_process(@INSTALL_SCRIPT@) returned error code ${res}")
-endif()
diff --git a/cmake/catkin/templates/script.bash.in b/cmake/catkin/templates/script.bash.in
deleted file mode 100755
index ab172b97b8..0000000000
--- a/cmake/catkin/templates/script.bash.in
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/usr/bin/env bash
-# generated from catkin/cmake/templates/script.bash.in
-
-"@BASH_SCRIPT@" "$@"
diff --git a/cmake/catkin/templates/script.in b/cmake/catkin/templates/script.in
deleted file mode 100755
index 6c1be8d232..0000000000
--- a/cmake/catkin/templates/script.in
+++ /dev/null
@@ -1 +0,0 @@
-@SCRIPT@
diff --git a/cmake/catkin/templates/script.py.in b/cmake/catkin/templates/script.py.in
deleted file mode 100755
index dc3a277371..0000000000
--- a/cmake/catkin/templates/script.py.in
+++ /dev/null
@@ -1,5 +0,0 @@
-#!/usr/bin/env python
-# creates a relay to a python script source file, acting as that file.
-# The purpose is that of a symlink
-with open("@PYTHON_SCRIPT@", 'r') as fh:
- exec(fh.read())
diff --git a/cmake/catkin/templates/script.sh.in b/cmake/catkin/templates/script.sh.in
deleted file mode 100755
index 54e4e7a0a6..0000000000
--- a/cmake/catkin/templates/script.sh.in
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/usr/bin/env sh
-# generated from catkin/cmake/templates/script.sh.in
-
-"@EXECUTABLE@" "$@"
diff --git a/cmake/catkin/templates/setup.bash.in b/cmake/catkin/templates/setup.bash.in
deleted file mode 100644
index ff47af8f30..0000000000
--- a/cmake/catkin/templates/setup.bash.in
+++ /dev/null
@@ -1,8 +0,0 @@
-#!/usr/bin/env bash
-# generated from catkin/cmake/templates/setup.bash.in
-
-CATKIN_SHELL=bash
-
-# source setup.sh from same directory as this file
-_CATKIN_SETUP_DIR=$(builtin cd "`dirname "${BASH_SOURCE[0]}"`" > /dev/null && pwd)
-. "$_CATKIN_SETUP_DIR/setup.sh"
diff --git a/cmake/catkin/templates/setup.bat.in b/cmake/catkin/templates/setup.bat.in
deleted file mode 100644
index 1549181597..0000000000
--- a/cmake/catkin/templates/setup.bat.in
+++ /dev/null
@@ -1,59 +0,0 @@
-@echo off
-REM generated from catkin/cmake/template/setup.bat.in
-
-REM Sets various environment variables and sources additional environment hooks.
-REM It tries it's best to undo changes from a previously sourced setup file before.
-REM Supported command line options:
-REM --extend: skips the undoing of changes from a previously sourced setup file
-
-set _SETUP_UTIL="@SETUP_DIR@/_setup_util.py"
-
-if NOT EXIST "%_SETUP_UTIL%" (
- echo "Missing Python script: %_SETUP_UTIL%"
- exit 22
-)
-
-REM set the Python executable
-set _PYTHON="@PYTHON_EXECUTABLE@"
-
-REM generate pseudo random temporary filename
-:GenerateTempFilename
-REM replace leading space of time with zero
-set _SETUP_TMP=%Time: =0%
-REM remove time delimiters
-set _SETUP_TMP=%_SETUP_TMP::=%
-set _SETUP_TMP=%_SETUP_TMP:.=%
-set _SETUP_TMP=%_SETUP_TMP:,=%
-set _SETUP_TMP=%Temp%\setup.%_SETUP_TMP%.bat
-if EXIST %_SETUP_TMP% do goto GenerateTempFilename
-type NUL > "%_SETUP_TMP%"
-if NOT EXIST %_SETUP_TMP% (
- echo "Could not create temporary file: %_SETUP_TMP%"
- exit 1
-)
-
-REM invoke Python script to generate necessary exports of environment variables
-%_PYTHON% %_SETUP_UTIL% %* > %_SETUP_TMP%
-if NOT EXIST %_SETUP_TMP% (
- echo "Could not create temporary file: %_SETUP_TMP%"
- return 1
-)
-call %_SETUP_TMP%
-del %_SETUP_TMP%
-
-REM source all environment hooks
-for /F "tokens=* delims=;" %%a in ("%_CATKIN_ENVIRONMENT_HOOKS%") do (
- for %%b in (%%a) do (
- call "%%b"
- )
-)
-
-REM 3rdparty packages often put dll's into lib (convention is bin) and
-REM windows finds it's dll's via the PATH variable. Make that happen here!
-set PATH=%LD_LIBRARY_PATH%;%PATH%
-
-REM unset temporary variables
-set _SETUP_UTIL=
-set _PYTHON=
-set _SETUP_TMP=
-set _CATKIN_ENVIRONMENT_HOOKS=
diff --git a/cmake/catkin/templates/setup.sh.in b/cmake/catkin/templates/setup.sh.in
deleted file mode 100644
index a47611bdd0..0000000000
--- a/cmake/catkin/templates/setup.sh.in
+++ /dev/null
@@ -1,87 +0,0 @@
-#!/usr/bin/env sh
-# generated from catkin/cmake/template/setup.sh.in
-
-# Sets various environment variables and sources additional environment hooks.
-# It tries it's best to undo changes from a previously sourced setup file before.
-# Supported command line options:
-# --extend: skips the undoing of changes from a previously sourced setup file
-
-# since this file is sourced either use the provided _CATKIN_SETUP_DIR
-# or fall back to the destination set at configure time
-: ${_CATKIN_SETUP_DIR:=@SETUP_DIR@}
-_SETUP_UTIL="$_CATKIN_SETUP_DIR/_setup_util.py"
-unset _CATKIN_SETUP_DIR
-
-if [ ! -f "$_SETUP_UTIL" ]; then
- echo "Missing Python script: $_SETUP_UTIL"
- return 22
-fi
-
-# detect if running on Darwin platform
-_UNAME=`uname -s`
-_IS_DARWIN=0
-if [ "$_UNAME" = "Darwin" ]; then
- _IS_DARWIN=1
-fi
-unset _UNAME
-
-# make sure to export all environment variables
-export CMAKE_PREFIX_PATH
-export CPATH
-if [ $_IS_DARWIN -eq 0 ]; then
- export LD_LIBRARY_PATH
-else
- export DYLD_LIBRARY_PATH
-fi
-unset _IS_DARWIN
-export PATH
-export PKG_CONFIG_PATH
-export PYTHONPATH
-
-# remember type of shell if not already set
-if [ -z "$CATKIN_SHELL" ]; then
- CATKIN_SHELL=sh
-fi
-
-# invoke Python script to generate necessary exports of environment variables
-_SETUP_TMP=`mktemp /tmp/setup.sh.XXXXXXXXXX`
-if [ $? -ne 0 -o ! -f "$_SETUP_TMP" ]; then
- echo "Could not create temporary file: $_SETUP_TMP"
- return 1
-fi
-CATKIN_SHELL=$CATKIN_SHELL "$_SETUP_UTIL" $@ > $_SETUP_TMP
-_RC=$?
-if [ $_RC -ne 0 ]; then
- if [ $_RC -eq 2 ]; then
- echo "Could not write the output of '$_SETUP_UTIL' to temporary file '$_SETUP_TMP': may be the disk if full?"
- else
- echo "Failed to run '\"$_SETUP_UTIL\" $@': return code $_RC"
- fi
- unset _RC
- unset _SETUP_UTIL
- rm -f $_SETUP_TMP
- unset _SETUP_TMP
- return 1
-fi
-unset _RC
-unset _SETUP_UTIL
-. $_SETUP_TMP
-rm -f $_SETUP_TMP
-unset _SETUP_TMP
-
-# source all environment hooks
-_i=0
-while [ $_i -lt $_CATKIN_ENVIRONMENT_HOOKS_COUNT ]; do
- eval _envfile=\$_CATKIN_ENVIRONMENT_HOOKS_$_i
- unset _CATKIN_ENVIRONMENT_HOOKS_$_i
- eval _envfile_workspace=\$_CATKIN_ENVIRONMENT_HOOKS_${_i}_WORKSPACE
- unset _CATKIN_ENVIRONMENT_HOOKS_${_i}_WORKSPACE
- # set workspace for environment hook
- CATKIN_ENV_HOOK_WORKSPACE=$_envfile_workspace
- . "$_envfile"
- unset CATKIN_ENV_HOOK_WORKSPACE
- _i=$((_i + 1))
-done
-unset _i
-
-unset _CATKIN_ENVIRONMENT_HOOKS_COUNT
diff --git a/cmake/catkin/templates/setup.zsh.in b/cmake/catkin/templates/setup.zsh.in
deleted file mode 100644
index 9f780b7410..0000000000
--- a/cmake/catkin/templates/setup.zsh.in
+++ /dev/null
@@ -1,8 +0,0 @@
-#!/usr/bin/env zsh
-# generated from catkin/cmake/templates/setup.zsh.in
-
-CATKIN_SHELL=zsh
-
-# source setup.sh from same directory as this file
-_CATKIN_SETUP_DIR=$(builtin cd -q "`dirname "$0"`" > /dev/null && pwd)
-emulate -R zsh -c 'source "$_CATKIN_SETUP_DIR/setup.sh"'
diff --git a/cmake/catkin/test/catkin_download_test_data.cmake b/cmake/catkin/test/catkin_download_test_data.cmake
deleted file mode 100644
index 9d39052607..0000000000
--- a/cmake/catkin/test/catkin_download_test_data.cmake
+++ /dev/null
@@ -1,52 +0,0 @@
-_generate_function_if_testing_is_disabled("catkin_download_test_data")
-
-#
-# Download a file containing test data from a URL.
-#
-# It is commonly used to download larger data files for unit tests
-# which should not be stored in the repository.
-#
-# .. note:: The target will be registered as a dependency
-# of the "tests" target.
-#
-# .. note:: If the tests should be run on the ROS buildfarm the URL
-# must be publically and reliably accessible.
-#
-# :param target: the target name
-# :type target: string
-# :param url: the url to download
-# :type url: string
-
-# :param DESTINATION: the directory where the file is downloaded to
-# (default: ${PROJECT_BINARY_DIR})
-# :type DESTINATION: string
-# :param FILENAME: the filename of the downloaded file
-# (default: the basename of the url)
-# :type FILENAME: string
-# :param MD5: the expected md5 hash to compare against
-# (default: empty, skipping the check)
-# :type MD5: string
-#
-# @public
-function(catkin_download_test_data target url)
- _warn_if_skip_testing("catkin_download_test_data")
-
- cmake_parse_arguments(ARG "" "DESTINATION;FILENAME;MD5" "" ${ARGN})
- if(ARG_UNPARSED_ARGUMENTS)
- message(FATAL_ERROR "catkin_download_test_data() called with unused arguments: ${ARG_UNPARSED_ARGUMENTS}")
- endif()
- if(NOT ARG_DESTINATION)
- set(ARG_DESTINATION ${PROJECT_BINARY_DIR})
- endif()
- if(NOT ARG_FILENAME)
- get_filename_component(ARG_FILENAME ${url} NAME)
- endif()
- set(output "${ARG_DESTINATION}/${ARG_FILENAME}")
- add_custom_command(OUTPUT ${output}
- COMMAND ${PYTHON_EXECUTABLE} ${catkin_EXTRAS_DIR}/test/download_checkmd5.py ${url} ${output} ${ARG_MD5}
- VERBATIM)
- add_custom_target(${target} DEPENDS ${output})
- if(TARGET tests)
- add_dependencies(tests ${target})
- endif()
-endfunction()
diff --git a/cmake/catkin/test/download_checkmd5.py b/cmake/catkin/test/download_checkmd5.py
deleted file mode 100755
index 7394315b80..0000000000
--- a/cmake/catkin/test/download_checkmd5.py
+++ /dev/null
@@ -1,175 +0,0 @@
-#!/usr/bin/env python
-
-from __future__ import print_function
-import errno
-import os
-import sys
-try:
- from urllib.request import addinfourl, BaseHandler, build_opener, Request, URLError
-except ImportError:
- from urllib2 import addinfourl, BaseHandler, build_opener, Request, URLError
-import hashlib
-from argparse import ArgumentParser
-
-NAME = "download_checkmd5.py"
-
-
-class HTTPRangeHandler(BaseHandler):
-
- def http_error_206(self, req, fp, code, msg, hdrs):
- r = addinfourl(fp, hdrs, req.get_full_url())
- r.code = code
- r.msg = msg
- return r
-
- def http_error_416(self, req, fp, code, msg, hdrs):
- raise URLError('Requested Range Not Satisfiable')
-
-
-def download_with_resume(uri, dest):
- handler = HTTPRangeHandler()
- opener = build_opener(handler)
-
- offset = 0
- content_length = None
- accept_ranges = False
- while True:
- req = Request(uri)
- if offset:
- req.add_header('Range', 'bytes=%d-' % offset)
- src_file = None
- try:
- src_file = opener.open(req)
- headers = src_file.info()
- if not offset:
- # on first connection check server capabilities
- if 'Content-Length' in headers:
- content_length = int(headers['Content-Length'])
- if 'Accept-Ranges' in headers:
- accept_ranges = headers['Accept-Ranges'] != 'none'
- else:
- # on resume verify that server understood range header and responded accordingly
- if 'Content-Range' not in headers:
- raise IOError('Download aborted and server does not support resuming download')
- if int(headers['Content-Range'][len('bytes '):].split('-')[0]) != offset:
- raise IOError('Download aborted because server replied with different content range then requested')
- sys.stdout.write(' resume from %d...' % offset)
- sys.stdout.flush()
- with open(dest, 'ab' if offset else 'wb') as dst_file:
- progress = False
- while True:
- data = src_file.read(8192)
- if not data:
- break
- progress = True
- dst_file.write(data)
- offset += len(data)
- if not progress:
- # if no bytes have been received abort download
- raise IOError("No progress when trying to download '%s'" % uri)
- except:
- if src_file:
- src_file.close()
- raise
-
- # when content length is unknown it is assumed that the download is complete
- if content_length is None:
- break
- # or when enough data has been downloaded (> is especially a valid case)
- if offset >= content_length:
- break
- if not accept_ranges:
- raise IOError('Server does not accept ranges to resume download')
-
-
-def download_md5(uri, dest):
- """
- downloads file from uri to file dest
- """
- # Create intermediate directories as necessary, #2970
- dirname = os.path.dirname(dest)
- if len(dirname):
- try:
- os.makedirs(dirname)
- except OSError as e:
- if e.errno != errno.EEXIST:
- raise
-
- sys.stdout.write('Downloading %s to %s...' % (uri, dest))
- sys.stdout.flush()
- try:
- download_with_resume(uri, dest)
- sys.stdout.write(' done.\n')
- except Exception as e:
- # delete partially downloaded data
- if os.path.exists(dest):
- os.unlink(dest)
- sys.stdout.write(' failed (%s)!\n' % e)
- raise
-
-
-def checkmd5(dest, md5sum=None):
- """
- checks file at dest against md5.
- :returns (boolean, hexdigest): True if dest contents matches md5sum
- """
- if not os.path.exists(dest):
- return False, 'null'
- with open(dest, 'rb') as f:
- md5value = hashlib.md5()
- while True:
- buf = f.read(4096)
- if not buf:
- break
- md5value.update(buf)
- hexdigest = md5value.hexdigest()
-
- print('Checking md5sum on %s' % (dest))
- return hexdigest == md5sum, hexdigest
-
-
-def main(argv=sys.argv[1:]):
- """
- Dowloads URI to file dest and checks md5 if given.
- """
- parser = ArgumentParser(description='Dowloads URI to file dest. If md5sum is given, checks md5sum. If file existed and mismatch, downloads and checks again')
- parser.add_argument('uri')
- parser.add_argument('dest')
- parser.add_argument('md5sum', nargs='?')
- parser.add_argument('--ignore-error', action='store_true', help='Ignore download errors')
- args = parser.parse_args(argv)
-
- uri = args.uri
- if '://' not in uri:
- uri = 'file://' + uri
-
- fresh = False
- if not os.path.exists(args.dest):
- try:
- download_md5(uri, args.dest)
- except Exception:
- if args.ignore_error:
- return 0
- raise
- fresh = True
-
- if args.md5sum:
- result, hexdigest = checkmd5(args.dest, args.md5sum)
- if result is False and fresh is False:
- print('WARNING: md5sum mismatch (%s != %s); re-downloading file %s' % (hexdigest, args.md5sum, args.dest))
- os.remove(args.dest)
- try:
- download_md5(uri, args.dest)
- except Exception:
- if args.ignore_error:
- return 0
- raise
- result, hexdigest = checkmd5(args.dest, args.md5sum)
- if result is False:
- return 'ERROR: md5sum mismatch (%s != %s) on %s; aborting' % (hexdigest, args.md5sum, args.dest)
-
- return 0
-
-
-if __name__ == '__main__':
- sys.exit(main())
diff --git a/cmake/catkin/test/gtest.cmake b/cmake/catkin/test/gtest.cmake
deleted file mode 100644
index 916f98f0c8..0000000000
--- a/cmake/catkin/test/gtest.cmake
+++ /dev/null
@@ -1,139 +0,0 @@
-_generate_function_if_testing_is_disabled("catkin_add_gtest")
-
-#
-# Add a GTest based test target.
-#
-# An executable target is created with the source files, it is linked
-# against GTest and added to the set of unit tests.
-#
-# .. note:: The test can be executed by calling the binary directly
-# or using: ``make run_tests_${PROJECT_NAME}_gtest_${target}``
-#
-# :param target: the target name
-# :type target: string
-# :param source_files: a list of source files used to build the test
-# executable
-# :type source_files: list of strings
-# :param TIMEOUT: currently not supported
-# :type TIMEOUT: integer
-# :param WORKING_DIRECTORY: the working directory when executing the
-# executable
-# :type WORKING_DIRECTORY: string
-#
-# @public
-#
-function(catkin_add_gtest target)
- _warn_if_skip_testing("catkin_add_gtest")
-
- if(NOT GTEST_FOUND AND NOT GTEST_FROM_SOURCE_FOUND)
- message(WARNING "skipping gtest '${target}' in project '${PROJECT_NAME}'")
- return()
- endif()
-
- if(NOT DEFINED CMAKE_RUNTIME_OUTPUT_DIRECTORY)
- message(FATAL_ERROR "catkin_add_gtest() must be called after catkin_package() so that default output directories for the test binaries are defined")
- endif()
-
- # XXX look for optional TIMEOUT argument, #2645
- cmake_parse_arguments(_gtest "" "TIMEOUT;WORKING_DIRECTORY" "" ${ARGN})
- if(_gtest_TIMEOUT)
- message(WARNING "TIMEOUT argument to catkin_add_gtest() is ignored")
- endif()
-
- # create the executable, with basic + gtest build flags
- include_directories(${GTEST_INCLUDE_DIRS})
- link_directories(${GTEST_LIBRARY_DIRS})
- add_executable(${target} EXCLUDE_FROM_ALL ${_gtest_UNPARSED_ARGUMENTS})
- assert(GTEST_LIBRARIES)
- target_link_libraries(${target} ${GTEST_LIBRARIES} ${THREADS_LIBRARY})
-
- # make sure gtest is built before the test target
- add_dependencies(${target} gtest gtest_main)
- # make sure the target is built before running tests
- add_dependencies(tests ${target})
-
- # XXX we DONT use rosunit to call the executable to get process control, #1629, #3112
- get_target_property(_target_path ${target} RUNTIME_OUTPUT_DIRECTORY)
- set(cmd "${_target_path}/${target} --gtest_output=xml:${CATKIN_TEST_RESULTS_DIR}/${PROJECT_NAME}/gtest-${target}.xml")
- catkin_run_tests_target("gtest" ${target} "gtest-${target}.xml" COMMAND ${cmd} DEPENDENCIES ${target} WORKING_DIRECTORY ${_gtest_WORKING_DIRECTORY})
-endfunction()
-
-find_package(GTest QUIET)
-if(NOT GTEST_FOUND)
- # only add gtest directory once per workspace
- if(NOT TARGET gtest)
- # fall back to system installed path (i.e. on Ubuntu)
- set(_paths "/usr/src/gtest/src")
- if(CATKIN_TOPLEVEL)
- # search in the current workspace before
- list(INSERT _paths 0 "${CMAKE_SOURCE_DIR}/gtest/src")
- endif()
- find_file(_CATKIN_GTEST_SRC "gtest.cc"
- PATHS ${_paths}
- NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH)
-
- # fall back to system installed path (i.e. on Ubuntu)
- set(_paths "/usr/include/gtest")
- if(CATKIN_TOPLEVEL)
- # search in the current workspace before
- list(INSERT _paths 0 "${CMAKE_SOURCE_DIR}/gtest/include/gtest")
- endif()
- find_file(_CATKIN_GTEST_INCLUDE "gtest.h"
- PATHS ${_paths}
- NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH)
-
- if(_CATKIN_GTEST_SRC)
- get_filename_component(_CATKIN_GTEST_SOURCE_DIR ${_CATKIN_GTEST_SRC} PATH)
- get_filename_component(_CATKIN_GTEST_BASE_DIR ${_CATKIN_GTEST_SOURCE_DIR} PATH)
- # add CMakeLists.txt from gtest dir
- set(_CATKIN_GTEST_BINARY_DIR ${CMAKE_BINARY_DIR}/gtest)
- add_subdirectory(${_CATKIN_GTEST_BASE_DIR} ${_CATKIN_GTEST_BINARY_DIR})
- # mark gtest targets with EXCLUDE_FROM_ALL to only build when tests are built which depend on them
- set_target_properties(gtest gtest_main PROPERTIES EXCLUDE_FROM_ALL 1)
- get_filename_component(_CATKIN_GTEST_INCLUDE_DIR ${_CATKIN_GTEST_INCLUDE} PATH)
- get_filename_component(_CATKIN_GTEST_INCLUDE_DIR ${_CATKIN_GTEST_INCLUDE_DIR} PATH)
- # set from-source variables
- set(GTEST_FROM_SOURCE_FOUND TRUE CACHE INTERNAL "")
- set(GTEST_FROM_SOURCE_INCLUDE_DIRS ${_CATKIN_GTEST_INCLUDE_DIR} CACHE INTERNAL "")
- set(GTEST_FROM_SOURCE_LIBRARY_DIRS ${_CATKIN_GTEST_BINARY_DIR} CACHE INTERNAL "")
- set(GTEST_FROM_SOURCE_LIBRARIES "gtest" CACHE INTERNAL "")
- set(GTEST_FROM_SOURCE_MAIN_LIBRARIES "gtest_main" CACHE INTERNAL "")
- #message(STATUS "Found gtest sources under '${_CATKIN_GTEST_BASE_DIR}': gtests will be built")
- endif()
- if(NOT GTEST_FROM_SOURCE_FOUND)
- if(CATKIN_TOPLEVEL)
- message(STATUS "gtest not found, C++ tests can not be built. Please install the gtest headers globally in your system or checkout gtest (by running 'svn checkout http://googletest.googlecode.com/svn/tags/release-1.6.0 gtest' in the source space '${CMAKE_SOURCE_DIR}' of your workspace) to enable gtests")
- else()
- message(STATUS "gtest not found, C++ tests can not be built. Please install the gtest headers globally in your system to enable gtests")
- endif()
- endif()
- endif()
- if(GTEST_FROM_SOURCE_FOUND)
- # set the same variables as find_package()
- # do NOT set GTEST_FOUND in the cache since when using gtest from source
- # we must always add the subdirectory to have the gtest targets defined
- set(GTEST_FOUND ${GTEST_FROM_SOURCE_FOUND})
- set(GTEST_INCLUDE_DIRS ${GTEST_FROM_SOURCE_INCLUDE_DIRS})
- set(GTEST_LIBRARY_DIRS ${GTEST_FROM_SOURCE_LIBRARY_DIRS})
- set(GTEST_LIBRARIES ${GTEST_FROM_SOURCE_LIBRARIES})
- set(GTEST_MAIN_LIBRARIES ${GTEST_FROM_SOURCE_MAIN_LIBRARIES})
- set(GTEST_BOTH_LIBRARIES ${GTEST_LIBRARIES} ${GTEST_MAIN_LIBRARIES})
- endif()
-else()
- #message(STATUS "Found gtest: gtests will be built")
- add_library(gtest SHARED IMPORTED)
- set_target_properties(gtest PROPERTIES IMPORTED_LOCATION "${GTEST_LIBRARIES}")
- add_library(gtest_main SHARED IMPORTED)
- set_target_properties(gtest_main PROPERTIES IMPORTED_LOCATION "${GTEST_MAIN_LIBRARIES}")
- set(GTEST_FOUND ${GTEST_FOUND} CACHE INTERNAL "")
- set(GTEST_INCLUDE_DIRS ${GTEST_INCLUDE_DIRS} CACHE INTERNAL "")
- set(GTEST_LIBRARIES ${GTEST_LIBRARIES} CACHE INTERNAL "")
- set(GTEST_MAIN_LIBRARIES ${GTEST_MAIN_LIBRARIES} CACHE INTERNAL "")
- set(GTEST_BOTH_LIBRARIES ${GTEST_BOTH_LIBRARIES} CACHE INTERNAL "")
-endif()
-# For Visual C++, need to increase variadic template size to build gtest
-if(GTEST_FOUND)
- if(WIN32)
- add_definitions(/D _VARIADIC_MAX=10)
- endif()
-endif()
diff --git a/cmake/catkin/test/nosetests.cmake b/cmake/catkin/test/nosetests.cmake
deleted file mode 100644
index 874e46115f..0000000000
--- a/cmake/catkin/test/nosetests.cmake
+++ /dev/null
@@ -1,117 +0,0 @@
-_generate_function_if_testing_is_disabled("catkin_add_nosetests")
-
-#
-# Add Python nose tests.
-#
-# Nose collects tests from the directory ``dir`` automatically.
-#
-# .. note:: The test can be executed by calling ``nosetests``
-# directly or using:
-# `` make run_tests_${PROJECT_NAME}_nosetests_${dir}``
-# (where slashes in the ``dir`` are replaced with underscores)
-#
-# :param path: a relative or absolute directory to search for
-# nosetests in or a relative or absolute file containing tests
-# :type path: string
-# :param DEPENDENCIES: the targets which must be built before executing
-# the test
-# :type DEPENDENCIES: list of strings
-# :param TIMEOUT: the timeout for individual tests in seconds
-# (default: 60)
-# :type TIMEOUT: integer
-# :param WORKING_DIRECTORY: the working directory when executing the
-# tests
-# :type WORKING_DIRECTORY: string
-#
-# @public
-#
-function(catkin_add_nosetests path)
- _warn_if_skip_testing("catkin_add_nosetests")
-
- if(NOT NOSETESTS)
- message(STATUS "skipping nosetests(${path}) in project '${PROJECT_NAME}'")
- return()
- endif()
-
- cmake_parse_arguments(_nose "" "TIMEOUT;WORKING_DIRECTORY" "DEPENDENCIES" ${ARGN})
- if(NOT _nose_TIMEOUT)
- set(_nose_TIMEOUT 60)
- endif()
- if(NOT _nose_TIMEOUT GREATER 0)
- message(FATAL_ERROR "nosetests() TIMEOUT argument must be a valid number of seconds greater than zero")
- endif()
-
- # check that the directory exists
- set(_path_name _path_name-NOTFOUND)
- if(IS_ABSOLUTE ${path})
- set(_path_name ${path})
- else()
- find_file(_path_name ${path}
- PATHS ${CMAKE_CURRENT_SOURCE_DIR}
- NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH)
- if(NOT _path_name)
- message(FATAL_ERROR "Can't find nosetests path '${path}'")
- endif()
- endif()
-
- # check if coverage reports are being requested
- if("$ENV{CATKIN_TEST_COVERAGE}" STREQUAL "1")
- set(_covarg " --with-coverage")
- endif()
-
- # strip PROJECT_SOURCE_DIR and PROJECT_BINARY_DIR prefix from output_file_name
- set(output_file_name ${path})
- _strip_path_prefix(output_file_name "${output_file_name}" "${PROJECT_SOURCE_DIR}")
- _strip_path_prefix(output_file_name "${output_file_name}" "${PROJECT_BINARY_DIR}")
- if("${output_file_name}" STREQUAL "")
- set(output_file_name ".")
- endif()
- string(REPLACE "/" "." output_file_name ${output_file_name})
- string(REPLACE ":" "." output_file_name ${output_file_name})
-
- set(output_path ${CATKIN_TEST_RESULTS_DIR}/${PROJECT_NAME})
- # make --xunit-file argument an absolute path (https://github.com/nose-devs/nose/issues/779)
- get_filename_component(output_path "${output_path}" ABSOLUTE)
- set(cmd "${CMAKE_COMMAND} -E make_directory ${output_path}")
- if(IS_DIRECTORY ${_path_name})
- set(tests "--where=${_path_name}")
- else()
- set(tests "${_path_name}")
- endif()
- set(cmd ${cmd} "${NOSETESTS} -P --process-timeout=${_nose_TIMEOUT} ${tests} --with-xunit --xunit-file=${output_path}/nosetests-${output_file_name}.xml${_covarg}")
- catkin_run_tests_target("nosetests" ${output_file_name} "nosetests-${output_file_name}.xml" COMMAND ${cmd} DEPENDENCIES ${_nose_DEPENDENCIES} WORKING_DIRECTORY ${_nose_WORKING_DIRECTORY})
-endfunction()
-
-find_program(NOSETESTS NAMES
- "nosetests${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}"
- "nosetests-${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}"
- "nosetests${PYTHON_VERSION_MAJOR}"
- "nosetests-${PYTHON_VERSION_MAJOR}"
- "nosetests")
-if(NOT NOSETESTS)
- if("${PYTHON_VERSION_MAJOR}" STREQUAL "3")
- message(WARNING "nosetests not found, Python tests can not be run (try installing package 'python3-nose')")
- else()
- message(WARNING "nosetests not found, Python tests can not be run (try installing package 'python-nose')")
- endif()
-endif()
-
-macro(_strip_path_prefix var value prefix)
- if("${value}" STREQUAL "${prefix}" OR "${value}" STREQUAL "${prefix}/")
- set(${var} "")
- else()
- set(${var} "${value}")
- string(LENGTH "${prefix}/" prefix_length)
- string(LENGTH "${value}" var_length)
- if(${var_length} GREATER ${prefix_length})
- string(SUBSTRING "${value}" 0 ${prefix_length} var_prefix)
- if("${var_prefix}" STREQUAL "${prefix}/")
- # passing length -1 does not work for CMake < 2.8.5
- # http://public.kitware.com/Bug/view.php?id=10740
- string(LENGTH "${value}" _rest)
- math(EXPR _rest "${_rest} - ${prefix_length}")
- string(SUBSTRING "${value}" ${prefix_length} ${_rest} ${var})
- endif()
- endif()
- endif()
-endmacro()
diff --git a/cmake/catkin/test/run_tests.py b/cmake/catkin/test/run_tests.py
deleted file mode 100755
index 9b93d55e2b..0000000000
--- a/cmake/catkin/test/run_tests.py
+++ /dev/null
@@ -1,44 +0,0 @@
-#!/usr/bin/env python
-
-from __future__ import print_function
-
-import argparse
-import os
-import sys
-import subprocess
-
-from catkin.test_results import ensure_junit_result_exist, remove_junit_result
-
-
-def main(argv=sys.argv[1:]):
- parser = argparse.ArgumentParser(description='Runs the test command passed as an argument and verifies that the expected result file has been generated.')
- parser.add_argument('results', help='The path to the xunit result file')
- parser.add_argument('command', nargs='+', help='The test command to execute')
- parser.add_argument('--working-dir', nargs='?', help='The working directory for the executed command')
- parser.add_argument('--return-code', action='store_true', default=False, help='Set the return code based on the success of the test command')
- args = parser.parse_args(argv)
-
- remove_junit_result(args.results)
-
- work_dir_msg = ' with working directory "%s"' % args.working_dir if args.working_dir is not None else ''
- cmds_msg = ''.join(['\n %s' % cmd for cmd in args.command])
- print('-- run_tests.py: execute commands%s%s' % (work_dir_msg, cmds_msg))
-
- rc = 0
- for cmd in args.command:
- rc = subprocess.call(cmd, cwd=args.working_dir, shell=True)
- if rc:
- break
-
- print('-- run_tests.py: verify result "%s"' % args.results)
- no_errors = ensure_junit_result_exist(args.results)
- if not no_errors:
- rc = 1
-
- if args.return_code:
- return rc
- return 0
-
-
-if __name__ == '__main__':
- sys.exit(main())
diff --git a/cmake/catkin/test/tests.cmake b/cmake/catkin/test/tests.cmake
deleted file mode 100644
index cccaec7641..0000000000
--- a/cmake/catkin/test/tests.cmake
+++ /dev/null
@@ -1,147 +0,0 @@
-option(CATKIN_ENABLE_TESTING "Catkin enable testing" ON)
-
-if(NOT DEFINED CATKIN_SKIP_TESTING)
- option(CATKIN_SKIP_TESTING "Catkin skip testing" OFF)
-endif()
-
-# check if testing is explicity skipped
-if(CATKIN_SKIP_TESTING)
- set(CATKIN_ENABLE_TESTING OFF)
- #message(STATUS "Using CATKIN_SKIP_TESTING: ${CATKIN_SKIP_TESTING} (implying CATKIN_ENABLE_TESTING=${CATKIN_ENABLE_TESTING})")
-else()
- #message(STATUS "Using CATKIN_ENABLE_TESTING: ${CATKIN_ENABLE_TESTING}")
-endif()
-
-# creates a dummy function in case testing has been explicitly disabled (and not only skipping)
-# which outputs an error message when being invoked
-macro(_generate_function_if_testing_is_disabled funcname)
- if(DEFINED CATKIN_ENABLE_TESTING AND NOT CATKIN_ENABLE_TESTING AND NOT CATKIN_SKIP_TESTING)
- function(${funcname})
- message(FATAL_ERROR
- "${funcname}() is not available when tests are not enabled. The CMake code should only use it inside a conditional block which checks that testing is enabled:\n"
- "if(CATKIN_ENABLE_TESTING)\n"
- " ${funcname}(...)\n"
- "endif()\n")
- endfunction()
- return()
- endif()
-endmacro()
-
-# checks if a function has been called while testing is skipped
-# and outputs a warning message
-macro(_warn_if_skip_testing funcname)
- if(DEFINED CATKIN_ENABLE_TESTING AND NOT CATKIN_ENABLE_TESTING)
- message(WARNING
- "${funcname}() should only be used inside a conditional block which checks that testing is enabled:\n"
- "if(CATKIN_ENABLE_TESTING)\n"
- " ${funcname}(...)\n"
- "endif()\n")
- endif()
-endmacro()
-
-if(DEFINED CATKIN_ENABLE_TESTING AND NOT CATKIN_ENABLE_TESTING AND NOT CATKIN_SKIP_TESTING)
- return()
-endif()
-
-# do not enable ctest's on the farm, since they are automatically executed by the current rules files
-# and since the tests have not been build rostests would hang forever
-if(NOT CATKIN_BUILD_BINARY_PACKAGE)
- # do not enable ctest's for dry packages, since they have a custom test target which must not be overwritten
- if(NOT ROSBUILD_init_called)
- #message(STATUS "Call enable_testing()")
- enable_testing()
- else()
- message(STATUS "Skip enable_testing() for dry packages")
- endif()
-else()
- message(STATUS "Skip enable_testing() when building binary package")
-endif()
-
-# allow overriding CATKIN_TEST_RESULTS_DIR when explicitly passed to CMake as a command line argument
-if(DEFINED CATKIN_TEST_RESULTS_DIR)
- set(CATKIN_TEST_RESULTS_DIR ${CATKIN_TEST_RESULTS_DIR} CACHE INTERNAL "")
-else()
- set(CATKIN_TEST_RESULTS_DIR ${CMAKE_BINARY_DIR}/test_results CACHE INTERNAL "")
-endif()
-#message(STATUS "Using CATKIN_TEST_RESULTS_DIR: ${CATKIN_TEST_RESULTS_DIR}")
-file(MAKE_DIRECTORY ${CATKIN_TEST_RESULTS_DIR})
-
-# create target to build tests
-if(NOT TARGET tests)
- add_custom_target(tests)
-endif()
-
-# create target to run all tests
-# it uses the dot-prefixed test targets to depend on building all tests and cleaning test results before the tests are executed
-if(NOT TARGET run_tests)
- add_custom_target(run_tests)
-endif()
-
-# create target to clean test results
-if(NOT TARGET clean_test_results)
- add_custom_target(clean_test_results
- COMMAND ${CMAKE_COMMAND} -E remove_directory ${CATKIN_TEST_RESULTS_DIR})
-endif()
-
-#
-# Create a test target, integrate it with the run_tests infrastructure
-# and post-process the junit result.
-#
-# All test results go under ${CATKIN_TEST_RESULTS_DIR}/${PROJECT_NAME}/..
-#
-# This function is only used internally by the various
-# catkin_add_*test() functions.
-#
-function(catkin_run_tests_target type name xunit_filename)
- cmake_parse_arguments(_testing "" "WORKING_DIRECTORY" "COMMAND;DEPENDENCIES" ${ARGN})
- if(_testing_UNPARSED_ARGUMENTS)
- message(FATAL_ERROR "catkin_run_tests_target() called with unused arguments: ${_testing_UNPARSED_ARGUMENTS}")
- endif()
-
- # create meta target to trigger all tests of a project
- if(NOT TARGET run_tests_${PROJECT_NAME})
- add_custom_target(run_tests_${PROJECT_NAME})
- # create hidden meta target which depends on hidden test targets which depend on clean_test_results
- add_custom_target(_run_tests_${PROJECT_NAME})
- # run_tests depends on this hidden target hierarchy to clear test results before running all tests
- add_dependencies(run_tests _run_tests_${PROJECT_NAME})
- endif()
- # create meta target to trigger all tests of a specific type of a project
- if(NOT TARGET run_tests_${PROJECT_NAME}_${type})
- add_custom_target(run_tests_${PROJECT_NAME}_${type})
- add_dependencies(run_tests_${PROJECT_NAME} run_tests_${PROJECT_NAME}_${type})
- # hidden meta target which depends on hidden test targets which depend on clean_test_results
- add_custom_target(_run_tests_${PROJECT_NAME}_${type})
- add_dependencies(_run_tests_${PROJECT_NAME} _run_tests_${PROJECT_NAME}_${type})
- endif()
- if(NOT DEFINED CATKIN_ENABLE_TESTING OR CATKIN_ENABLE_TESTING)
- # create target for test execution
- set(results ${CATKIN_TEST_RESULTS_DIR}/${PROJECT_NAME}/${xunit_filename})
- if (_testing_WORKING_DIRECTORY)
- set(working_dir_arg "--working-dir" ${_testing_WORKING_DIRECTORY})
- endif()
- assert(CATKIN_ENV)
- set(cmd_wrapper ${CATKIN_ENV} ${PYTHON_EXECUTABLE}
- ${catkin_EXTRAS_DIR}/test/run_tests.py ${results} ${working_dir_arg})
- # for ctest the command needs to return non-zero if any test failed
- set(cmd ${cmd_wrapper} "--return-code" ${_testing_COMMAND})
- add_test(NAME _ctest_${PROJECT_NAME}_${type}_${name} COMMAND ${cmd})
- # for the run_tests target the command needs to return zero so that testing is not aborted
- set(cmd ${cmd_wrapper} ${_testing_COMMAND})
- add_custom_target(run_tests_${PROJECT_NAME}_${type}_${name}
- COMMAND ${cmd})
- else()
- # create empty dummy target
- set(cmd "${CMAKE_COMMAND}" "-E" "echo" "Skipping test target \\'run_tests_${PROJECT_NAME}_${type}_${name}\\'. Enable testing via -DCATKIN_ENABLE_TESTING.")
- add_custom_target(run_tests_${PROJECT_NAME}_${type}_${name} ${cmd})
- endif()
- add_dependencies(run_tests_${PROJECT_NAME}_${type} run_tests_${PROJECT_NAME}_${type}_${name})
- if(_testing_DEPENDENCIES)
- add_dependencies(run_tests_${PROJECT_NAME}_${type}_${name} ${_testing_DEPENDENCIES})
- endif()
- # hidden test target which depends on building all tests and cleaning test results
- add_custom_target(_run_tests_${PROJECT_NAME}_${type}_${name}
- COMMAND ${cmd})
- add_dependencies(_run_tests_${PROJECT_NAME}_${type} _run_tests_${PROJECT_NAME}_${type}_${name})
- add_dependencies(_run_tests_${PROJECT_NAME}_${type}_${name} clean_test_results tests ${_testing_DEPENDENCIES})
-endfunction()
diff --git a/cmake/catkin/tools/bz2.cmake b/cmake/catkin/tools/bz2.cmake
deleted file mode 100644
index d5f129d2a3..0000000000
--- a/cmake/catkin/tools/bz2.cmake
+++ /dev/null
@@ -1,31 +0,0 @@
-#
-# Copyright (c) 2011, Willow Garage, Inc.
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions are met:
-# * Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# * Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in the
-# documentation and/or other materials provided with the distribution.
-# * Neither the name of the Willow Garage, Inc. nor the names of its
-# contributors may be used to endorse or promote products derived from
-# this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
-# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-# POSSIBILITY OF SUCH DAMAGE.
-#
-
-
-find_package(Bzip2)
-
diff --git a/cmake/catkin/tools/doxygen.cmake b/cmake/catkin/tools/doxygen.cmake
deleted file mode 100644
index e8ed5d721f..0000000000
--- a/cmake/catkin/tools/doxygen.cmake
+++ /dev/null
@@ -1,64 +0,0 @@
-#
-# Copyright (c) 2011, Willow Garage, Inc.
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions are met:
-# * Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# * Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in the
-# documentation and/or other materials provided with the distribution.
-# * Neither the name of the Willow Garage, Inc. nor the names of its
-# contributors may be used to endorse or promote products derived from
-# this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
-# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-# POSSIBILITY OF SUCH DAMAGE.
-#
-
-##
-# doxygen( )
-# TARGET_NAME -> The cmake target to create.
-# SEARCH_DIRS -> a CMake List of directories to search for doxygenated files.
-#
-find_program(DOXYGEN_EXECUTABLE doxygen)
-
-if (DOXYGEN_EXECUTABLE)
- set(DOXYGEN_FOUND TRUE CACHE BOOL "Doxygen found")
-endif()
-
-if(NOT TARGET doxygen)
- add_custom_target(doxygen)
-endif()
-
-macro(catkin_doxygen TARGET_NAME SEARCH_DIRS)
- foreach(dir ${SEARCH_DIRS})
- file(GLOB_RECURSE _doc_sources ${dir}/*)
- list(APPEND doc_sources ${_doc_sources})
- endforeach()
-
- string(REPLACE ";" " " doc_sources "${doc_sources}")
-
- configure_file(${catkin_EXTRAS_DIR}/templates/Doxyfile.in ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile @ONLY)
-
- add_custom_target(${TARGET_NAME}
- COMMENT "Generating API documentation with Doxygen" VERBATIM
- )
-
- add_custom_command(TARGET ${TARGET_NAME}
- COMMAND ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile
- WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
- )
- add_dependencies(doxygen ${TARGET_NAME})
-
-endmacro()
diff --git a/cmake/catkin/tools/libraries.cmake b/cmake/catkin/tools/libraries.cmake
deleted file mode 100644
index 77e38d680e..0000000000
--- a/cmake/catkin/tools/libraries.cmake
+++ /dev/null
@@ -1,22 +0,0 @@
-# BUILD_SHARED_LIBS is a global cmake variable (usually defaults to on)
-# that determines the build type of libraries:
-# http://www.cmake.org/cmake/help/cmake-2-8-docs.html#variable:BUILD_SHARED_LIBS
-# It defaults to shared.
-#
-# Our only current major use case for static libraries is
-# via the mingw cross compiler, though embedded builds
-# could be feasibly built this way also (largely untested).
-
-# Make sure this is already defined as a cached variable (@sa platform/windows.cmake)
-if(NOT DEFINED BUILD_SHARED_LIBS)
- option(BUILD_SHARED_LIBS "Build dynamically-linked binaries" ON)
-endif()
-
-function(configure_shared_library_build_settings)
- if(BUILD_SHARED_LIBS)
- message(STATUS "BUILD_SHARED_LIBS is on")
- add_definitions(-DROS_BUILD_SHARED_LIBS=1)
- else()
- message(STATUS "BUILD_SHARED_LIBS is off")
- endif()
-endfunction()
diff --git a/cmake/catkin/tools/rt.cmake b/cmake/catkin/tools/rt.cmake
deleted file mode 100644
index 3e5b708d8f..0000000000
--- a/cmake/catkin/tools/rt.cmake
+++ /dev/null
@@ -1,45 +0,0 @@
-#
-# Copyright (c) 2011, Willow Garage, Inc.
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions are met:
-# * Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# * Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in the
-# documentation and/or other materials provided with the distribution.
-# * Neither the name of the Willow Garage, Inc. nor the names of its
-# contributors may be used to endorse or promote products derived from
-# this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
-# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-# POSSIBILITY OF SUCH DAMAGE.
-#
-
-# message("CMAKE_LIBRARY_PATH: ${CMAKE_LIBRARY_PATH}")
-# message("CMAKE_LIBRARY_ARCHITECTURE: ${CMAKE_LIBRARY_ARCHITECTURE}")
-# message("CMAKE_SYSTEM_LIBRARY_PATH: ${CMAKE_SYSTEM_LIBRARY_PATH}")
-# message("CMAKE_VERSION=${CMAKE_VERSION}")
-
-if(NOT (APPLE OR WIN32 OR MINGW OR ANDROID))
- if (${CMAKE_VERSION} VERSION_LESS 2.8.4)
- # cmake later than 2.8.0 appears to have a better find_library
- # that knows about the ABI of the compiler. For lucid we just
- # depend on the linker to find it for us.
- set(RT_LIBRARY rt CACHE FILEPATH "Hacked find of rt for cmake < 2.8.4")
- else()
- find_library(RT_LIBRARY rt)
- assert_file_exists(${RT_LIBRARY} "RT Library")
- endif()
- #message(STATUS "RT_LIBRARY: ${RT_LIBRARY}")
-endif()
diff --git a/cmake/catkin/tools/threads.cmake b/cmake/catkin/tools/threads.cmake
deleted file mode 100644
index 8087ad6fa1..0000000000
--- a/cmake/catkin/tools/threads.cmake
+++ /dev/null
@@ -1,31 +0,0 @@
-#
-# Copyright (c) 2011, Willow Garage, Inc.
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions are met:
-# * Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# * Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in the
-# documentation and/or other materials provided with the distribution.
-# * Neither the name of the Willow Garage, Inc. nor the names of its
-# contributors may be used to endorse or promote products derived from
-# this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
-# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-# POSSIBILITY OF SUCH DAMAGE.
-#
-
-
-find_package(Threads)
-set(THREADS_LIBRARY ${CMAKE_THREAD_LIBS_INIT} CACHE FILEPATH "Threads library")
diff --git a/cmake/catkin/toplevel.cmake b/cmake/catkin/toplevel.cmake
deleted file mode 100644
index 2978ef0654..0000000000
--- a/cmake/catkin/toplevel.cmake
+++ /dev/null
@@ -1,63 +0,0 @@
-# toplevel CMakeLists.txt for a catkin workspace
-# catkin/cmake/toplevel.cmake
-
-cmake_minimum_required(VERSION 2.8.3)
-
-set(CATKIN_TOPLEVEL TRUE)
-
-# search for catkin within the workspace
-set(_cmd "catkin_find_pkg" "catkin" "${CMAKE_SOURCE_DIR}")
-execute_process(COMMAND ${_cmd}
- RESULT_VARIABLE _res
- OUTPUT_VARIABLE _out
- ERROR_VARIABLE _err
- OUTPUT_STRIP_TRAILING_WHITESPACE
- ERROR_STRIP_TRAILING_WHITESPACE
-)
-if(NOT _res EQUAL 0 AND NOT _res EQUAL 2)
- # searching fot catkin resulted in an error
- string(REPLACE ";" " " _cmd_str "${_cmd}")
- message(FATAL_ERROR "Search for 'catkin' in workspace failed (${_cmd_str}): ${_err}")
-endif()
-
-# include catkin from workspace or via find_package()
-if(_res EQUAL 0)
- set(catkin_EXTRAS_DIR "${CMAKE_SOURCE_DIR}/${_out}/cmake")
- # include all.cmake without add_subdirectory to let it operate in same scope
- include(${catkin_EXTRAS_DIR}/all.cmake NO_POLICY_SCOPE)
- add_subdirectory("${_out}")
-
-else()
- # use either CMAKE_PREFIX_PATH explicitly passed to CMake as a command line argument
- # or CMAKE_PREFIX_PATH from the environment
- if(NOT DEFINED CMAKE_PREFIX_PATH)
- if(NOT "$ENV{CMAKE_PREFIX_PATH}" STREQUAL "")
- string(REPLACE ":" ";" CMAKE_PREFIX_PATH $ENV{CMAKE_PREFIX_PATH})
- endif()
- endif()
-
- # list of catkin workspaces
- set(catkin_search_path "")
- foreach(path ${CMAKE_PREFIX_PATH})
- if(EXISTS "${path}/.catkin")
- list(FIND catkin_search_path ${path} _index)
- if(_index EQUAL -1)
- list(APPEND catkin_search_path ${path})
- endif()
- endif()
- endforeach()
-
- # search for catkin in all workspaces
- set(CATKIN_TOPLEVEL_FIND_PACKAGE TRUE)
- find_package(catkin QUIET
- NO_POLICY_SCOPE
- PATHS ${catkin_search_path}
- NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH)
- unset(CATKIN_TOPLEVEL_FIND_PACKAGE)
-
- if(NOT catkin_FOUND)
- message(FATAL_ERROR "find_package(catkin) failed. catkin was neither found in the workspace nor in the CMAKE_PREFIX_PATH. One reason may be that no ROS setup.sh was sourced before.")
- endif()
-endif()
-
-catkin_workspace()
diff --git a/cmake/catkin2Config.cmake b/cmake/catkin2Config.cmake
index f1212b16f3..90bd6f89ff 100644
--- a/cmake/catkin2Config.cmake
+++ b/cmake/catkin2Config.cmake
@@ -27,8 +27,9 @@
# :outvar _INCLUDE_DIRS/_LIBRARY_DIRS/_LIBRARY:
# contains the include dirs / library dirs / libraries of the searched component .
+find_package(catkin REQUIRED) # defines catkin_DIR
if(CATKIN_TOPLEVEL_FIND_PACKAGE OR NOT CATKIN_TOPLEVEL)
- set(catkin_EXTRAS_DIR ${CMAKE_CURRENT_LIST_DIR}/catkin)
+ set(catkin_EXTRAS_DIR "${catkin_DIR}")
# prevent multiple inclusion from repeated find_package() calls in non-workspace context
# as long as this variable is in the scope the variables from all.cmake are also, so no need to be evaluated again
@@ -92,15 +93,24 @@ if(catkin2_FIND_COMPONENTS)
endforeach()
# find package component
- if(catkin2_FIND_REQUIRED)
- find_package(${component} REQUIRED NO_MODULE PATHS ${paths}
- NO_DEFAULT_PATH)
- elseif(catkin2_FIND_QUIETLY)
+ if(catkin_FIND_REQUIRED)
+ # try without REQUIRED first
+ find_package(${component} NO_MODULE PATHS ${paths}
+ NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH)
+ if(NOT ${component}_FOUND)
+ # show better message to help users with the CMake error message coming up
+ message(STATUS "Could not find the required component '${component}'. "
+ "The following CMake error indicates that you either need to install the package "
+ "with the same name or change your environment so that it can be found.")
+ find_package(${component} REQUIRED NO_MODULE PATHS ${paths}
+ NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH)
+ endif()
+ elseif(catkin_FIND_QUIETLY)
find_package(${component} QUIET NO_MODULE PATHS ${paths}
- NO_DEFAULT_PATH)
+ NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH)
else()
find_package(${component} NO_MODULE PATHS ${paths}
- NO_DEFAULT_PATH)
+ NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH)
endif()
# ROS Packages give their library packages via hard coded
diff --git a/cmake/package.xml b/cmake/package.xml
deleted file mode 100644
index c0bf80b0d7..0000000000
--- a/cmake/package.xml
+++ /dev/null
@@ -1,37 +0,0 @@
-
-
- catkin
- 0.6.11
- Low-level build system macros and infrastructure for ROS.
- Dirk Thomas
- BSD
-
- http://www.ros.org/wiki/catkin
- https://github.com/ros/catkin/issues
- https://github.com/ros/catkin
-
- Troy Straszheim
- Morten Kjaergaard
- Brian Gerkey
- Dirk Thomas
-
- cmake
- cmake
-
- python-argparse
- python-catkin-pkg
-
- python-empy
-
- gtest
- python-empy
- python-nose
-
- python-mock
- python-nose
-
-
-
-
-
-
diff --git a/communications/CMakeLists.txt b/communications/CMakeLists.txt
deleted file mode 100644
index d8162a363c..0000000000
--- a/communications/CMakeLists.txt
+++ /dev/null
@@ -1,24 +0,0 @@
-# Copyright (c) 2017, United States Government, as represented by the
-# Administrator of the National Aeronautics and Space Administration.
-#
-# All rights reserved.
-#
-# The Astrobee platform is licensed under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with the
-# License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-# License for the specific language governing permissions and limitations
-# under the License.
-
-add_subdirectory(ff_msgs)
-add_subdirectory(ff_hw_msgs)
-
-if (USE_DDS)
- add_subdirectory(dds_msgs)
- add_subdirectory(dds_ros_bridge)
-endif (USE_DDS)
diff --git a/communications/dds_msgs/CMakeLists.txt b/communications/dds_msgs/CMakeLists.txt
index 6d9c160e76..c593054aa4 100644
--- a/communications/dds_msgs/CMakeLists.txt
+++ b/communications/dds_msgs/CMakeLists.txt
@@ -15,4 +15,100 @@
# License for the specific language governing permissions and limitations
# under the License.
-add_subdirectory(idl)
+cmake_minimum_required(VERSION 3.0)
+project(dds_msgs)
+
+## Compile as C++14, supported in ROS Kinetic and newer
+add_compile_options(-std=c++14)
+
+if (USE_DDS)
+ ## Find catkin macros and libraries
+ find_package(catkin2 REQUIRED COMPONENTS
+ )
+
+ if (USE_CTC)
+ set(SORACORE_ROOT_DIR ${ARM_CHROOT_DIR}/usr)
+ else (USE_CTC)
+ set(SORACORE_ROOT_DIR /usr)
+ endif (USE_CTC)
+
+ set(MIRO_ROOT_DIR ${SORACORE_ROOT_DIR})
+
+ list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/../../cmake")
+ find_package(Qt4 4.6.0 REQUIRED QtXml)
+
+ find_package(Miro REQUIRED)
+ find_package(RtiDds REQUIRED)
+ find_package(Soracore REQUIRED)
+
+ catkin_package(
+ INCLUDE_DIRS ${CMAKE_CURRENT_BINARY_DIR}/..
+ LIBRARIES
+ rapidExtAstrobee
+ )
+
+ ###########
+ ## Build ##
+ ###########
+ # Specify additional locations of header files
+ include_directories(
+ ${catkin_INCLUDE_DIRS}
+ ${CMAKE_CURRENT_BINARY_DIR}
+ ${RTIDDS_INCLUDE_DIR}
+ ${SORACORE_INCLUDE_DIRS}
+ ${CMAKE_SOURCE_DIR}/rapidDds
+ ${SORACORE_IDL_DIR}/rapidDds
+ )
+
+ # Copying IDL files
+ file(GLOB ASTROBEE_IDL_FILES
+ "idl/*.idl")
+ file(COPY ${ASTROBEE_IDL_FILES} DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
+
+ set(LIB_NAME "rapidExtAstrobee")
+
+ include(CreateDdsMsgTargets)
+
+ set(EXTRA_RTIDDS_IDL_ARGS -I${SORACORE_IDL_DIR}/rapidDds)
+ create_dds_msg_targets(
+ NAME ${LIB_NAME}
+ DIR ${CMAKE_CURRENT_BINARY_DIR}
+ INCLUDES "-I${SORACORE_IDL_DIR}/rapidDds")
+
+ add_library(${LIB_NAME} ${rapidExtAstrobee_GENERATED})
+ target_link_libraries(${LIB_NAME}
+ rapidDds
+ )
+ target_compile_definitions(${LIB_NAME} PUBLIC ${RTIDDS_DEFINE_FLAGS})
+ target_compile_options(${LIB_NAME} PUBLIC -Wno-write-strings)
+ target_compile_options(${LIB_NAME} PRIVATE -Wno-strict-aliasing)
+ target_include_directories(${LIB_NAME} PUBLIC
+ ${CMAKE_CURRENT_BINARY_DIR}
+ ${RTIDDS_INCLUDE_DIR}
+ ${SORACORE_INCLUDE_DIRS}
+ ${MIRO_INCLUDE_DIR})
+
+ #############
+ ## Install ##
+ #############
+
+ # Mark libraries for installation
+ install(TARGETS ${LIB_NAME}
+ ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
+ LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
+ RUNTIME DESTINATION ${CATKIN_GLOBAL_BIN_DESTINATION}
+ )
+
+ install(FILES ${rapidExtAstrobee_GENERATED_HEADERS}
+ DESTINATION include/${LIB_NAME})
+
+ # Mark cpp header files for installation
+ install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
+ DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION}/../
+ FILES_MATCHING PATTERN "dds_msgs/*.h"
+ PATTERN ".svn" EXCLUDE
+ )
+else (USE_DDS)
+ find_package(catkin REQUIRED COMPONENTS)
+ catkin_package()
+endif (USE_DDS)
\ No newline at end of file
diff --git a/communications/dds_msgs/idl/CMakeLists.txt b/communications/dds_msgs/idl/CMakeLists.txt
deleted file mode 100644
index 0be60313b0..0000000000
--- a/communications/dds_msgs/idl/CMakeLists.txt
+++ /dev/null
@@ -1,48 +0,0 @@
-# Copyright (c) 2017, United States Government, as represented by the
-# Administrator of the National Aeronautics and Space Administration.
-#
-# All rights reserved.
-#
-# The Astrobee platform is licensed under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with the
-# License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-# License for the specific language governing permissions and limitations
-# under the License.
-
-message(STATUS "Copying IDL files")
-file(GLOB DDS_IDL_FILES
- "${CMAKE_SOURCE_DIR}/communications/dds_msgs/idl/*.idl")
-
-file(COPY ${DDS_IDL_FILES} DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
-
-set(LIB_NAME "rapidExtAstrobee")
-
-include(CreateDdsMsgTargets)
-
-set(EXTRA_RTIDDS_IDL_ARGS -I${SORACORE_IDL_DIR}/rapidDds)
-create_dds_msg_targets(
- NAME ${LIB_NAME}
- DIR ${CMAKE_CURRENT_BINARY_DIR}
- INCLUDES "-I${SORACORE_IDL_DIR}/rapidDds")
-
-add_library(${LIB_NAME} ${rapidExtAstrobee_GENERATED})
-target_link_libraries(${LIB_NAME}
- rapidDds
- )
-target_compile_definitions(${LIB_NAME} PUBLIC ${RTIDDS_DEFINE_FLAGS})
-target_compile_options(${LIB_NAME} PUBLIC -Wno-write-strings)
-target_compile_options(${LIB_NAME} PRIVATE -Wno-strict-aliasing)
-target_include_directories(${LIB_NAME} PUBLIC
- ${CMAKE_CURRENT_BINARY_DIR}
- ${RTIDDS_INCLUDE_DIR}
- ${SORACORE_INCLUDE_DIRS})
-
-install(TARGETS ${LIB_NAME} DESTINATION lib)
-install(FILES ${rapidExtAstrobee_GENERATED_HEADERS}
- DESTINATION include/${LIB_NAME})
diff --git a/tools/rviz_visualizer/package.xml b/communications/dds_msgs/package.xml
similarity index 52%
rename from tools/rviz_visualizer/package.xml
rename to communications/dds_msgs/package.xml
index ac9325d0e6..0f35132e90 100644
--- a/tools/rviz_visualizer/package.xml
+++ b/communications/dds_msgs/package.xml
@@ -1,8 +1,10 @@
- rviz_visualizer
+ dds_msgs
0.0.0
- The rviz_visualizer package draws boxes in rviz.
+
+ The dds_msgs package
+
Apache License, Version 2.0
@@ -12,11 +14,8 @@
Astrobee Flight Software
+ message_generation
+ message_runtime
catkin
- roscpp
- visualization_msgs
- roscpp
- visualization_msgs
- tf2_ros
-
+
diff --git a/communications/dds_ros_bridge/CMakeLists.txt b/communications/dds_ros_bridge/CMakeLists.txt
index 4e19586103..c0ee7aa106 100644
--- a/communications/dds_ros_bridge/CMakeLists.txt
+++ b/communications/dds_ros_bridge/CMakeLists.txt
@@ -15,50 +15,93 @@
# License for the specific language governing permissions and limitations
# under the License.
+cmake_minimum_required(VERSION 3.0)
project(dds_ros_bridge)
-catkin_package(
- LIBRARIES dds_ros_bridge astrobee_astrobee_bridge
- CATKIN_DEPENDS roscpp message_runtime std_msgs nav_msgs
-)
-set(DEPS
+## Compile as C++14, supported in ROS Kinetic and newer
+add_compile_options(-std=c++14)
+
+if (USE_DDS)
+## Find catkin macros and libraries
+find_package(catkin2 REQUIRED COMPONENTS
+ nodelet
+ config_reader
+ ff_util
ff_msgs
+ ff_hw_msgs
+ dds_msgs
)
-set(LIBS
- ${Boost_IOSTREAMS_LIBRARY}
- config_reader
- ff_nodelet
- Qt4::QtXml
- rapidIo
- rapidExtAstrobee
+# System dependencies are found with CMake's conventions
+find_package(Eigen3 REQUIRED)
+find_package(Boost 1.54.0 QUIET REQUIRED COMPONENTS filesystem system iostreams thread program_options timer)
+
+list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/../../cmake")
+
+if (USE_CTC)
+ set(SORACORE_ROOT_DIR ${ARM_CHROOT_DIR}/usr)
+else (USE_CTC)
+ set(SORACORE_ROOT_DIR /usr)
+endif (USE_CTC)
+
+set(MIRO_ROOT_DIR ${SORACORE_ROOT_DIR})
+
+SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
+SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
+
+# just calls the normal one
+find_package(Qt4 4.6.0 REQUIRED QtXml)
+find_package(Miro REQUIRED)
+find_package(RtiDds REQUIRED)
+find_package(Soracore REQUIRED)
+
+
+catkin_package(
+ LIBRARIES dds_ros_bridge astrobee_astrobee_bridge
+ CATKIN_DEPENDS nodelet config_reader ff_util ff_msgs ff_hw_msgs dds_msgs
)
-set(INCLUDES
- ${CMAKE_CURRENT_SOURCE_DIR}/include
+###########
+## Build ##
+###########
+
+# Specify additional locations of header files
+include_directories(
+ include
${catkin_INCLUDE_DIRS}
${EIGEN3_INCLUDE_DIRS}
+ ${RTIDDS_INCLUDE_DIR}
${SORACORE_INCLUDE_DIRS}
+ ${MIRO_INCLUDE_DIR}
+ ${QT_INCLUDE_DIR}
+ ${QT_INCLUDE_DIR}/Qt
+ ${Boost_INCLUDE_DIRS}
)
-create_library(TARGET dds_ros_bridge
- LIBS ${LIBS}
- INC ${INCLUDES}
- DEPS ${DEPS}
+file(GLOB cc_files
+ "src/*.cc"
)
-create_library(TARGET astrobee_astrobee_bridge
- LIBS ${LIBS}
- INC ${INCLUDES}
- DEPS ${DEPS}
+# Declare C++ libraries
+add_library(dds_ros_bridge
+ ${cc_files}
)
+target_compile_definitions(dds_ros_bridge PUBLIC ${RTIDDS_DEFINE_FLAGS})
+add_dependencies(dds_ros_bridge ${catkin_EXPORTED_TARGETS})
+target_link_libraries(dds_ros_bridge rapidIo ${Boost_LIBRARIES} ${catkin_LIBRARIES})
+
-create_tool_targets(DIR tools
- LIBS dds_ros_bridge
- INC ${INCLUDES}
- DEPS ${DEPS} dds_ros_bridge
+add_library(astrobee_astrobee_bridge
+ src/astrobee_astrobee_bridge.cc
)
+target_compile_definitions(astrobee_astrobee_bridge PUBLIC ${RTIDDS_DEFINE_FLAGS})
+add_dependencies(astrobee_astrobee_bridge ${catkin_EXPORTED_TARGETS})
+target_link_libraries(astrobee_astrobee_bridge Qt4::QtXml rapidIo ${Boost_LIBRARIES} ${catkin_LIBRARIES})
+
+#############
+## Install ##
+#############
# Determine our module name
get_filename_component(MODULE_NAME ${CMAKE_CURRENT_SOURCE_DIR} NAME)
@@ -70,4 +113,28 @@ install(CODE "execute_process(
ERROR_QUIET
)")
-install_launch_files()
+# Mark libraries for installation
+install(TARGETS dds_ros_bridge
+ ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
+ LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
+ RUNTIME DESTINATION ${CATKIN_GLOBAL_BIN_DESTINATION}
+)
+install(TARGETS astrobee_astrobee_bridge
+ ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
+ LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
+ RUNTIME DESTINATION ${CATKIN_GLOBAL_BIN_DESTINATION}
+)
+
+# Mark nodelet_plugin for installation
+install(FILES nodelet_plugins.xml
+ DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}
+)
+
+# Mark launch files for installation
+install(DIRECTORY launch/
+ DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}/launch
+ PATTERN ".svn" EXCLUDE)
+else (USE_DDS)
+ find_package(catkin REQUIRED COMPONENTS)
+ catkin_package()
+endif (USE_DDS)
\ No newline at end of file
diff --git a/communications/dds_ros_bridge/include/dds_ros_bridge/rapid_command_ros_command_plan.h b/communications/dds_ros_bridge/include/dds_ros_bridge/rapid_command_ros_command_plan.h
index 821a2feca2..f3940d3d3e 100644
--- a/communications/dds_ros_bridge/include/dds_ros_bridge/rapid_command_ros_command_plan.h
+++ b/communications/dds_ros_bridge/include/dds_ros_bridge/rapid_command_ros_command_plan.h
@@ -33,7 +33,7 @@
#include "ff_msgs/CommandArg.h"
#include "ff_msgs/CommandStamped.h"
-#include "AstrobeeCommandConstants.h"
+#include "dds_msgs/AstrobeeCommandConstants.h"
#include "knDds/DdsTypedSupplier.h"
diff --git a/communications/dds_ros_bridge/include/dds_ros_bridge/rapid_compressed_file_ros_compressed_file.h b/communications/dds_ros_bridge/include/dds_ros_bridge/rapid_compressed_file_ros_compressed_file.h
index 1938fe2cb2..5a22668a23 100644
--- a/communications/dds_ros_bridge/include/dds_ros_bridge/rapid_compressed_file_ros_compressed_file.h
+++ b/communications/dds_ros_bridge/include/dds_ros_bridge/rapid_compressed_file_ros_compressed_file.h
@@ -31,9 +31,9 @@
#include "ff_msgs/CompressedFile.h"
-#include "AstrobeeConstants.h"
-#include "CompressedFile.h"
-#include "CompressedFileSupport.h"
+#include "dds_msgs/AstrobeeConstants.h"
+#include "dds_msgs/CompressedFile.h"
+#include "dds_msgs/CompressedFileSupport.h"
namespace ff {
diff --git a/communications/dds_ros_bridge/include/dds_ros_bridge/rapid_ekf_ros_ekf.h b/communications/dds_ros_bridge/include/dds_ros_bridge/rapid_ekf_ros_ekf.h
index 5a973a81bf..93a41ca65c 100644
--- a/communications/dds_ros_bridge/include/dds_ros_bridge/rapid_ekf_ros_ekf.h
+++ b/communications/dds_ros_bridge/include/dds_ros_bridge/rapid_ekf_ros_ekf.h
@@ -32,11 +32,11 @@
#include "ff_msgs/EkfState.h"
-#include "AstrobeeConstants.h"
+#include "dds_msgs/AstrobeeConstants.h"
#include "knDds/DdsTypedSupplier.h"
-#include "EkfStateSupport.h"
+#include "dds_msgs/EkfStateSupport.h"
#include "rapidDds/RapidConstants.h"
diff --git a/communications/dds_ros_bridge/include/dds_ros_bridge/rapid_gs_data_ros_gs_data.h b/communications/dds_ros_bridge/include/dds_ros_bridge/rapid_gs_data_ros_gs_data.h
index 1b44ac9272..a11da1d691 100644
--- a/communications/dds_ros_bridge/include/dds_ros_bridge/rapid_gs_data_ros_gs_data.h
+++ b/communications/dds_ros_bridge/include/dds_ros_bridge/rapid_gs_data_ros_gs_data.h
@@ -32,11 +32,11 @@
#include "ff_msgs/GuestScienceData.h"
-#include "AstrobeeConstants.h"
+#include "dds_msgs/AstrobeeConstants.h"
#include "knDds/DdsTypedSupplier.h"
-#include "GuestScienceDataSupport.h"
+#include "dds_msgs/GuestScienceDataSupport.h"
#include "rapidDds/RapidConstants.h"
diff --git a/communications/dds_ros_bridge/include/dds_ros_bridge/ros_agent_state.h b/communications/dds_ros_bridge/include/dds_ros_bridge/ros_agent_state.h
index 6c81a94006..d51fb94e8a 100644
--- a/communications/dds_ros_bridge/include/dds_ros_bridge/ros_agent_state.h
+++ b/communications/dds_ros_bridge/include/dds_ros_bridge/ros_agent_state.h
@@ -35,9 +35,9 @@
#include "rapidUtil/RapidHelper.h"
-#include "AstrobeeAgentStateSupport.h"
-#include "AstrobeeConstants.h"
-#include "MobilitySettingsStateSupport.h"
+#include "dds_msgs/AstrobeeAgentStateSupport.h"
+#include "dds_msgs/AstrobeeConstants.h"
+#include "dds_msgs/MobilitySettingsStateSupport.h"
namespace ff {
diff --git a/communications/dds_ros_bridge/include/dds_ros_bridge/ros_arm_state.h b/communications/dds_ros_bridge/include/dds_ros_bridge/ros_arm_state.h
index edf88296b6..fadf46e604 100644
--- a/communications/dds_ros_bridge/include/dds_ros_bridge/ros_arm_state.h
+++ b/communications/dds_ros_bridge/include/dds_ros_bridge/ros_arm_state.h
@@ -34,8 +34,8 @@
#include "rapidUtil/RapidHelper.h"
-#include "ArmStateSupport.h"
-#include "AstrobeeConstants.h"
+#include "dds_msgs/ArmStateSupport.h"
+#include "dds_msgs/AstrobeeConstants.h"
namespace ff {
diff --git a/communications/dds_ros_bridge/include/dds_ros_bridge/ros_battery_state.h b/communications/dds_ros_bridge/include/dds_ros_bridge/ros_battery_state.h
index d03251bc40..0083a3aaf3 100644
--- a/communications/dds_ros_bridge/include/dds_ros_bridge/ros_battery_state.h
+++ b/communications/dds_ros_bridge/include/dds_ros_bridge/ros_battery_state.h
@@ -33,9 +33,9 @@
#include "sensor_msgs/BatteryState.h"
#include "sensor_msgs/Temperature.h"
-#include "AstrobeeConstants.h"
-#include "EpsStateSupport.h"
-#include "EpsConfigSupport.h"
+#include "dds_msgs/AstrobeeConstants.h"
+#include "dds_msgs/EpsStateSupport.h"
+#include "dds_msgs/EpsConfigSupport.h"
#include "rapidUtil/RapidHelper.h"
diff --git a/communications/dds_ros_bridge/include/dds_ros_bridge/ros_command_config_rapid_command_config.h b/communications/dds_ros_bridge/include/dds_ros_bridge/ros_command_config_rapid_command_config.h
index 69d53f75e7..acc160f687 100644
--- a/communications/dds_ros_bridge/include/dds_ros_bridge/ros_command_config_rapid_command_config.h
+++ b/communications/dds_ros_bridge/include/dds_ros_bridge/ros_command_config_rapid_command_config.h
@@ -36,7 +36,7 @@
#include "rapidUtil/RapidHelper.h"
-#include "AstrobeeCommandConstants.h"
+#include "dds_msgs/AstrobeeCommandConstants.h"
namespace ff {
diff --git a/communications/dds_ros_bridge/include/dds_ros_bridge/ros_compressed_file_ack.h b/communications/dds_ros_bridge/include/dds_ros_bridge/ros_compressed_file_ack.h
index 1dffa64233..1aa210e678 100644
--- a/communications/dds_ros_bridge/include/dds_ros_bridge/ros_compressed_file_ack.h
+++ b/communications/dds_ros_bridge/include/dds_ros_bridge/ros_compressed_file_ack.h
@@ -33,8 +33,8 @@
#include "rapidUtil/RapidHelper.h"
-#include "AstrobeeConstants.h"
-#include "CompressedFileAckSupport.h"
+#include "dds_msgs/AstrobeeConstants.h"
+#include "dds_msgs/CompressedFileAckSupport.h"
namespace ff {
diff --git a/communications/dds_ros_bridge/include/dds_ros_bridge/ros_compressed_file_rapid_compressed_file.h b/communications/dds_ros_bridge/include/dds_ros_bridge/ros_compressed_file_rapid_compressed_file.h
index 34bc85c097..e3a957d9c1 100644
--- a/communications/dds_ros_bridge/include/dds_ros_bridge/ros_compressed_file_rapid_compressed_file.h
+++ b/communications/dds_ros_bridge/include/dds_ros_bridge/ros_compressed_file_rapid_compressed_file.h
@@ -33,8 +33,8 @@
#include "rapidUtil/RapidHelper.h"
-#include "AstrobeeConstants.h"
-#include "CompressedFileSupport.h"
+#include "dds_msgs/AstrobeeConstants.h"
+#include "dds_msgs/CompressedFileSupport.h"
namespace ff {
diff --git a/communications/dds_ros_bridge/include/dds_ros_bridge/ros_cpu_state.h b/communications/dds_ros_bridge/include/dds_ros_bridge/ros_cpu_state.h
index acb06d0a1a..c820bc3f0e 100644
--- a/communications/dds_ros_bridge/include/dds_ros_bridge/ros_cpu_state.h
+++ b/communications/dds_ros_bridge/include/dds_ros_bridge/ros_cpu_state.h
@@ -32,9 +32,9 @@
#include "rapidUtil/RapidHelper.h"
-#include "AstrobeeConstants.h"
-#include "CpuConfigSupport.h"
-#include "CpuStateSupport.h"
+#include "dds_msgs/AstrobeeConstants.h"
+#include "dds_msgs/CpuConfigSupport.h"
+#include "dds_msgs/CpuStateSupport.h"
namespace ff {
diff --git a/communications/dds_ros_bridge/include/dds_ros_bridge/ros_data_to_disk.h b/communications/dds_ros_bridge/include/dds_ros_bridge/ros_data_to_disk.h
index 9fd42415d6..a58e4f13d3 100644
--- a/communications/dds_ros_bridge/include/dds_ros_bridge/ros_data_to_disk.h
+++ b/communications/dds_ros_bridge/include/dds_ros_bridge/ros_data_to_disk.h
@@ -33,9 +33,9 @@
#include "rapidUtil/RapidHelper.h"
-#include "AstrobeeConstants.h"
-#include "DataToDiskStateSupport.h"
-#include "DataTopicsListSupport.h"
+#include "dds_msgs/AstrobeeConstants.h"
+#include "dds_msgs/DataToDiskStateSupport.h"
+#include "dds_msgs/DataTopicsListSupport.h"
namespace ff {
diff --git a/communications/dds_ros_bridge/include/dds_ros_bridge/ros_disk_state.h b/communications/dds_ros_bridge/include/dds_ros_bridge/ros_disk_state.h
index bb890ca8b2..b9250bdae1 100644
--- a/communications/dds_ros_bridge/include/dds_ros_bridge/ros_disk_state.h
+++ b/communications/dds_ros_bridge/include/dds_ros_bridge/ros_disk_state.h
@@ -34,9 +34,9 @@
#include "rapidUtil/RapidHelper.h"
-#include "AstrobeeConstants.h"
-#include "DiskStateSupport.h"
-#include "DiskConfigSupport.h"
+#include "dds_msgs/AstrobeeConstants.h"
+#include "dds_msgs/DiskStateSupport.h"
+#include "dds_msgs/DiskConfigSupport.h"
namespace ff {
diff --git a/communications/dds_ros_bridge/include/dds_ros_bridge/ros_ekf_rapid_ekf.h b/communications/dds_ros_bridge/include/dds_ros_bridge/ros_ekf_rapid_ekf.h
index 5a754d1296..ff1ba346d2 100644
--- a/communications/dds_ros_bridge/include/dds_ros_bridge/ros_ekf_rapid_ekf.h
+++ b/communications/dds_ros_bridge/include/dds_ros_bridge/ros_ekf_rapid_ekf.h
@@ -36,8 +36,8 @@
#include "rapidUtil/RapidHelper.h"
-#include "AstrobeeConstants.h"
-#include "EkfStateSupport.h"
+#include "dds_msgs/AstrobeeConstants.h"
+#include "dds_msgs/EkfStateSupport.h"
namespace ff {
diff --git a/communications/dds_ros_bridge/include/dds_ros_bridge/ros_fault_config.h b/communications/dds_ros_bridge/include/dds_ros_bridge/ros_fault_config.h
index c3cdea3110..aba113753a 100644
--- a/communications/dds_ros_bridge/include/dds_ros_bridge/ros_fault_config.h
+++ b/communications/dds_ros_bridge/include/dds_ros_bridge/ros_fault_config.h
@@ -32,9 +32,9 @@
#include "rapidUtil/RapidHelper.h"
-#include "AstrobeeConstants.h"
-#include "FaultConfigSupport.h"
-#include "FaultStateSupport.h"
+#include "dds_msgs/AstrobeeConstants.h"
+#include "dds_msgs/FaultConfigSupport.h"
+#include "dds_msgs/FaultStateSupport.h"
namespace ff {
diff --git a/communications/dds_ros_bridge/include/dds_ros_bridge/ros_fault_state.h b/communications/dds_ros_bridge/include/dds_ros_bridge/ros_fault_state.h
index 149f9489fc..629c750dc7 100644
--- a/communications/dds_ros_bridge/include/dds_ros_bridge/ros_fault_state.h
+++ b/communications/dds_ros_bridge/include/dds_ros_bridge/ros_fault_state.h
@@ -32,8 +32,8 @@
#include "rapidUtil/RapidHelper.h"
-#include "AstrobeeConstants.h"
-#include "FaultStateSupport.h"
+#include "dds_msgs/AstrobeeConstants.h"
+#include "dds_msgs/FaultStateSupport.h"
namespace ff {
diff --git a/communications/dds_ros_bridge/include/dds_ros_bridge/ros_gnc_control_state.h b/communications/dds_ros_bridge/include/dds_ros_bridge/ros_gnc_control_state.h
index 729683cdfb..653c52847f 100644
--- a/communications/dds_ros_bridge/include/dds_ros_bridge/ros_gnc_control_state.h
+++ b/communications/dds_ros_bridge/include/dds_ros_bridge/ros_gnc_control_state.h
@@ -18,8 +18,8 @@
#include "rapidUtil/RapidHelper.h"
-#include "AstrobeeConstants.h"
-#include "GncControlStateSupport.h"
+#include "dds_msgs/AstrobeeConstants.h"
+#include "dds_msgs/GncControlStateSupport.h"
namespace ff {
diff --git a/communications/dds_ros_bridge/include/dds_ros_bridge/ros_gnc_fam_cmd_state.h b/communications/dds_ros_bridge/include/dds_ros_bridge/ros_gnc_fam_cmd_state.h
index 49e8e451a1..210c312410 100644
--- a/communications/dds_ros_bridge/include/dds_ros_bridge/ros_gnc_fam_cmd_state.h
+++ b/communications/dds_ros_bridge/include/dds_ros_bridge/ros_gnc_fam_cmd_state.h
@@ -35,8 +35,8 @@
#include "rapidUtil/RapidHelper.h"
-#include "AstrobeeConstants.h"
-#include "GncFamCmdStateSupport.h"
+#include "dds_msgs/AstrobeeConstants.h"
+#include "dds_msgs/GncFamCmdStateSupport.h"
namespace ff {
diff --git a/communications/dds_ros_bridge/include/dds_ros_bridge/ros_guest_science.h b/communications/dds_ros_bridge/include/dds_ros_bridge/ros_guest_science.h
index 3a861090d8..e54b9e2a1e 100644
--- a/communications/dds_ros_bridge/include/dds_ros_bridge/ros_guest_science.h
+++ b/communications/dds_ros_bridge/include/dds_ros_bridge/ros_guest_science.h
@@ -37,10 +37,10 @@
#include "rapidUtil/RapidHelper.h"
-#include "AstrobeeConstants.h"
-#include "GuestScienceConfigSupport.h"
-#include "GuestScienceDataSupport.h"
-#include "GuestScienceStateSupport.h"
+#include "dds_msgs/AstrobeeConstants.h"
+#include "dds_msgs/GuestScienceConfigSupport.h"
+#include "dds_msgs/GuestScienceDataSupport.h"
+#include "dds_msgs/GuestScienceStateSupport.h"
namespace ff {
diff --git a/communications/dds_ros_bridge/include/dds_ros_bridge/ros_inertia.h b/communications/dds_ros_bridge/include/dds_ros_bridge/ros_inertia.h
index 34d4281db4..fa112aec69 100644
--- a/communications/dds_ros_bridge/include/dds_ros_bridge/ros_inertia.h
+++ b/communications/dds_ros_bridge/include/dds_ros_bridge/ros_inertia.h
@@ -30,8 +30,8 @@
#include "rapidUtil/RapidHelper.h"
-#include "AstrobeeConstants.h"
-#include "InertialPropertiesSupport.h"
+#include "dds_msgs/AstrobeeConstants.h"
+#include "dds_msgs/InertialPropertiesSupport.h"
namespace ff {
diff --git a/communications/dds_ros_bridge/include/dds_ros_bridge/ros_log_sample.h b/communications/dds_ros_bridge/include/dds_ros_bridge/ros_log_sample.h
index 7968382dd7..a9b467e0e2 100644
--- a/communications/dds_ros_bridge/include/dds_ros_bridge/ros_log_sample.h
+++ b/communications/dds_ros_bridge/include/dds_ros_bridge/ros_log_sample.h
@@ -18,8 +18,8 @@
#include "rapidUtil/RapidHelper.h"
-#include "AstrobeeConstants.h"
-#include "LogSampleSupport.h"
+#include "dds_msgs/AstrobeeConstants.h"
+#include "dds_msgs/LogSampleSupport.h"
namespace ff {
diff --git a/communications/dds_ros_bridge/include/dds_ros_bridge/ros_odom_rapid_position.h b/communications/dds_ros_bridge/include/dds_ros_bridge/ros_odom_rapid_position.h
index d1201e560d..6284e38b5e 100644
--- a/communications/dds_ros_bridge/include/dds_ros_bridge/ros_odom_rapid_position.h
+++ b/communications/dds_ros_bridge/include/dds_ros_bridge/ros_odom_rapid_position.h
@@ -36,8 +36,8 @@
#include "rapidUtil/RapidHelper.h"
-#include "AstrobeeConstants.h"
-#include "EkfStateSupport.h"
+#include "dds_msgs/AstrobeeConstants.h"
+#include "dds_msgs/EkfStateSupport.h"
namespace ff {
diff --git a/communications/dds_ros_bridge/include/dds_ros_bridge/ros_payload_state.h b/communications/dds_ros_bridge/include/dds_ros_bridge/ros_payload_state.h
index 7ba4eaccef..73e3fee1d5 100644
--- a/communications/dds_ros_bridge/include/dds_ros_bridge/ros_payload_state.h
+++ b/communications/dds_ros_bridge/include/dds_ros_bridge/ros_payload_state.h
@@ -33,9 +33,9 @@
#include "rapidUtil/RapidHelper.h"
-#include "AstrobeeConstants.h"
-#include "PayloadConfigSupport.h"
-#include "PayloadStateSupport.h"
+#include "dds_msgs/AstrobeeConstants.h"
+#include "dds_msgs/PayloadConfigSupport.h"
+#include "dds_msgs/PayloadStateSupport.h"
namespace ff {
diff --git a/communications/dds_ros_bridge/include/dds_ros_bridge/ros_plan_status_rapid_plan_status.h b/communications/dds_ros_bridge/include/dds_ros_bridge/ros_plan_status_rapid_plan_status.h
index 9dc1241916..36bdbf780d 100644
--- a/communications/dds_ros_bridge/include/dds_ros_bridge/ros_plan_status_rapid_plan_status.h
+++ b/communications/dds_ros_bridge/include/dds_ros_bridge/ros_plan_status_rapid_plan_status.h
@@ -35,8 +35,8 @@
#include "rapidUtil/RapidHelper.h"
-#include "AstrobeeConstants.h"
-#include "PlanStatusSupport.h"
+#include "dds_msgs/AstrobeeConstants.h"
+#include "dds_msgs/PlanStatusSupport.h"
namespace ff {
diff --git a/communications/dds_ros_bridge/include/dds_ros_bridge/ros_pmc_cmd_state.h b/communications/dds_ros_bridge/include/dds_ros_bridge/ros_pmc_cmd_state.h
index 97a971e9a9..de30077fec 100644
--- a/communications/dds_ros_bridge/include/dds_ros_bridge/ros_pmc_cmd_state.h
+++ b/communications/dds_ros_bridge/include/dds_ros_bridge/ros_pmc_cmd_state.h
@@ -18,8 +18,8 @@
#include "rapidUtil/RapidHelper.h"
-#include "AstrobeeConstants.h"
-#include "PmcCmdStateSupport.h"
+#include "dds_msgs/AstrobeeConstants.h"
+#include "dds_msgs/PmcCmdStateSupport.h"
namespace ff {
diff --git a/communications/dds_ros_bridge/include/dds_ros_bridge/ros_telemetry_rapid_telemetry.h b/communications/dds_ros_bridge/include/dds_ros_bridge/ros_telemetry_rapid_telemetry.h
index 09f3cf9e81..584b5db19f 100644
--- a/communications/dds_ros_bridge/include/dds_ros_bridge/ros_telemetry_rapid_telemetry.h
+++ b/communications/dds_ros_bridge/include/dds_ros_bridge/ros_telemetry_rapid_telemetry.h
@@ -34,9 +34,9 @@
#include "ros/ros.h"
-#include "AstrobeeConstants.h"
-#include "TelemetryConfigSupport.h"
-#include "TelemetryStateSupport.h"
+#include "dds_msgs/AstrobeeConstants.h"
+#include "dds_msgs/TelemetryConfigSupport.h"
+#include "dds_msgs/TelemetryStateSupport.h"
namespace ff {
diff --git a/communications/dds_ros_bridge/include/dds_ros_bridge/ros_zones_rapid_compressed_file.h b/communications/dds_ros_bridge/include/dds_ros_bridge/ros_zones_rapid_compressed_file.h
index 4cc7c52efa..69f409455d 100644
--- a/communications/dds_ros_bridge/include/dds_ros_bridge/ros_zones_rapid_compressed_file.h
+++ b/communications/dds_ros_bridge/include/dds_ros_bridge/ros_zones_rapid_compressed_file.h
@@ -44,8 +44,8 @@
#include "rapidUtil/RapidHelper.h"
-#include "AstrobeeConstants.h"
-#include "CompressedFileSupport.h"
+#include "dds_msgs/AstrobeeConstants.h"
+#include "dds_msgs/CompressedFileSupport.h"
namespace ff {
diff --git a/communications/dds_ros_bridge/package.xml b/communications/dds_ros_bridge/package.xml
index 50931e9e46..010526ba3c 100644
--- a/communications/dds_ros_bridge/package.xml
+++ b/communications/dds_ros_bridge/package.xml
@@ -15,22 +15,18 @@
Astrobee Flight Software
catkin
- cmake_modules
- message_generation
- ff_msgs
- nav_msgs
- roscpp
- rossmbus
- std_msgs
nodelet
- cmake_modules
- message_runtime
- ff_msgs
- nav_msgs
- roscpp
- rossmbus
- std_msgs
+ config_reader
+ ff_util
+ ff_msgs
+ ff_hw_msgs
+ dds_msgs
nodelet
+ config_reader
+ ff_util
+ ff_msgs
+ ff_hw_msgs
+ dds_msgs
diff --git a/communications/ff_hw_msgs/CMakeLists.txt b/communications/ff_hw_msgs/CMakeLists.txt
index b2ad112ac7..27087b46b6 100644
--- a/communications/ff_hw_msgs/CMakeLists.txt
+++ b/communications/ff_hw_msgs/CMakeLists.txt
@@ -15,16 +15,34 @@
# License for the specific language governing permissions and limitations
# under the License.
+cmake_minimum_required(VERSION 3.0)
project(ff_hw_msgs)
-find_package(catkin2 REQUIRED COMPONENTS
+find_package(catkin REQUIRED COMPONENTS
message_generation
- roscpp
std_msgs
sensor_msgs
)
-create_msg_targets(DIR msg SDIR srv DEPS std_msgs sensor_msgs)
+# Generate messages in the 'msg' folder
+file(GLOB MSG_FILES msg/*.msg)
+foreach(SRC ${MSG_FILES})
+ get_filename_component(NAME ${SRC} NAME)
+ list(APPEND MSG_FILE_NAMES ${NAME})
+endforeach()
+add_message_files(FILES ${MSG_FILE_NAMES})
+
+# Generate services in the 'srv' folder
+file(GLOB SRV_FILES srv/*.srv)
+foreach(SRC ${SRV_FILES})
+ get_filename_component(NAME ${SRC} NAME)
+ list(APPEND SRV_FILE_NAMES ${NAME})
+endforeach()
+add_service_files(FILES ${SRV_FILE_NAMES})
+
+generate_messages(
+ DEPENDENCIES std_msgs geometry_msgs sensor_msgs
+)
catkin_package(
# INCLUDE_DIRS include
@@ -35,4 +53,4 @@ catkin_package(
include_directories(
include
${catkin_INCLUDE_DIRS}
-)
\ No newline at end of file
+)
diff --git a/communications/ff_hw_msgs/package.xml b/communications/ff_hw_msgs/package.xml
index 6ffefff800..0f1520d52b 100644
--- a/communications/ff_hw_msgs/package.xml
+++ b/communications/ff_hw_msgs/package.xml
@@ -16,10 +16,8 @@
catkin
message_generation
- ros_cpp
std_msgs
sensor_msgs
- ros_cpp
std_msgs
sensor_msgs
diff --git a/communications/ff_msgs/CMakeLists.txt b/communications/ff_msgs/CMakeLists.txt
index 5040c836e1..37d9842fc3 100644
--- a/communications/ff_msgs/CMakeLists.txt
+++ b/communications/ff_msgs/CMakeLists.txt
@@ -15,9 +15,10 @@
# License for the specific language governing permissions and limitations
# under the License.
+cmake_minimum_required(VERSION 3.0)
project(ff_msgs)
-find_package(catkin2 REQUIRED COMPONENTS
+find_package(catkin REQUIRED COMPONENTS
message_generation
std_msgs
geometry_msgs
@@ -26,8 +27,33 @@ find_package(catkin2 REQUIRED COMPONENTS
sensor_msgs
)
-create_msg_targets(DIR msg SDIR srv ADIR action
- DEPS std_msgs geometry_msgs actionlib_msgs trajectory_msgs sensor_msgs)
+# Generate messages in the 'msg' folder
+file(GLOB MSG_FILES msg/*.msg)
+foreach(SRC ${MSG_FILES})
+ get_filename_component(NAME ${SRC} NAME)
+ list(APPEND MSG_FILE_NAMES ${NAME})
+endforeach()
+add_message_files(FILES ${MSG_FILE_NAMES})
+
+# Generate services in the 'srv' folder
+file(GLOB SRV_FILES srv/*.srv)
+foreach(SRC ${SRV_FILES})
+ get_filename_component(NAME ${SRC} NAME)
+ list(APPEND SRV_FILE_NAMES ${NAME})
+endforeach()
+add_service_files(FILES ${SRV_FILE_NAMES})
+
+# Generate actions in the 'action' folder
+file(GLOB ACTION_FILES action/*.action)
+foreach(SRC ${ACTION_FILES})
+ get_filename_component(NAME ${SRC} NAME)
+ list(APPEND ACTION_FILE_NAMES ${NAME})
+endforeach()
+add_action_files(FILES ${ACTION_FILE_NAMES})
+
+generate_messages(
+ DEPENDENCIES std_msgs geometry_msgs actionlib_msgs trajectory_msgs sensor_msgs std_msgs
+)
catkin_package(
# INCLUDE_DIRS include
diff --git a/debian/changelog b/debian/changelog
index 4b4b4606fd..5cd459ed68 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,13 @@
+astrobee (0.16.0) testing; urgency=medium
+
+ * project compiles with catkin
+ * mapper performance improvement
+ * imu_augmentor performance improvement
+ * calibration improvements
+ * multiple other fixes
+
+ -- Astrobee Flight Software Thu, 02 Dec 2021 13:57:39 -0800
+
astrobee (0.15.2) testing; urgency=medium
* added python linters black and isort in the CI pipeline
diff --git a/debian/rules b/debian/rules
index 9ac1033ac5..b36dc4a593 100755
--- a/debian/rules
+++ b/debian/rules
@@ -17,7 +17,7 @@ export EXTRA_CMAKE_OPTS
export LIB_SEARCH_OPTIONS
ifeq ($(DEB_HOST_ARCH),armhf)
- export EXTRA_CMAKE_OPTS=-DCMAKE_TOOLCHAIN_FILE=../scripts/build/ubuntu_cross.cmake -DUSE_CTC=true
+# export EXTRA_CMAKE_OPTS=-DCMAKE_TOOLCHAIN_FILE=../scripts/build/ubuntu_cross.cmake -DUSE_CTC=true
# stripping doesn't work with the cross compile
#export DEB_BUILD_OPTIONS += nostrip
export LIB_SEARCH_OPTIONS = -l$(ARMHF_CHROOT_DIR)/opt/rti/ndds/lib/armv6vfphLinux3.xgcc4.7.2:$(ARMHF_CHROOT_DIR)/opt/ros/kinetic/lib:$(ARMHF_CHROOT_DIR)/opt/ros/kinetic/lib/arm-linux-gnueabihf:$(ARMHF_CHROOT_DIR)/lib:$(ARMHF_CHROOT_DIR)/usr/lib:$(ARMHF_CHROOT_DIR)/usr/lib/arm-linux-gnueabihf:$(ARMHF_CHROOT_DIR)/lib/arm-linux-gnueabihf -- --ignore-missing-info --admindir=$(ARMHF_CHROOT_DIR)/var/lib/dpkg
@@ -36,8 +36,16 @@ build-indep: ;
# we always need release, otherwise it is too slow
override_dh_auto_configure:
- mkdir -p build
- cd build && cmake .. -DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_INSTALL_PREFIX:PATH=/opt/astrobee -DCMAKE_BUILD_TYPE=Release $(EXTRA_CMAKE_OPTS) && cd ..
+ # configure the build
+ cd .. && \
+ ./src/scripts/configure.sh -a -w src/debian/tmp && \
+ catkin clean -y --force
+override_dh_auto_build: ;
+
+# the install command is already invoked in the build
+override_dh_auto_install:
+ cd .. && \
+ catkin build
override_dh_install:
dh_movefiles
diff --git a/description/CMakeLists.txt b/description/CMakeLists.txt
deleted file mode 100644
index 91d48bc92e..0000000000
--- a/description/CMakeLists.txt
+++ /dev/null
@@ -1,35 +0,0 @@
-# Copyright (c) 2017, United States Government, as represented by the
-# Administrator of the National Aeronautics and Space Administration.
-#
-# All rights reserved.
-#
-# The Astrobee platform is licensed under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with the
-# License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-# License for the specific language governing permissions and limitations
-# under the License.
-
-# Check to see if correct version of media has been downloaded into tree. We
-# dont do this if we are cross-compiling, as there is no need for it. We must
-# also make sure the media is copied in a native install to a simulator.
-
-# Add the things that need to be on both the robot and the simulation
-add_subdirectory(description)
-
-# Optional: install only for simulated context
-if (NOT USE_CTC)
- add_subdirectory(media/astrobee_granite)
- add_subdirectory(media/astrobee_dock)
- add_subdirectory(media/astrobee_iss)
- add_subdirectory(media/astrobee_handrail_8_5)
- add_subdirectory(media/astrobee_handrail_21_5)
- add_subdirectory(media/astrobee_handrail_30)
- add_subdirectory(media/astrobee_handrail_41_5)
- add_subdirectory(media/astrobee_freeflyer)
-endif (NOT USE_CTC)
diff --git a/description/description/CMakeLists.txt b/description/description/CMakeLists.txt
index 6da9a5ccfc..8212f71f21 100644
--- a/description/description/CMakeLists.txt
+++ b/description/description/CMakeLists.txt
@@ -19,8 +19,12 @@
# dont do this if we are cross-compiling, as there is no need for it. We must
# also make sure the media is copied in a native install to a simulator.
+cmake_minimum_required(VERSION 3.0)
project(description)
+find_package(catkin REQUIRED COMPONENTS
+)
+
catkin_package()
install(DIRECTORY urdf DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION})
diff --git a/description/media b/description/media
index bf2057d4ab..e3561545c6 160000
--- a/description/media
+++ b/description/media
@@ -1 +1 @@
-Subproject commit bf2057d4ab02516878fd374f2f2e6601ac49510f
+Subproject commit e3561545c61b6be5406839b9d959becbfe7b4100
diff --git a/doc/general_documentation/INSTALL.md b/doc/general_documentation/INSTALL.md
index 72094b1858..ef25d418c3 100644
--- a/doc/general_documentation/INSTALL.md
+++ b/doc/general_documentation/INSTALL.md
@@ -22,28 +22,21 @@ support running Astrobee Robot Software on 32-bit systems.*
### Checkout the project source code
At this point you need to decide where you'd like to put the source code
-(`SOURCE_PATH`) on your machine:
+(`ASTROBEE_WS`) on your machine:
- export SOURCE_PATH=$HOME/astrobee
+ export ASTROBEE_WS=$HOME/astrobee
First, clone the flight software repository and media:
- git clone https://github.com/nasa/astrobee.git $SOURCE_PATH
- pushd $SOURCE_PATH
+ git clone https://github.com/nasa/astrobee.git $ASTROBEE_WS/src
+ pushd $ASTROBEE_WS/src
git submodule update --init --depth 1 description/media
popd
If you are planning to work with guest science code, you will also need the
-`astrobee_android` repository. You should checkout the repository in the same
-directory you checked out the source code in:
-
- export ANDROID_PATH="${SOURCE_PATH}_android"
-
-
-Clone the android repository:
-
- git clone https://github.com/nasa/astrobee_android.git $ANDROID_PATH
+`astrobee_android` repository. You should checkout the repository as a submodule:
+ git submodule update --init --depth 1 submodules/android
### Dependencies
@@ -54,8 +47,8 @@ Next, install all required dependencies:
*Note: Before running this please ensure that your system is completely updated
by running 'sudo apt-get update' and then 'sudo apt-get upgrade'*
- pushd $SOURCE_PATH
- cd scripts/setup
+ pushd $ASTROBEE_WS
+ cd src/scripts/setup
./add_ros_repository.sh
sudo apt-get update
cd debians
@@ -81,17 +74,21 @@ by running 'sudo apt-get update' and then 'sudo apt-get upgrade'*
## Configuring the build
### Note for the build setup
-By default, the configure script uses the following paths:
- - native build path: `$HOME/astrobee_build/native`
- - native install path: `$HOME/astrobee_install/native`
+
+When compiling, the `$WORKSPACE_PATH` defines where the `devel`, `build`, `logs` and
+`install` directories are created. If you want to customize the `install` path then the
+`$INSTALL_PATH` can be defined. By default, the configure script uses the following paths:
+
+ - native build path: `$ASTROBEE_WS/build`
+ - native install path: `$ASTROBEE_WS/install`
If you are satisfied with these paths, you can invoke the `configure.sh` without
-the `-p` and `-b` options. For the simplicity of the instructions below,
-we assume that `$BUILD_PATH` and `$INSTALL_PATH` contain the location of the
+the `-p` and `-w` options. For the simplicity of the instructions below,
+we assume that `$WORKSPACE_PATH` and `$INSTALL_PATH` contain the location of the
build and install path. For example:
- export BUILD_PATH=$HOME/astrobee_build/native
- export INSTALL_PATH=$HOME/astrobee_install/native
+ export WORKSPACE_PATH=$ASTROBEE_WS
+ export INSTALL_PATH=$ASTROBEE_WS/install
### Native build
@@ -100,14 +97,22 @@ that `configure.sh` is simply a wrapper around CMake that provides an easy way
of turning on and off options. To see which options are supported, simply run
`configure.sh -h`.
- pushd $SOURCE_PATH
- ./scripts/configure.sh -l -F -D
+ pushd $ASTROBEE_WS
+ ./src/scripts/configure.sh -l -F -D
+ source ~/.bashrc
popd
-If you want to explicitly specify the build and install directories, use
+The configure script modifies your ``.bashrc`` to source ``setup.bash`` for
+the current ROS distribution and to set CMAKE_PREFIX_PATH. It is suggested
+to examine it and see if all changes were made correctly.
+
+If you want to explicitly specify the workspace and install directories, use
instead:
- ./scripts/configure.sh -l -F -D -p $INSTALL_PATH -b $BUILD_PATH
+ ./src/scripts/configure.sh -l -F -D -p $INSTALL_PATH -w $WORKSPACE_PATH
+
+*Note: If a workspace is specified but not an explicit install distectory,
+install location will be $WORKSPACE_PATH/install.*
*Note: Make sure you use the -F and -D flags. If these flags are not used, the
code will not compile. The -F flag is used to turn off building the Picoflex.
@@ -118,13 +123,13 @@ simulator.*
## Building the code
-To build, run `make` in the `$BUILD_PATH`. Note that depending on your host
+To build, run `catkin build` in the `$WORKSPACE_PATH`. Note that depending on your host
machine, this might take in the order of tens of minutes to complete the first
time round. Future builds will be faster, as only changes to the code are
rebuilt, and not the entire code base.
- pushd $BUILD_PATH
- make -j2
+ pushd $ASTROBEE_WS
+ catkin build
popd
If you configured your virtual machine with more than the baseline resources,
diff --git a/doc/general_documentation/NASA_INSTALL.md b/doc/general_documentation/NASA_INSTALL.md
index 08ee58f3bb..2a515262a8 100644
--- a/doc/general_documentation/NASA_INSTALL.md
+++ b/doc/general_documentation/NASA_INSTALL.md
@@ -52,20 +52,17 @@ reach `astrobee.ndc.nasa.gov`:
1. Use VPN to act like if you were inside the ARC TI private network and
obtain the correct kerberos credentials inside the VM with the following
- command (note the capitalization):
-```
-kinit $NDC_USERNAME@NDC.NASA.GOV`
-```
+ command (note the capitalization): `kinit $NDC_USERNAME@NDC.NASA.GOV`
2. setup your `.ssh/config` to do ssh forwarding. A tutorial on this method
is available at: https://babelfish.arc.nasa.gov/trac/freeflyer/wiki/SSHSetup
For either solution, please verify that you can SSH to `m.ndc.nasa.gov` without
entering your password (`m` is used to tunnel to `astrobee.ndc.nasa.gov`):
- ssh $NDC_USERNAME@m.ndc.nasa.gov
+ `ssh $NDC_USERNAME@m.ndc.nasa.gov`
The command should succeed without entering your password. Once this is verified,
-exit this session on `m` with +D.
+exit this session on `m` with `+D`.
- These notes apply to `install_desktop_16.04_packages.sh` and `make_xenial.sh`
@@ -73,13 +70,13 @@ exit this session on `m` with +D.
### Checkout the project source code
At this point you need to decide where you'd like to put the source code
-(`SOURCE_PATH`) on your machine:
+(`ASTROBEE_WS`) on your machine:
- export SOURCE_PATH=$HOME/astrobee
+ export ASTROBEE_WS=$HOME/astrobee
First, clone the flight software repository:
- git clone https://github.com/nasa/astrobee.git --branch develop $SOURCE_PATH
+ git clone https://github.com/nasa/astrobee.git --branch develop $ASTROBEE_WS/src
git submodule update --init --depth 1 description/media
git submodule update --init --depth 1 submodules/platform
@@ -99,8 +96,8 @@ module is used when cross-compiling to test on the robot hardware.
### Dependencies
Install dependencies:
- pushd $SOURCE_PATH
- cd scripts/setup
+ pushd $ASTROBEE_WS
+ cd src/scripts/setup
./add_local_repository.sh
./add_ros_repository.sh
./install_desktop_packages.sh
@@ -134,8 +131,11 @@ Next, download the cross toolchain and install the chroot:
mkdir -p $ARMHF_TOOLCHAIN
cd $HOME/arm_cross
- $SOURCE_PATH/submodules/platform/fetch_toolchain.sh
- $SOURCE_PATH/submodules/platform/rootfs/make_xenial.sh dev $ARMHF_CHROOT_DIR
+ $ASTROBEE_WS/src/submodules/platform/fetch_toolchain.sh
+ $ASTROBEE_WS/src/submodules/platform/rootfs/make_xenial.sh dev $ARMHF_CHROOT_DIR
+
+*Note: The last script shown above needs the packages `qemu-user-static` (not
+`qemu-arm-static`) and `multistrap` to be installed (can be installed through apt).*
## Configuring the build
@@ -145,18 +145,20 @@ the code on the robot itself). Please skip to the relevant subsection.
### Note for both builds setup
-By default, the configure script uses the following paths:
+When compiling, the `$WORKSPACE_PATH` defines where the `devel`, `build`, `logs` and
+`install` directories are created. If you want to customize the `install` path then the
+`$INSTALL_PATH` can be defined. By default, the configure script uses the following paths:
- - native build path (BUILD_PATH): `$HOME/astrobee_build/native`
- - native install path (INSTALL_PATH): `$HOME/astrobee_install/native`
- - armhf build path (BUILD_PATH): `$HOME/astrobee_build/armhf`
- - armhf install path (INSTALL_PATH): `$HOME/astrobee_install/armhf`
+ - native build path (WORKSPACE_PATH): `$ASTROBEE_WS`
+ - native install path (INSTALL_PATH): `$ASTROBEE_WS/install`
+ - armhf build path (WORKSPACE_PATH): `$ASTROBEE_WS/armhf`
+ - armhf install path (INSTALL_PATH): `$ASTROBEE_WS/armhf/install`
You should set these values in your shell.
If you are satisfied with these paths, you can invoke the `configure.sh` without
-the `-p` and `-b` options. For the simplicity of the instructions below,
-we assume that `$BUILD_PATH` and `$INSTALL_PATH` contain the location of the
+the `-p` and `-w` options. For the simplicity of the instructions below,
+we assume that `$WORKSPACE_PATH` and `$INSTALL_PATH` contain the location of the
build and install path for either `native` or `armhf` platforms.
### Native build
@@ -166,45 +168,57 @@ that `configure.sh` is simply a wrapper around CMake that provides an easy way
of turning on and off options. To see which options are supported, simply run
`configure.sh -h`.
- pushd $SOURCE_PATH
- ./scripts/configure.sh -l
+ pushd $ASTROBEE_WS
+ ./src/scripts/configure.sh -l
+ source ~/.bashrc
popd
-If you want to explicitly specify the build and install directories, use
+The configure script modifies your ``.bashrc`` to source ``setup.bash`` for
+the current ROS distribution and to set CMAKE_PREFIX_PATH. It is suggested
+to examine it and see if all changes were made correctly.
+
+If you want to explicitly specify the workspace and/or install directories, use
instead:
- ./scripts/configure.sh -l -p $INSTALL_PATH -b $BUILD_PATH
+ ./scripts/configure.sh -l -p $INSTALL_PATH -w $WORKSPACE_PATH
+
+*Note: If a workspace is specified but not an explicit install distectory,
+install location will be $WORKSPACE_PATH/install.*
### Cross-compile build
Cross compiling for the robot follows the same process, except the configure
script takes a `-a` flag instead of `-l`.
- pushd $SOURCE_PATH
- ./scripts/configure.sh -a
+ pushd $ASTROBEE_WS
+ ./src/scripts/configure.sh -a
popd
Or with explicit build and install paths:
- ./scripts/configure.sh -a -p $INSTALL_PATH -b $BUILD_PATH
+ ./scripts/configure.sh -a -p $INSTALL_PATH -w $WORKSPACE_PATH
-*Warning: `$INSTALL_PATH` and `$BUILD_PATH` used for cross compiling HAVE to be
+*Warning: `$INSTALL_PATH` and `$WORKSPACE_PATH` used for cross compiling HAVE to be
different than the paths for native build! See above for the default values
for these.*
## Building the code
-To build, run `make` in the `$BUILD_PATH`. Note that depending on your host
+To build, run `catkin build` in the `$WORKSPACE_PATH`. Note that depending on your host
machine, this might take in the order of tens of minutes to complete the first
time round. Future builds will be faster, as only changes to the code are
rebuilt, and not the entire code base.
- pushd $BUILD_PATH
- make -j6
+ pushd $ASTROBEE_WS
+ catkin build
popd
-*Note: `$BUILD_PATH` above is either the path for native build or armhf build,
-whatever you currently are doing.*
+## Switching build profiles
+
+To alternate between native and armhf profiles:
+
+ catkin profile set native
+ catkin profile set armhf
## Running a simulation
@@ -212,7 +226,7 @@ In order to run a simulation you must have build natively. You will need to
first setup your environment, so that ROS knows about the new packages provided
by Astrobee flight software:
- pushd $BUILD_PATH
+ pushd $ASTROBEE_WS
source devel/setup.bash
popd
@@ -234,21 +248,17 @@ For more information on running the simulator and moving the robot, please see t
## Running the code on a real robot
In order to do this, you will need to have followed the cross-compile build
-instructions. Once the code has been built, you also need to install the code to
+instructions. Once the code has been built, it also installs the code to
a singular location. CMake remembers what `$INSTALL_PATH` you specified, and
will copy all products into this directory.
- pushd $BUILD_PATH
- make install
- popd
-
Once the installation has completed, copy the install directory to the robot.
This script assumes that you are connected to the Astrobee network, as it uses
rsync to copy the install directory to `~/armhf` on the two processors. It
takes the robot name as an argument. Here we use `p4d'.
- pushd $SOURCE_PATH
- ./scripts/install_to_astrobee.sh $INSTALL_PATH p4d
+ pushd $ASTROBEE_WS
+ ./src/scripts/install_to_astrobee.sh $INSTALL_PATH p4d
popd
Here, p4d is the name of the robot, which may be different in your case.
@@ -256,8 +266,8 @@ Here, p4d is the name of the robot, which may be different in your case.
You are now ready to run the code. This code launches a visualization tool,
which starts the flight software as a background process.
- pushd $SOURCE_PATH
- python ./tools/gnc_visualizer/scripts/visualizer --proto4
+ pushd $ASTROBEE_WS
+ python ./src/tools/gnc_visualizer/scripts/visualizer --proto4
popd
# Further information
diff --git a/doc/general_documentation/code_style.md b/doc/general_documentation/code_style.md
new file mode 100644
index 0000000000..1e8d8f8dfd
--- /dev/null
+++ b/doc/general_documentation/code_style.md
@@ -0,0 +1,3 @@
+\page astrobee-code-style Astrobee code style
+
+The Astrobee code uses [cpplint](https://en.wikipedia.org/wiki/Cpplint) to enforce a consistent and uniform coding style. Code which fails this tool cannot be committed with Git. It is suggested that the [clang-format-8](https://launchpad.net/ubuntu/bionic/+package/clang-format-8) program be installed on your machine. The *git commit* command will invoke this tool which will fix most (but not all) of the formatting errors using as a guide the ``.clang-format`` style file at the base of the Astrobee repository.
diff --git a/doc/general_documentation/flight_release.md b/doc/general_documentation/flight_release.md
index e547cc231a..18ebc2f7e7 100644
--- a/doc/general_documentation/flight_release.md
+++ b/doc/general_documentation/flight_release.md
@@ -1,7 +1,5 @@
\page release Creating a Flight Release
-# Creating a Flight Release
-
This page describes the steps required to complete a flight release. It assumes
that your environment is configured to cross-compile the fsw for the `armhf`
architecture.
diff --git a/doc/general_documentation/readme.md b/doc/general_documentation/readme.md
deleted file mode 100644
index 9abf7bca4e..0000000000
--- a/doc/general_documentation/readme.md
+++ /dev/null
@@ -1,95 +0,0 @@
-\page doc Documentation
-
-# Tools used for FSW documentation
-
-## Code documentation
-
-Code should be documented using doxygen using the latest version.
-
-## UML diagraming
-
-Astrobee UML diagrams are created using [plantuml](http://plantuml.com/) that
-transform text files into beautiful UML 2 compliant diagrams.
-
-Specific notations used in the diagrams to represent ROS communication schemes
-is described in:
-[Astrobee UML Notations](doc/diagrams/notations.png)
-
-Despite the ads overloaded website, plantuml is free and [open
-source](https://github.com/plantuml/plantuml). The plantuml [Reference
-Guide](http://plantuml.com/PlantUML_Language_Reference_Guide.pdf) walks to all
-the diagrams types.
-
-Plantuml relies on [Graphviz](http://www.graphviz.org/) that should be already
-installed since ROS is also using this tool to render runtime node/topic graphs.
-There are many ways to write/generate plantuml diagrams:
-http://plantuml.com/running. Choose the integration that best suit you, but vim +
-command line java works perfectly.
-
-Note: some diagrams are not generated correctly when using graphviz 2.40 (layout
-stretched vertically). So for now please use graphviz 2.38.
-
-Note: to re-active the 2.38 that keep being updated on Mac:
-
- sudo port activate graphviz @2.38.0_3+pangocairo
-
-To generate the diagrams from the `doc\diagrams` directory:
-```
-make
-# or to get PNG versions:
-make png
-```
-
-## ROS Messages, Services and Actions
-
-Our toolchain incudes Doxygen python filters to interpret `*.msg`, `*.action`
-and `*.srv` files. Internally, the filters convert the messages, topics and
-action files to markdown, and renders them in a hierarchy of Doxygen 'module'
-pages. So, they will appear in the same structure as the written markdown
-documentation, and not as classes / structs or other types.
-
-In order for the files to be interpreted correctly, one needs to abide by a
-couple of simple rules.
-1. All header lines must begin with a '#' comment character. The end of the
- header is signified by an empty line. All comments following the newline will
- be treated as leading comments for the first declared variable.
-1. Any header lines containing the word 'copyright' will be stripped from the
- documentation. All hashes ans newlines will also be stripped from the
- documentation. You are therefore discouraged from including any comment that
- relies on formatting using tabs or spaces.
-1. You may document a variable above (leading) or in-line (to the right of) it's
- declaration. However, you cannot do both! An inline comment will mute a
- leading comment.
-
-# ROS Unit Tests
-
-The ROS test framework (rostest) is build upon the Google test framework. The
-idea behind a ROS test is that it first launches a collection of ROS nodes, and
-then starts the unit test, which runs tests against the ROS nodes.
-
-Writing a unit test for a package involves modifying the package's
-`CMakeLists.txt` and `package.xml` files, and writing a collection of test
-cases. To see an example, have a look in the `./tools/visualeyez` folder.
-
-To build all ROS tests, use the following:
-
- make -j6 tests
-
-To execute all ROS tests run the following:
-
- make -j6 run_tests
-
-Note that by default all ROS console messages (ROS_INFO, ROS_WARN, etc.) called
-from within the test cases are suppressed. To print all messages, as well as a
-more comprehensive test result, add the `--text` argument:
-```
-rostest <*.test> --text
-```
-
-Sometimes you want to debug your unit tests, but it's unclear on which port
-rostest started the ROS master. A simpler approach is to manually start the ROS
-master using `roscore` and then latch the rostest to this master with the
-`reuse-master` argument as follows:
-```
-rostest <*.test> --reuse-master
-```
\ No newline at end of file
diff --git a/external/CATKIN_IGNORE b/external/CATKIN_IGNORE
deleted file mode 100644
index 8d1c8b69c3..0000000000
--- a/external/CATKIN_IGNORE
+++ /dev/null
@@ -1 +0,0 @@
-
diff --git a/external/CMakeLists.txt b/external/CMakeLists.txt
deleted file mode 100644
index 09e17b861b..0000000000
--- a/external/CMakeLists.txt
+++ /dev/null
@@ -1,30 +0,0 @@
-# Copyright (c) 2017, United States Government, as represented by the
-# Administrator of the National Aeronautics and Space Administration.
-#
-# All rights reserved.
-#
-# The Astrobee platform is licensed under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with the
-# License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-# License for the specific language governing permissions and limitations
-# under the License.
-
-# all the external packages have lots of warnings, ignore them
-#STRING(REGEX REPLACE "-Wall" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
-#STRING(REGEX REPLACE "-Wall" "" CMAKE_C_FLAGS "${CMAKE_C_FLAGS}")
-#STRING(REGEX REPLACE "-Werror" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
-#STRING(REGEX REPLACE "-Werror" "" CMAKE_C_FLAGS "${CMAKE_C_FLAGS}")
-#set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -w")
-#set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -w")
-
-# gtest is needed because no binaries distributed with ubuntu!!!
-add_subdirectory(gtest)
-set(GTEST_LIBRARIES ${GTEST_LIBRARIES} PARENT_SCOPE)
-set(GTEST_INCLUDE_DIRS ${GTEST_INCLUDE_DIRS} PARENT_SCOPE)
-
diff --git a/gnc/CMakeLists.txt b/gnc/CMakeLists.txt
deleted file mode 100644
index a4cca4df8e..0000000000
--- a/gnc/CMakeLists.txt
+++ /dev/null
@@ -1,22 +0,0 @@
-# Copyright (c) 2017, United States Government, as represented by the
-# Administrator of the National Aeronautics and Space Administration.
-#
-# All rights reserved.
-#
-# The Astrobee platform is licensed under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with the
-# License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-# License for the specific language governing permissions and limitations
-# under the License.
-
-add_subdirectory(ctl)
-add_subdirectory(ekf)
-add_subdirectory(fam)
-add_subdirectory(gnc_autocode)
-add_subdirectory(sim_wrapper)
diff --git a/gnc/ctl/CMakeLists.txt b/gnc/ctl/CMakeLists.txt
index cd8dca1eff..b0e43276e2 100644
--- a/gnc/ctl/CMakeLists.txt
+++ b/gnc/ctl/CMakeLists.txt
@@ -15,18 +15,54 @@
# License for the specific language governing permissions and limitations
# under the License.
+cmake_minimum_required(VERSION 3.0)
project(ctl)
+## Compile as C++14, supported in ROS Kinetic and newer
+add_compile_options(-std=c++14)
+
+## Find catkin macros and libraries
+find_package(catkin2 REQUIRED COMPONENTS
+ roscpp
+ nodelet
+ ff_msgs
+ ff_util
+ config_reader
+ gnc_autocode
+)
+# System dependencies are found with CMake's conventions
+find_package(Eigen3 REQUIRED)
+
catkin_package(
- LIBRARIES ctl
- CATKIN_DEPENDS roscpp sensor_msgs nav_msgs
- DEPENDS ff_msgs ff_hw_msgs ff_common
+ LIBRARIES
+ ctl
+ CATKIN_DEPENDS
+ roscpp
+ nodelet
+ ff_msgs
+ ff_util
+ config_reader
+ gnc_autocode
)
-create_library(TARGET ctl
- LIBS ${catkin_LIBRARIES} ${EIGEN_LIBRARIES} gnc_autocode msg_conversions ff_common config_reader ff_nodelet
- INC ${catkin_INCLUDE_DIRS} ${EIGEN3_INCLUDE_DIRS}
- DEPS ff_msgs ff_hw_msgs)
+###########
+## Build ##
+###########
+
+# Specify additional locations of header files
+include_directories(
+ include
+ ${catkin_INCLUDE_DIRS}
+ ${EIGEN3_INCLUDE_DIR}
+)
+
+# Declare C++ libraries
+add_library(ctl
+ src/ctl.cc
+ src/ctl_nodelet.cc
+)
+add_dependencies(ctl ${catkin_EXPORTED_TARGETS})
+target_link_libraries(ctl ${catkin_LIBRARIES})
if(CATKIN_ENABLE_TESTING AND ENABLE_INTEGRATION_TESTING)
find_package(rostest REQUIRED)
@@ -38,4 +74,32 @@ if(CATKIN_ENABLE_TESTING AND ENABLE_INTEGRATION_TESTING)
)
endif()
-install_launch_files()
+
+#############
+## Install ##
+#############
+
+# Mark libraries for installation
+install(TARGETS ${PROJECT_NAME}
+ ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
+ LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
+ RUNTIME DESTINATION ${CATKIN_GLOBAL_BIN_DESTINATION}
+)
+
+# Mark nodelet_plugin for installation
+install(FILES nodelet_plugins.xml
+ DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}
+)
+
+# Mark cpp header files for installation
+install(DIRECTORY include/${PROJECT_NAME}/
+ DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION}
+ FILES_MATCHING PATTERN "*.h"
+ PATTERN ".svn" EXCLUDE
+)
+
+# Mark launch files for installation
+install(DIRECTORY launch/
+ DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}/launch
+ PATTERN ".svn" EXCLUDE)
+
diff --git a/gnc/ctl/include/ctl/ctl.h b/gnc/ctl/include/ctl/ctl.h
index 3e1554dffb..1503009cec 100644
--- a/gnc/ctl/include/ctl/ctl.h
+++ b/gnc/ctl/include/ctl/ctl.h
@@ -184,6 +184,7 @@ class Ctl {
std::string name_;
bool inertia_received_;
bool control_enabled_;
+ bool flight_enabled_;
bool use_truth_;
float stopping_vel_thresh_squared_;
float stopping_omega_thresh_squared_;
diff --git a/gnc/ctl/package.xml b/gnc/ctl/package.xml
index 0d84445096..6a4eade279 100644
--- a/gnc/ctl/package.xml
+++ b/gnc/ctl/package.xml
@@ -16,18 +16,18 @@
catkin
roscpp
- sensor_msgs
- vpp_msgs
- nav_msgs
- ff_msgs
nodelet
+ ff_msgs
+ ff_util
+ config_reader
+ gnc_autocode
roscpp
- rt_analyze
- sensor_msgs
- vpp_msgs
- nav_msgs
- ff_msgs
nodelet
+ ff_msgs
+ ff_util
+ ff_msgs
+ config_reader
+ gnc_autocode
diff --git a/gnc/ctl/src/ctl.cc b/gnc/ctl/src/ctl.cc
index 5c25f7bd99..4191f16bcb 100644
--- a/gnc/ctl/src/ctl.cc
+++ b/gnc/ctl/src/ctl.cc
@@ -42,7 +42,7 @@ namespace ctl { // Nodehandle for /gnc/wrapper
Ctl::Ctl(ros::NodeHandle* nh, std::string const& name) :
fsm_(WAITING, std::bind(&Ctl::UpdateCallback,
this, std::placeholders::_1, std::placeholders::_2)),
- name_(name), inertia_received_(false), control_enabled_(false) {
+ name_(name), inertia_received_(false), control_enabled_(true), flight_enabled_(false) {
// Add the state transition lambda functions - refer to the FSM diagram
// [0]
fsm_.Add(WAITING,
@@ -332,7 +332,7 @@ void Ctl::FlightModeCallback(const ff_msgs::FlightMode::ConstPtr& mode) {
mc::ros_to_array_vector(mode->pos_ki, input.pos_ki);
mc::ros_to_array_vector(mode->vel_kd, input.vel_kd);
input.speed_gain_cmd = mode->speed;
- control_enabled_ =
+ flight_enabled_ =
(input.speed_gain_cmd > 0 ? mode->control_enabled : false);
}
@@ -510,7 +510,7 @@ bool Ctl::Step(void) {
NODELET_DEBUG_STREAM_THROTTLE(10, "GNC step waiting for inertia");
return false;
}
- if (!control_enabled_) {
+ if (!flight_enabled_ || !control_enabled_) {
NODELET_DEBUG_STREAM_THROTTLE(10, "GNC control disabled in flight mode");
return false;
}
diff --git a/gnc/ekf/CMakeLists.txt b/gnc/ekf/CMakeLists.txt
index 1a3769a6ea..5a74453bb7 100644
--- a/gnc/ekf/CMakeLists.txt
+++ b/gnc/ekf/CMakeLists.txt
@@ -15,17 +15,71 @@
# License for the specific language governing permissions and limitations
# under the License.
+cmake_minimum_required(VERSION 3.0)
project(ekf)
+## Compile as C++14, supported in ROS Kinetic and newer
+add_compile_options(-std=c++14)
+
+## Find catkin macros and libraries
+find_package(catkin2 REQUIRED COMPONENTS
+ roscpp
+ ff_msgs
+ ff_util
+ config_reader
+ gnc_autocode
+ camera
+)
+
catkin_package(
+ INCLUDE_DIRS include
LIBRARIES ekf
- CATKIN_DEPENDS roscpp sensor_msgs nav_msgs
- DEPENDS ff_msgs ff_hw_msgs ff_common
+ CATKIN_DEPENDS roscpp ff_msgs ff_util config_reader gnc_autocode camera
+)
+
+###########
+## Build ##
+###########
+
+# Specify additional locations of header files
+include_directories(
+ include
+ ${catkin_INCLUDE_DIRS}
+)
+
+# Declare C++ libraries
+add_library(ekf
+ src/ekf.cc
+ src/ekf_nodelet.cc
+ src/ekf_wrapper.cc
+)
+add_dependencies(ekf ${catkin_EXPORTED_TARGETS})
+target_link_libraries(ekf ${catkin_LIBRARIES})
+
+#############
+## Install ##
+#############
+
+# Mark libraries for installation
+install(TARGETS ${PROJECT_NAME}
+ ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
+ LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
+ RUNTIME DESTINATION ${CATKIN_GLOBAL_BIN_DESTINATION}
)
-create_library(TARGET ekf
- LIBS ${catkin_LIBRARIES} ${EIGEN_LIBRARIES} gnc_autocode msg_conversions camera ff_common config_reader ff_nodelet ff_flight
- INC ${catkin_INCLUDE_DIRS} ${EIGEN3_INCLUDE_DIRS}
- DEPS ff_msgs ff_hw_msgs)
+# Mark nodelet_plugin for installation
+install(FILES nodelet_plugins.xml
+ DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}
+)
+
+# Mark cpp header files for installation
+install(DIRECTORY include/${PROJECT_NAME}/
+ DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION}
+ FILES_MATCHING PATTERN "*.h"
+ PATTERN ".svn" EXCLUDE
+)
-install_launch_files()
+# Mark launch files for installation
+install(DIRECTORY launch/
+ DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}/launch
+ PATTERN ".svn" EXCLUDE)
diff --git a/gnc/ekf/package.xml b/gnc/ekf/package.xml
index f65c8d463f..0062940cee 100644
--- a/gnc/ekf/package.xml
+++ b/gnc/ekf/package.xml
@@ -16,18 +16,18 @@
catkin
roscpp
- sensor_msgs
- vpp_msgs
- nav_msgs
ff_msgs
- nodelet
+ ff_util
+ config_reader
+ gnc_autocode
+ camera
roscpp
- rt_analyze
- sensor_msgs
- vpp_msgs
- nav_msgs
ff_msgs
- nodelet
+ ff_util
+ ff_msgs
+ config_reader
+ gnc_autocode
+ camera
diff --git a/gnc/fam/CMakeLists.txt b/gnc/fam/CMakeLists.txt
index b51661889c..0c3ee5e304 100644
--- a/gnc/fam/CMakeLists.txt
+++ b/gnc/fam/CMakeLists.txt
@@ -15,17 +15,77 @@
# License for the specific language governing permissions and limitations
# under the License.
+cmake_minimum_required(VERSION 3.0)
project(fam)
+## Compile as C++14, supported in ROS Kinetic and newer
+add_compile_options(-std=c++14)
+
+## Find catkin macros and libraries
+find_package(catkin2 REQUIRED COMPONENTS
+ roscpp
+ nodelet
+ ff_msgs
+ ff_hw_msgs
+ ff_util
+ config_reader
+ gnc_autocode
+)
+
+# System dependencies are found with CMake's conventions
+find_package(Eigen3 REQUIRED)
+
catkin_package(
- LIBRARIES fam
- CATKIN_DEPENDS roscpp sensor_msgs nav_msgs
- DEPENDS ff_msgs ff_hw_msgs ff_common
+ LIBRARIES
+ fam
+ CATKIN_DEPENDS
+ roscpp
+ nodelet
+ ff_msgs
+ ff_hw_msgs
+ ff_util
+ config_reader
+ gnc_autocode
)
-create_library(TARGET fam
- LIBS ${catkin_LIBRARIES} ${EIGEN_LIBRARIES} gnc_autocode msg_conversions ff_common config_reader ff_nodelet
- INC ${catkin_INCLUDE_DIRS} ${EIGEN3_INCLUDE_DIRS}
- DEPS ff_msgs ff_hw_msgs)
+###########
+## Build ##
+###########
+
+# Specify additional locations of header files
+include_directories(
+ include
+ ${catkin_INCLUDE_DIRS}
+ ${EIGEN3_INCLUDE_DIR}
+)
+
+# Declare C++ libraries
+add_library(fam
+ src/fam.cc
+ src/fam_nodelet.cc
+)
+add_dependencies(fam ${catkin_EXPORTED_TARGETS})
+target_link_libraries(fam ${catkin_LIBRARIES})
+
+#############
+## Install ##
+#############
+
+# Mark libraries for installation
+install(TARGETS ${PROJECT_NAME}
+ ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
+ LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
+ RUNTIME DESTINATION ${CATKIN_GLOBAL_BIN_DESTINATION}
+)
+
+# Mark nodelet_plugin for installation
+install(FILES nodelet_plugins.xml
+ DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}
+)
+
+# Mark launch files for installation
+install(DIRECTORY launch/
+ DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}/launch
+ PATTERN ".svn" EXCLUDE)
+
-install_launch_files()
diff --git a/gnc/fam/package.xml b/gnc/fam/package.xml
index c556cf684f..1a4392849d 100644
--- a/gnc/fam/package.xml
+++ b/gnc/fam/package.xml
@@ -16,18 +16,20 @@
catkin
roscpp
- sensor_msgs
- vpp_msgs
- nav_msgs
- ff_msgs
nodelet
+ ff_msgs
+ ff_hw_msgs
+ ff_util
+ config_reader
+ gnc_autocode
roscpp
- rt_analyze
- sensor_msgs
- vpp_msgs
- nav_msgs
- ff_msgs
nodelet
+ ff_msgs
+ ff_util
+ ff_msgs
+ ff_hw_msgs
+ config_reader
+ gnc_autocode
diff --git a/gnc/gnc_autocode/CMakeLists.txt b/gnc/gnc_autocode/CMakeLists.txt
index a43881d83a..b06e34b52e 100644
--- a/gnc/gnc_autocode/CMakeLists.txt
+++ b/gnc/gnc_autocode/CMakeLists.txt
@@ -15,12 +15,25 @@
# License for the specific language governing permissions and limitations
# under the License.
+cmake_minimum_required(VERSION 3.0)
project(gnc_autocode)
+
+## Compile as C++14, supported in ROS Kinetic and newer
+add_compile_options(-std=c++14)
+
+## Find catkin macros and libraries
+find_package(catkin2 REQUIRED COMPONENTS
+ roscpp
+ ff_util
+ config_reader
+ msg_conversions
+)
+
# find gnc directories
find_path ( GNC_ROOT_DIR ctl_controller0_ert_rtw/ctl_controller0.h
- PATHS ${CMAKE_SOURCE_DIR}/gnc/matlab/code_generation
- HINTS ${CMAKE_SOURCE_DIR}/gnc/matlab/code_generation
+ PATHS ${CMAKE_SOURCE_DIR}/../matlab/code_generation
+ HINTS ${CMAKE_SOURCE_DIR}/../matlab/code_generation
NO_CMAKE_FIND_ROOT_PATH
)
@@ -34,7 +47,7 @@ if (GNC_ROOT_DIR)
set (GNC_BL1_DIR ${GNC_ROOT_DIR}/bpm_blower_1_propulsion_module_ert_rtw)
set (GNC_BL2_DIR ${GNC_ROOT_DIR}/bpm_blower_2_propulsion_module_ert_rtw)
set (GNC_UTIL_DIR ${GNC_ROOT_DIR}/sharedutils)
- set (GNC_SPD_DIR ${GNC_ROOT_DIR}/esc_electronic_speed_controller0_ert_rtw)
+ #set (GNC_SPD_DIR ${GNC_ROOT_DIR}/esc_electronic_speed_controller0_ert_rtw)
set (GNC_CXX_DIR ${GNC_ROOT_DIR}/../cxx_functions)
set (GNC_INCLUDE_DIRS ${GNC_ADDITIONAL_DIR} ${GNC_CTL_DIR} ${GNC_EST_DIR} ${GNC_FAM_DIR})
else (GNC_ROOT_DIR)
@@ -91,9 +104,57 @@ STRING(REGEX REPLACE "-Werror[^ ]*" "" CMAKE_C_FLAGS "${CMAKE_C_FLAGS}")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -w -DPORTABLE_WORDSIZES -ffast-math -funsafe-math-optimizations")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -w -DPORTABLE_WORDSIZES -ffast-math -funsafe-math-optimizations")
-create_library(TARGET gnc_autocode
- LIBS ${EIGEN_LIBRARIES} ff_nodelet config_reader msg_conversions
- INC ${GNC_INCLUDES} ${EIGEN_INCLUDE_DIRS}
- ADD_SRCS ${GNC_SOURCES}
+catkin_package(
+ INCLUDE_DIRS include ${GNC_INCLUDES}
+ LIBRARIES gnc_autocode
+ CATKIN_DEPENDS
+ roscpp
+ ff_util
+ config_reader
+ msg_conversions
+)
+
+###########
+## Build ##
+###########
+
+# Specify additional locations of header files
+include_directories(
+ include
+ ${catkin_INCLUDE_DIRS}
+ ${GNC_INCLUDES}
)
+# Declare C++ libraries
+add_library(gnc_autocode
+ src/autocode.cc
+ src/constants.cc
+ src/ekf.cc
+ src/fam.cc
+ src/sim_csv.cc
+ src/blowers.cc
+ src/ctl.cc
+ src/ekf_csv.cc
+ src/sim.cc
+ ${GNC_SOURCES}
+)
+add_dependencies(gnc_autocode ${catkin_EXPORTED_TARGETS})
+target_link_libraries(gnc_autocode ${catkin_LIBRARIES})
+
+#############
+## Install ##
+#############
+
+# Mark libraries for installation
+install(TARGETS ${PROJECT_NAME}
+ ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
+ LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
+ RUNTIME DESTINATION ${CATKIN_GLOBAL_BIN_DESTINATION}
+)
+
+# Mark cpp header files for installation
+install(DIRECTORY include/${PROJECT_NAME}/
+ DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION}
+ FILES_MATCHING PATTERN "*.h"
+ PATTERN ".svn" EXCLUDE
+)
diff --git a/tools/simulator/dock_sim/package.xml b/gnc/gnc_autocode/package.xml
similarity index 53%
rename from tools/simulator/dock_sim/package.xml
rename to gnc/gnc_autocode/package.xml
index 5f5f5aa010..dfc9e816dd 100644
--- a/tools/simulator/dock_sim/package.xml
+++ b/gnc/gnc_autocode/package.xml
@@ -1,12 +1,12 @@
- dock_sim
+ gnc_autocode
0.0.0
-
- The dock simulator simulates the dock and undock action.
+ Calls the GNC simulink auto-generated EKF code, and passes
+ inputs and outputs to and from ros messages.
- Apache License, Version 2.0
+ Apache License, Version 2.0
Astrobee Flight Software
@@ -16,11 +16,13 @@
catkin
roscpp
- ff_msgs
- nodelet
- ff_msgs
+ ff_util
+ config_reader
+ msg_conversions
roscpp
- nodelet
+ ff_util
+ config_reader
+ msg_conversions
diff --git a/gnc/sim_wrapper/CMakeLists.txt b/gnc/sim_wrapper/CMakeLists.txt
index d4fb7d17ca..7bdc66b067 100644
--- a/gnc/sim_wrapper/CMakeLists.txt
+++ b/gnc/sim_wrapper/CMakeLists.txt
@@ -15,21 +15,96 @@
# License for the specific language governing permissions and limitations
# under the License.
+cmake_minimum_required(VERSION 3.0)
project(sim_wrapper)
+## Compile as C++14, supported in ROS Kinetic and newer
+add_compile_options(-std=c++14)
+
+## Find catkin macros and libraries
+find_package(catkin2 REQUIRED COMPONENTS
+ roscpp
+ ff_msgs
+ ff_hw_msgs
+ ff_util
+ config_reader
+ gnc_autocode
+ camera
+ sparse_mapping
+)
+
catkin_package(
- LIBRARIES sim_wrapper
- CATKIN_DEPENDS roscpp geometry_msgs ff_util nodelet pluginlib
+ LIBRARIES
+ sim_wrapper
+ CATKIN_DEPENDS
+ roscpp
+ ff_msgs
+ ff_hw_msgs
+ ff_util
+ config_reader
+ gnc_autocode
+ camera
+ sparse_mapping
+)
+
+###########
+## Build ##
+###########
+
+# Specify additional locations of header files
+include_directories(
+ include
+ ${catkin_INCLUDE_DIRS}
)
-create_library(TARGET sim_wrapper
- LIBS ${catkin_LIBRARIES} gnc_autocode sparse_mapping msg_conversions camera ff_nodelet
- INC ${catkin_INCLUDE_DIRS}
- DEPS ff_hw_msgs
+# Declare C++ libraries
+add_library(sim_wrapper
+ src/sim.cc
+ src/sim_nodelet.cc
)
+add_dependencies(sim_wrapper ${catkin_EXPORTED_TARGETS})
+target_link_libraries(sim_wrapper ${catkin_LIBRARIES})
-create_tool_targets(DIR tools
- LIBS sim_wrapper
+## Declare a C++ executable: sim_node
+add_executable(sim_node tools/sim_node.cc)
+add_dependencies(sim_node ${catkin_EXPORTED_TARGETS})
+target_link_libraries(sim_node
+ sim_wrapper gflags ${catkin_LIBRARIES})
+
+## Declare a C++ executable: sim_node
+add_executable(test_sim tools/test_sim.cc)
+add_dependencies(test_sim ${catkin_EXPORTED_TARGETS})
+target_link_libraries(test_sim
+ sim_wrapper ${catkin_LIBRARIES})
+
+#############
+## Install ##
+#############
+
+# Mark libraries for installation
+install(TARGETS ${PROJECT_NAME}
+ ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
+ LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
+ RUNTIME DESTINATION ${CATKIN_GLOBAL_BIN_DESTINATION}
)
-install_launch_files()
\ No newline at end of file
+# Mark nodelet_plugin for installation
+install(FILES nodelet_plugins.xml
+ DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}
+)
+
+# Install C++ executables
+install(TARGETS sim_node DESTINATION bin)
+install(TARGETS test_sim DESTINATION bin)
+install(CODE "execute_process(
+ COMMAND ln -s ../../bin/sim_node share/${PROJECT_NAME}
+ COMMAND ln -s ../../bin/test_sim share/${PROJECT_NAME}
+ WORKING_DIRECTORY ${CMAKE_INSTALL_PREFIX}
+ OUTPUT_QUIET
+ ERROR_QUIET
+ )")
+
+# Mark launch files for installation
+install(DIRECTORY launch/
+ DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}/launch
+ PATTERN ".svn" EXCLUDE)
diff --git a/gnc/sim_wrapper/package.xml b/gnc/sim_wrapper/package.xml
index f3c0e624ce..3eded9c9ed 100644
--- a/gnc/sim_wrapper/package.xml
+++ b/gnc/sim_wrapper/package.xml
@@ -15,20 +15,22 @@
Astrobee Flight Software
catkin
- nodelet
- pluginlib
+ roscpp
ff_msgs
+ ff_hw_msgs
ff_util
- roscpp
- sensor_msgs
- geometry_msgs
+ config_reader
+ gnc_autocode
+ camera
+ sparse_mapping
roscpp
- nodelet
- pluginlib
ff_msgs
+ ff_hw_msgs
ff_util
- sensor_msgs
- geometry_msgs
+ config_reader
+ gnc_autocode
+ camera
+ sparse_mapping
diff --git a/hardware/eps_driver/CMakeLists.txt b/hardware/eps_driver/CMakeLists.txt
index 74baa86642..ad23c586b0 100644
--- a/hardware/eps_driver/CMakeLists.txt
+++ b/hardware/eps_driver/CMakeLists.txt
@@ -15,9 +15,24 @@
# License for the specific language governing permissions and limitations
# under the License.
+cmake_minimum_required(VERSION 3.0)
project(eps_driver)
+## Compile as C++14, supported in ROS Kinetic and newer
+add_compile_options(-std=c++14)
+
+## Find catkin macros and libraries
+find_package(catkin2 REQUIRED COMPONENTS
+ roscpp
+ nodelet
+ pluginlib
+ ff_util
+ ff_hw_msgs
+ i2c
+)
+
catkin_package(
+ INCLUDE_DIRS include
LIBRARIES
eps_driver
CATKIN_DEPENDS
@@ -26,41 +41,90 @@ catkin_package(
pluginlib
ff_util
ff_hw_msgs
+ i2c
)
-# ROS agnostic proxy library and tool
+###########
+## Build ##
+###########
-create_library(
- DIR src/eps_driver
- TARGET eps_driver
- LIBS i2c
+# Specify additional locations of header files
+include_directories(
+ include
+ ${catkin_INCLUDE_DIRS}
)
-create_tool_targets(
- DIR tools/eps_driver_tool
- LIBS eps_driver ff_common
+# Declare C++ libraries
+add_library(eps_driver
+ src/eps_driver/eps_driver.cc
)
+add_dependencies(eps_driver ${catkin_EXPORTED_TARGETS})
+target_link_libraries(eps_driver ${catkin_LIBRARIES})
-# ROS node
-create_library(
- DIR src/eps_driver_node
- TARGET eps_driver_node
- LIBS ${catkin_LIBRARIES} eps_driver config_reader ff_nodelet
- INC ${catkin_INCLUDE_DIRS}
- DEPS ff_hw_msgs
+add_library(eps_driver_node
+ src/eps_driver_node/eps_driver_node.cc
)
+add_dependencies(eps_driver_node ${catkin_EXPORTED_TARGETS})
+target_link_libraries(eps_driver_node eps_driver ${catkin_LIBRARIES})
+
+## Declare a C++ executable: eps_driver_tool
+add_executable(eps_driver_tool tools/eps_driver_tool/eps_driver_tool.cc)
+add_dependencies(eps_driver_tool ${catkin_EXPORTED_TARGETS})
+target_link_libraries(eps_driver_tool
+ eps_driver gflags ${catkin_LIBRARIES})
-# Simulator
+## Declare a C++ executable: eps_simulator
+add_executable(eps_simulator tools/eps_simulator/eps_simulator.cc)
+add_dependencies(eps_simulator ${catkin_EXPORTED_TARGETS})
+target_link_libraries(eps_simulator
+ eps_driver gflags ${catkin_LIBRARIES})
-create_tool_targets(
- DIR tools/eps_simulator
- LIBS ${catkin_LIBRARIES} eps_driver ff_nodelet
- INC ${catkin_INCLUDE_DIRS}
- DEPS ff_hw_msgs
+#############
+## Install ##
+#############
+
+# Mark libraries for installation
+install(TARGETS ${PROJECT_NAME}
+ ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
+ LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
+ RUNTIME DESTINATION ${CATKIN_GLOBAL_BIN_DESTINATION}
+)
+install(TARGETS ${PROJECT_NAME}_node
+ ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
+ LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
+ RUNTIME DESTINATION ${CATKIN_GLOBAL_BIN_DESTINATION}
)
-install_launch_files()
+# Mark nodelet_plugin for installation
+install(FILES nodelet_plugins.xml
+ DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}
+)
+
+# Mark cpp header files for installation
+install(DIRECTORY include/${PROJECT_NAME}/
+ DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION}
+ FILES_MATCHING PATTERN "*.h"
+ PATTERN ".svn" EXCLUDE
+)
+
+# Install C++ executables
+install(TARGETS eps_driver_tool DESTINATION bin)
+install(TARGETS eps_simulator DESTINATION bin)
+install(CODE "execute_process(
+ COMMAND ln -s ../../bin/eps_driver_tool share/${PROJECT_NAME}
+ COMMAND ln -s ../../bin/eps_simulator share/${PROJECT_NAME}
+ WORKING_DIRECTORY ${CMAKE_INSTALL_PREFIX}
+ OUTPUT_QUIET
+ ERROR_QUIET
+ )")
+
+
+# Mark launch files for installation
+install(DIRECTORY launch/
+ DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}/launch
+ PATTERN ".svn" EXCLUDE)
+
install(FILES
tools/eps_aux.py
DESTINATION share/${PROJECT_NAME})
diff --git a/hardware/eps_driver/package.xml b/hardware/eps_driver/package.xml
index f1c49b11d1..1a809c5486 100644
--- a/hardware/eps_driver/package.xml
+++ b/hardware/eps_driver/package.xml
@@ -18,11 +18,13 @@
pluginlib
ff_util
ff_hw_msgs
+ i2c
roscpp
nodelet
pluginlib
ff_util
ff_hw_msgs
+ i2c
diff --git a/hardware/epson_imu/CMakeLists.txt b/hardware/epson_imu/CMakeLists.txt
index 65c492fb90..635c1137e4 100644
--- a/hardware/epson_imu/CMakeLists.txt
+++ b/hardware/epson_imu/CMakeLists.txt
@@ -15,19 +15,72 @@
# License for the specific language governing permissions and limitations
# under the License.
+cmake_minimum_required(VERSION 3.0)
project(epson_imu)
+## Compile as C++14, supported in ROS Kinetic and newer
+add_compile_options(-std=c++14)
+
+## Find catkin macros and libraries
+find_package(catkin2 REQUIRED COMPONENTS
+ roscpp
+ rospy
+ nodelet
+ sensor_msgs
+ ff_util
+)
+
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-unused-result")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unused-result")
catkin_package(
LIBRARIES epson_imu
- CATKIN_DEPENDS roscpp rospy sensor_msgs
+ CATKIN_DEPENDS roscpp rospy nodelet sensor_msgs ff_util
+)
+
+###########
+## Build ##
+###########
+
+# Specify additional locations of header files
+include_directories(
+ include
+ ${catkin_INCLUDE_DIRS}
+)
+
+# Declare C++ libraries
+add_library(epson_imu
+ src/epson_imu_nodelet.cc
+ src/G362P.cc
+ src/GPIO.cc
+)
+add_dependencies(epson_imu ${catkin_EXPORTED_TARGETS})
+target_link_libraries(epson_imu ${catkin_LIBRARIES})
+
+#############
+## Install ##
+#############
+
+# Mark libraries for installation
+install(TARGETS ${PROJECT_NAME}
+ ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
+ LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
+ RUNTIME DESTINATION ${CATKIN_GLOBAL_BIN_DESTINATION}
+)
+
+# Mark nodelet_plugin for installation
+install(FILES nodelet_plugins.xml
+ DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}
)
-create_library(TARGET epson_imu
- LIBS ${catkin_LIBRARIES} ff_nodelet config_reader
- INC ${catkin_INCLUDE_DIRS}
+# Mark cpp header files for installation
+install(DIRECTORY include/${PROJECT_NAME}/
+ DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION}
+ FILES_MATCHING PATTERN "*.h"
+ PATTERN ".svn" EXCLUDE
)
-install_launch_files()
+# Mark launch files for installation
+install(DIRECTORY launch/
+ DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}/launch
+ PATTERN ".svn" EXCLUDE)
diff --git a/hardware/epson_imu/package.xml b/hardware/epson_imu/package.xml
index 2c6eab0869..9e9928e77e 100644
--- a/hardware/epson_imu/package.xml
+++ b/hardware/epson_imu/package.xml
@@ -15,12 +15,14 @@
catkin
roscpp
rospy
- sensor_msgs
nodelet
+ sensor_msgs
+ ff_util
roscpp
rospy
- sensor_msgs
nodelet
+ sensor_msgs
+ ff_util
diff --git a/hardware/fam_cmd_i2c/CMakeLists.txt b/hardware/fam_cmd_i2c/CMakeLists.txt
index 60884dc8ad..0cbdf2941c 100644
--- a/hardware/fam_cmd_i2c/CMakeLists.txt
+++ b/hardware/fam_cmd_i2c/CMakeLists.txt
@@ -15,16 +15,64 @@
# License for the specific language governing permissions and limitations
# under the License.
+cmake_minimum_required(VERSION 3.0)
project(fam_cmd_i2c)
+## Compile as C++14, supported in ROS Kinetic and newer
+add_compile_options(-std=c++14)
+
+## Find catkin macros and libraries
+find_package(catkin2 REQUIRED COMPONENTS
+ roscpp
+ rospy
+ ff_msgs
+ std_msgs
+ i2c
+)
+
catkin_package(
- CATKIN_DEPENDS roscpp rospy ff_msgs std_msgs
+ CATKIN_DEPENDS roscpp rospy ff_msgs std_msgs i2c
)
-create_tool_targets(DIR tools
- LIBS ${catkin_LIBRARIES} i2c
- INC ${catkin_INCLUDE_DIRS}
- DEPS ff_msgs std_msgs
+###########
+## Build ##
+###########
+
+# Specify additional locations of header files
+include_directories(
+ include
+ ${catkin_INCLUDE_DIRS}
)
-install_launch_files()
+## Declare a C++ executable: inspection_tool
+add_executable(fam_cmd_gen tools/fam_cmd_gen.cc)
+add_dependencies(fam_cmd_gen ${catkin_EXPORTED_TARGETS})
+target_link_libraries(fam_cmd_gen
+ ${catkin_LIBRARIES})
+
+## Declare a C++ executable: inspection_tool
+add_executable(fam_cmd_i2c_node tools/fam_cmd_i2c_node.cc)
+add_dependencies(fam_cmd_i2c_node ${catkin_EXPORTED_TARGETS})
+target_link_libraries(fam_cmd_i2c_node
+ ${catkin_LIBRARIES})
+
+#############
+## Install ##
+#############
+
+# Install C++ executables
+install(TARGETS fam_cmd_gen DESTINATION bin)
+install(TARGETS fam_cmd_i2c_node DESTINATION bin)
+install(CODE "execute_process(
+ COMMAND ln -s ../../bin/fam_cmd_gen share/${PROJECT_NAME}
+ COMMAND ln -s ../../bin/fam_cmd_i2c_node share/${PROJECT_NAME}
+ WORKING_DIRECTORY ${CMAKE_INSTALL_PREFIX}
+ OUTPUT_QUIET
+ ERROR_QUIET
+ )")
+
+# Mark launch files for installation
+install(DIRECTORY launch/
+ DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}/launch
+ PATTERN ".svn" EXCLUDE)
+
diff --git a/hardware/fam_cmd_i2c/package.xml b/hardware/fam_cmd_i2c/package.xml
index c9c89e41e3..ac3ebc363a 100644
--- a/hardware/fam_cmd_i2c/package.xml
+++ b/hardware/fam_cmd_i2c/package.xml
@@ -18,9 +18,11 @@
rospy
ff_msgs
std_msgs
+ i2c
roscpp
rospy
ff_msgs
std_msgs
+ i2c
diff --git a/hardware/ff_serial/CMakeLists.txt b/hardware/ff_serial/CMakeLists.txt
index 58d30a1be4..87355d7a07 100644
--- a/hardware/ff_serial/CMakeLists.txt
+++ b/hardware/ff_serial/CMakeLists.txt
@@ -15,10 +15,58 @@
# License for the specific language governing permissions and limitations
# under the License.
+cmake_minimum_required(VERSION 3.0)
project(ff_serial)
-create_library(
- TARGET ff_serial
- DIR src
- LIBS ${Boost_THREAD_LIBRARY} ${Boost_SYSTEM_LIBRARY}
+## Compile as C++14, supported in ROS Kinetic and newer
+add_compile_options(-std=c++14)
+
+find_package(catkin REQUIRED COMPONENTS
+)
+
+catkin_package(
+ LIBRARIES ff_serial
+ INCLUDE_DIRS include
+)
+
+###########
+## Build ##
+###########
+
+# Specify additional locations of header files
+include_directories(
+ include
+ ${catkin_INCLUDE_DIRS}
+)
+
+# Declare C++ libraries
+add_library(ff_serial
+ src/serial.cc
+)
+add_dependencies(ff_serial ${catkin_EXPORTED_TARGETS})
+target_link_libraries(ff_serial ${catkin_LIBRARIES})
+
+#############
+## Install ##
+#############
+
+# Mark libraries for installation
+install(TARGETS ${PROJECT_NAME}
+ ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
+ LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
+ RUNTIME DESTINATION ${CATKIN_GLOBAL_BIN_DESTINATION}
+)
+
+# Mark cpp header files for installation
+install(DIRECTORY include/${PROJECT_NAME}/
+ DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION}
+ FILES_MATCHING PATTERN "*.h"
+ PATTERN ".svn" EXCLUDE
+)
+
+# Mark cpp header files for installation
+install(DIRECTORY include/${PROJECT_NAME}/
+ DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION}
+ FILES_MATCHING PATTERN "*.h"
+ PATTERN ".svn" EXCLUDE
)
diff --git a/hardware/flashlight/CMakeLists.txt b/hardware/flashlight/CMakeLists.txt
index 2b70e3bedf..868a45dcd2 100644
--- a/hardware/flashlight/CMakeLists.txt
+++ b/hardware/flashlight/CMakeLists.txt
@@ -15,34 +15,104 @@
# License for the specific language governing permissions and limitations
# under the License.
+cmake_minimum_required(VERSION 3.0)
project(flashlight)
-# Core library
-create_library(TARGET flashlight
- INC ${GLOG_INCLUDE_DIRS}
- LIBS ${GLOG_LIBRARIES} i2c
+## Compile as C++14, supported in ROS Kinetic and newer
+add_compile_options(-std=c++14)
+
+## Find catkin macros and libraries
+find_package(catkin2 REQUIRED COMPONENTS
+ roscpp
+ roslib
+ nodelet
+ ff_hw_msgs
+ i2c
+ ff_util
+ config_reader
+)
+
+catkin_package(
+ LIBRARIES
+ flashlight
+ CATKIN_DEPENDS
+ roscpp
+ roslib
+ nodelet
+ ff_hw_msgs
+ i2c
+ ff_util
+ config_reader
)
-# Standalone test programs
-create_tool_targets(DIR tools
- INC ${GFLAGS_INCLUDE_DIRS}
- LIBS ${GFLAGS_LIBRARIES} flashlight ff_common
+###########
+## Build ##
+###########
+
+# Specify additional locations of header files
+include_directories(
+ include
+ ${catkin_INCLUDE_DIRS}
)
-# Create ROS nodes if we are using ROS
-if(USE_ROS)
- catkin_package(
- LIBRARIES flashlight
- CATKIN_DEPENDS roscpp roslib nodelet
- DEPENDS ff_hw_msgs
+ # Declare C++ librarie - Core library
+ add_library(flashlight
+ src/flashlight.cc
)
+ add_dependencies(flashlight ${catkin_EXPORTED_TARGETS})
+ target_link_libraries(flashlight glog ${catkin_LIBRARIES})
- create_library(TARGET flashlight_nodelet
- DIR src/ros
- LIBS ${roscpp_LIBRARIES} ${nodelet_LIBRARIES} flashlight config_reader
- ff_nodelet
- INC ${catkin_INCLUDE_DIRS}
- DEPS ff_hw_msgs
+ # Declare C++ librarie
+ add_library(flashlight_nodelet
+ src/ros/flashlight_nodelet.cc
)
- install_launch_files()
-endif(USE_ROS)
+ add_dependencies(flashlight_nodelet ${catkin_EXPORTED_TARGETS})
+ target_link_libraries(flashlight_nodelet flashlight ${catkin_LIBRARIES})
+
+## Declare a C++ executable: flashlight_test
+add_executable(flashlight_test tools/flashlight_test.cc)
+add_dependencies(flashlight_test ${catkin_EXPORTED_TARGETS})
+target_link_libraries(flashlight_test
+ flashlight gflags ${catkin_LIBRARIES})
+
+#############
+## Install ##
+#############
+
+# Mark libraries for installation
+install(TARGETS ${PROJECT_NAME}
+ ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
+ LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
+ RUNTIME DESTINATION ${CATKIN_GLOBAL_BIN_DESTINATION}
+)
+install(TARGETS ${PROJECT_NAME}_nodelet
+ ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
+ LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
+ RUNTIME DESTINATION ${CATKIN_GLOBAL_BIN_DESTINATION}
+)
+
+# Mark nodelet_plugin for installation
+install(FILES nodelet_plugins.xml
+ DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}
+)
+
+# Mark cpp header files for installation
+install(DIRECTORY include/${PROJECT_NAME}/
+ DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION}
+ FILES_MATCHING PATTERN "*.h"
+ PATTERN ".svn" EXCLUDE
+)
+
+# Install C++ executables
+install(TARGETS flashlight_test DESTINATION bin)
+install(CODE "execute_process(
+ COMMAND ln -s ../../bin/flashlight_test share/${PROJECT_NAME}
+ WORKING_DIRECTORY ${CMAKE_INSTALL_PREFIX}
+ OUTPUT_QUIET
+ ERROR_QUIET
+ )")
+
+# Mark launch files for installation
+install(DIRECTORY launch/
+ DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}/launch
+ PATTERN ".svn" EXCLUDE)
diff --git a/hardware/flashlight/package.xml b/hardware/flashlight/package.xml
index 035c062fcc..d2756af322 100644
--- a/hardware/flashlight/package.xml
+++ b/hardware/flashlight/package.xml
@@ -18,11 +18,16 @@
roslib
nodelet
ff_hw_msgs
+ i2c
+ ff_util
+ config_reader
roscpp
+ roslib
nodelet
ff_hw_msgs
- roslib
- message_runtime
+ i2c
+ ff_util
+ config_reader
diff --git a/hardware/flycapture/CMakeLists.txt b/hardware/flycapture/CMakeLists.txt
index 71b7762520..c558af0e75 100644
--- a/hardware/flycapture/CMakeLists.txt
+++ b/hardware/flycapture/CMakeLists.txt
@@ -15,15 +15,22 @@
# License for the specific language governing permissions and limitations
# under the License.
+cmake_minimum_required(VERSION 3.0)
project(flycapture)
+## Compile as C++14, supported in ROS Kinetic and newer
+add_compile_options(-std=c++14)
+
# Need to think of a better way to get flycapture
find_path(FLYCAPTURE_INCLUDE_DIR flycapture/FlyCapture2Defs.h
HINTS ${FLYCAPTURE_ROOT_DIR}/include /usr)
find_library(FLYCAPTURE_LIBRARY NAMES flycapture libflycapture
HINTS /usr/lib ${FLYCAPTURE_ROOT_DIR}/lib)
-find_package_handle_standard_args(FLYCAPTURE DEFAULT_MSG
- FLYCAPTURE_INCLUDE_DIR FLYCAPTURE_LIBRARY)
+# find_package_handle_standard_args(FLYCAPTURE DEFAULT_MSG
+# FLYCAPTURE_INCLUDE_DIR FLYCAPTURE_LIBRARY)
+
+find_package(catkin REQUIRED COMPONENTS
+)
catkin_package(
LIBRARIES flycapture
@@ -32,10 +39,11 @@ catkin_package(
if (FLYCAPTURE_FOUND)
- create_tool_targets(DIR tools
- LIBS ${FLYCAPTURE_LIBRARY} ${catkin_LIBRARIES} ff_nodelet
- INC ${FLYCAPTURE_INCLUDE_DIR} ${catkin_INCLUDE_DIRS}
- )
+ ## Declare a C++ executable: fly_node
+ add_executable(fly_node tools/fly_node.cc)
+ add_dependencies(fly_node ${catkin_EXPORTED_TARGETS})
+ target_link_libraries(fly_node
+ gflags ${catkin_LIBRARIES})
else()
message(STATUS "Not building fly_node")
endif()
diff --git a/hardware/gpio/CMakeLists.txt b/hardware/gpio/CMakeLists.txt
index 7fb5761e9c..78cc53f436 100644
--- a/hardware/gpio/CMakeLists.txt
+++ b/hardware/gpio/CMakeLists.txt
@@ -15,4 +15,44 @@
# License for the specific language governing permissions and limitations
# under the License.
-create_library(TARGET gpio)
+cmake_minimum_required(VERSION 3.0)
+project(gpio)
+
+## Compile as C++14, supported in ROS Kinetic and newer
+add_compile_options(-std=c++14)
+
+find_package(catkin REQUIRED COMPONENTS
+)
+
+catkin_package(
+ LIBRARIES
+ gpio
+)
+
+###########
+## Build ##
+###########
+
+# Specify additional locations of header files
+include_directories(
+ include
+ ${catkin_INCLUDE_DIRS}
+)
+
+# Declare C++ libraries
+add_library(gpio
+ src/gpio.cc
+)
+add_dependencies(gpio ${catkin_EXPORTED_TARGETS})
+target_link_libraries(gpio ${catkin_LIBRARIES})
+
+#############
+## Install ##
+#############
+
+# Mark libraries for installation
+install(TARGETS ${PROJECT_NAME}
+ ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
+ LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
+ RUNTIME DESTINATION ${CATKIN_GLOBAL_BIN_DESTINATION}
+)
\ No newline at end of file
diff --git a/hardware/i2c/CMakeLists.txt b/hardware/i2c/CMakeLists.txt
index 3f73f4b024..1ba70cf931 100644
--- a/hardware/i2c/CMakeLists.txt
+++ b/hardware/i2c/CMakeLists.txt
@@ -15,8 +15,52 @@
# License for the specific language governing permissions and limitations
# under the License.
+cmake_minimum_required(VERSION 3.0)
project(i2c)
-create_library(TARGET i2c
- LIBS ${GLOG_LIBRARIES}
- INC ${GLOG_INCLUDE_DIRS})
+## Compile as C++14, supported in ROS Kinetic and newer
+add_compile_options(-std=c++14)
+
+find_package(catkin REQUIRED COMPONENTS
+)
+
+catkin_package(
+ LIBRARIES i2c
+ INCLUDE_DIRS include
+)
+
+###########
+## Build ##
+###########
+
+# Specify additional locations of header files
+include_directories(
+ include
+ ${catkin_INCLUDE_DIRS}
+)
+
+# Declare C++ libraries
+add_library(i2c
+ src/i2c.cc
+ src/i2c_new.cc
+)
+add_dependencies(i2c ${catkin_EXPORTED_TARGETS})
+target_link_libraries(i2c glog ${catkin_LIBRARIES})
+
+#############
+## Install ##
+#############
+
+# Mark libraries for installation
+install(TARGETS ${PROJECT_NAME}
+ ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
+ LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
+ RUNTIME DESTINATION ${CATKIN_GLOBAL_BIN_DESTINATION}
+)
+
+# Mark cpp header files for installation
+install(DIRECTORY include/${PROJECT_NAME}/
+ DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION}
+ FILES_MATCHING PATTERN "*.h"
+ PATTERN ".svn" EXCLUDE
+)
diff --git a/hardware/i2c/package.xml b/hardware/i2c/package.xml
index 0dcc2828d7..00136cafd4 100644
--- a/hardware/i2c/package.xml
+++ b/hardware/i2c/package.xml
@@ -15,7 +15,5 @@
Astrobee Flight Software
catkin
- roscpp
- roscpp
diff --git a/hardware/is_camera/CMakeLists.txt b/hardware/is_camera/CMakeLists.txt
index 32b6d3c1c9..b3e399b4fe 100644
--- a/hardware/is_camera/CMakeLists.txt
+++ b/hardware/is_camera/CMakeLists.txt
@@ -15,8 +15,21 @@
# License for the specific language governing permissions and limitations
# under the License.
+cmake_minimum_required(VERSION 3.0)
project(is_camera)
+## Compile as C++14, supported in ROS Kinetic and newer
+add_compile_options(-std=c++14)
+
+## Find catkin macros and libraries
+find_package(catkin2 REQUIRED COMPONENTS
+ roscpp
+ image_transport
+ nodelet
+ ff_util
+ config_reader
+)
+
# Need to find libv4l2
find_path(V4L2_INCLUDE_DIR libv4l2.h linux/videodev2.h
HINTS /usr ${V4L2_ROOT_DIR})
@@ -25,22 +38,56 @@ find_library(V4L2_LIBRARY NAMES libv4l2 v4l2
find_package_handle_standard_args(V4L2 DEFAULT_MSG
V4L2_INCLUDE_DIR V4L2_LIBRARY)
+
+# Find OpenCV
+SET(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/../../cmake")
+find_package(OpenCV331 REQUIRED)
+
catkin_package(
LIBRARIES is_camera
- CATKIN_DEPENDS roscpp image_transport nodelet
+ CATKIN_DEPENDS
+ roscpp
+ image_transport
+ nodelet
+ ff_util
+ config_reader
)
-create_library(TARGET is_camera
- LIBS ${catkin_LIBRARIES} ${V4L2_LIBRARY} config_reader ff_nodelet
- INC ${catkin_INCLUDE_DIRS} ${V4L2_INCLUDE_DIR}
- DEPS ff_msgs)
+###########
+## Build ##
+###########
-create_tool_targets(DIR tools
- LIBS is_camera
- )
+# Specify additional locations of header files
+include_directories(
+ include
+ ${catkin_INCLUDE_DIRS}
+ ${OpenCV_INCLUDE_DIRS}
+)
+
+# Declare C++ libraries
+add_library(is_camera
+ src/camera.cc
+)
+add_dependencies(is_camera ${catkin_EXPORTED_TARGETS})
+target_link_libraries(is_camera ${V4L2_LIBRARY} ${catkin_LIBRARIES})
+
+#############
+## Install ##
+#############
+
+# Mark libraries for installation
+install(TARGETS ${PROJECT_NAME}
+ ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
+ LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
+ RUNTIME DESTINATION ${CATKIN_GLOBAL_BIN_DESTINATION}
+)
-# I'm not sure who installed package.xml for us, but we should do the same for
-# nodelet_plugins.xml
-install(FILES nodelet_plugins.xml DESTINATION share/is_camera)
+# Mark nodelet_plugin for installation
+install(FILES nodelet_plugins.xml
+ DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}
+)
-install_launch_files()
+# Mark launch files for installation
+install(DIRECTORY launch/
+ DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}/launch
+ PATTERN ".svn" EXCLUDE)
diff --git a/hardware/is_camera/package.xml b/hardware/is_camera/package.xml
index ee9bbd1cf2..1b8858acbe 100644
--- a/hardware/is_camera/package.xml
+++ b/hardware/is_camera/package.xml
@@ -15,12 +15,16 @@
Astrobee Flight Software
catkin
+ image_transport
roscpp
nodelet
- image_transport
+ ff_util
+ config_reader
roscpp
- nodelet
image_transport
+ nodelet
+ ff_util
+ config_reader
diff --git a/hardware/laser/CMakeLists.txt b/hardware/laser/CMakeLists.txt
index b064c43921..e8534aee9c 100644
--- a/hardware/laser/CMakeLists.txt
+++ b/hardware/laser/CMakeLists.txt
@@ -15,33 +15,102 @@
# License for the specific language governing permissions and limitations
# under the License.
+cmake_minimum_required(VERSION 3.0)
project(laser)
-# Core library
-create_library(TARGET laser
- INC ${GLOG_INCLUDE_DIRS}
- LIBS ${GLOG_LIBRARIES} i2c
- DEPS i2c)
-
-# Standalone test programs
-create_tool_targets(DIR tools
- INC ${GFLAGS_INCLUDE_DIRS}
- LIBS ${GFLAGS_LIBRARIES} laser ff_common
- DEPS laser)
-
-# Create ROS nodes if we are using ROS
-if(USE_ROS)
- catkin_package(
- LIBRARIES laser
- CATKIN_DEPENDS roscpp roslib nodelet
- DEPENDS ff_hw_msgs
- )
-
- create_library(TARGET laser_nodelet
- DIR src/ros
- LIBS ${catkin_LIBRARIES} laser config_reader ff_nodelet
- INC ${catkin_INCLUDE_DIRS}
- DEPS ff_hw_msgs
- )
- install_launch_files()
-endif(USE_ROS)
+## Compile as C++14, supported in ROS Kinetic and newer
+add_compile_options(-std=c++14)
+
+## Find catkin macros and libraries
+find_package(catkin2 REQUIRED COMPONENTS
+ roscpp
+ roslib
+ nodelet
+ cv_bridge
+ ff_util
+ ff_common
+ ff_hw_msgs
+ i2c
+ config_reader
+)
+
+catkin_package(
+ INCLUDE_DIRS include
+ LIBRARIES laser
+ CATKIN_DEPENDS
+ roscpp
+ roslib
+ nodelet
+ cv_bridge
+ ff_util
+ ff_common
+ ff_hw_msgs
+ i2c
+ config_reader
+)
+
+###########
+## Build ##
+###########
+
+# Specify additional locations of header files
+include_directories(
+ include
+ ${catkin_INCLUDE_DIRS}
+ ${EIGEN3_INCLUDE_DIR}
+)
+
+# Declare C++ libraries
+add_library(laser
+ src/laser.cc
+)
+add_dependencies(laser ${catkin_EXPORTED_TARGETS})
+target_link_libraries(laser ${catkin_LIBRARIES} ${EIGEN_LIBRARIES})
+
+# Declare C++ libraries
+add_library(laser_nodelet
+ src/ros/laser_nodelet.cc
+)
+add_dependencies(laser_nodelet ${catkin_EXPORTED_TARGETS})
+target_link_libraries(laser_nodelet laser ${catkin_LIBRARIES} ${EIGEN_LIBRARIES})
+
+## Declare a C++ executable: bag_to_csv
+add_executable(laser_test tools/laser_test.cc)
+add_dependencies(laser_test ${catkin_EXPORTED_TARGETS})
+target_link_libraries(laser_test
+ laser gflags glog ${catkin_LIBRARIES})
+
+#############
+## Install ##
+#############
+
+# Mark libraries for installation
+install(TARGETS ${PROJECT_NAME}
+ ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
+ LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
+ RUNTIME DESTINATION ${CATKIN_GLOBAL_BIN_DESTINATION}
+)
+install(TARGETS ${PROJECT_NAME}_nodelet
+ ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
+ LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
+ RUNTIME DESTINATION ${CATKIN_GLOBAL_BIN_DESTINATION}
+)
+
+# Mark nodelet_plugin for installation
+install(FILES nodelet_plugins.xml
+ DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}
+)
+
+# Install C++ executables
+install(TARGETS laser_test DESTINATION bin)
+install(CODE "execute_process(
+ COMMAND ln -s ../../bin/laser_test share/${PROJECT_NAME}
+ WORKING_DIRECTORY ${CMAKE_INSTALL_PREFIX}
+ OUTPUT_QUIET
+ ERROR_QUIET
+ )")
+
+# Mark launch files for installation
+install(DIRECTORY launch/
+ DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}/launch
+ PATTERN ".svn" EXCLUDE)
diff --git a/hardware/laser/package.xml b/hardware/laser/package.xml
index 653cf7196c..63332e9b2b 100644
--- a/hardware/laser/package.xml
+++ b/hardware/laser/package.xml
@@ -15,12 +15,21 @@
roscpp
roslib
nodelet
+ cv_bridge
+ ff_util
+ ff_common
ff_hw_msgs
+ i2c
+ config_reader
roscpp
+ roslib
nodelet
+ cv_bridge
+ ff_util
+ ff_common
ff_hw_msgs
- roslib
- message_runtime
+ i2c
+ config_reader
diff --git a/hardware/perching_arm/CMakeLists.txt b/hardware/perching_arm/CMakeLists.txt
index 2784bdf506..6f1e67d3e5 100644
--- a/hardware/perching_arm/CMakeLists.txt
+++ b/hardware/perching_arm/CMakeLists.txt
@@ -15,8 +15,22 @@
# License for the specific language governing permissions and limitations
# under the License.
+cmake_minimum_required(VERSION 3.0)
project(perching_arm)
+## Compile as C++14, supported in ROS Kinetic and newer
+add_compile_options(-std=c++14)
+
+## Find catkin macros and libraries
+find_package(catkin2 REQUIRED COMPONENTS
+ roscpp
+ nodelet
+ pluginlib
+ ff_util
+ ff_serial
+ ff_hw_msgs
+)
+
catkin_package(
LIBRARIES
perching_arm
@@ -25,21 +39,61 @@ catkin_package(
nodelet
pluginlib
ff_util
+ ff_serial
ff_hw_msgs
- sensor_msgs
)
-create_library(
- TARGET perching_arm
- LIBS ${catkin_LIBRARIES} ff_serial config_reader ff_nodelet
- INC ${catkin_INCLUDE_DIRS}
- DEPS perching_arm_gencpp
+###########
+## Build ##
+###########
+
+# Specify additional locations of header files
+include_directories(
+ include
+ ${catkin_INCLUDE_DIRS}
+ ${EIGEN3_INCLUDE_DIR}
)
-create_tool_targets(DIR tools
- LIBS ${catkin_LIBRARIES} perching_arm ff_common
- INC ${catkin_INCLUDE_DIRS}
- DEPS ff_common
+# Declare C++ libraries
+add_library(perching_arm
+ src/perching_arm.cc
+ src/perching_arm_node.cc
)
+add_dependencies(perching_arm ${catkin_EXPORTED_TARGETS})
+target_link_libraries(perching_arm ${catkin_LIBRARIES} ${EIGEN_LIBRARIES})
+
+## Declare a C++ executable: bag_to_csv
+add_executable(perching_arm_tool tools/perching_arm_tool.cc)
+add_dependencies(perching_arm_tool ${catkin_EXPORTED_TARGETS})
+target_link_libraries(perching_arm_tool
+ perching_arm gflags glog ${catkin_LIBRARIES})
+
+#############
+## Install ##
+#############
+
+# Mark libraries for installation
+install(TARGETS ${PROJECT_NAME}
+ ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
+ LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
+ RUNTIME DESTINATION ${CATKIN_GLOBAL_BIN_DESTINATION}
+)
+
+# Mark nodelet_plugin for installation
+install(FILES nodelet_plugins.xml
+ DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}
+)
+
+# Install C++ executables
+install(TARGETS perching_arm_tool DESTINATION bin)
+install(CODE "execute_process(
+ COMMAND ln -s ../../bin/perching_arm_tool share/${PROJECT_NAME}
+ WORKING_DIRECTORY ${CMAKE_INSTALL_PREFIX}
+ OUTPUT_QUIET
+ ERROR_QUIET
+ )")
-install_launch_files()
+# Mark launch files for installation
+install(DIRECTORY launch/
+ DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}/launch
+ PATTERN ".svn" EXCLUDE)
diff --git a/hardware/perching_arm/package.xml b/hardware/perching_arm/package.xml
index 60601af3e8..921d8ba8e2 100644
--- a/hardware/perching_arm/package.xml
+++ b/hardware/perching_arm/package.xml
@@ -17,14 +17,14 @@
roscpp
nodelet
pluginlib
- sensor_msgs
ff_util
+ ff_serial
ff_hw_msgs
roscpp
nodelet
pluginlib
- sensor_msgs
ff_util
+ ff_serial
ff_hw_msgs
diff --git a/hardware/pico_driver/CMakeLists.txt b/hardware/pico_driver/CMakeLists.txt
index ba5f87099d..18bdfc62cd 100644
--- a/hardware/pico_driver/CMakeLists.txt
+++ b/hardware/pico_driver/CMakeLists.txt
@@ -15,22 +15,64 @@
# License for the specific language governing permissions and limitations
# under the License.
+cmake_minimum_required(VERSION 3.0)
project(pico_driver)
+## Compile as C++14, supported in ROS Kinetic and newer
+add_compile_options(-std=c++14)
+
+if (ENABLE_PICOFLEXX)
+## Find catkin macros and libraries
+find_package(catkin2 REQUIRED COMPONENTS
+ roscpp
+ nodelet
+ ff_msgs
+ ff_util
+ cv_bridge
+)
+
+# System dependencies are found with CMake's conventions
+find_package(royale REQUIRED)
+
catkin_package(
LIBRARIES ${PROJECT_NAME}
- CATKIN_DEPENDS roscpp nodelet ff_msgs
- DEPENDS ${PROJECT_NAME}
+ CATKIN_DEPENDS roscpp nodelet ff_msgs ff_util cv_bridge
)
-link_directories(${royale_LIB_DIR})
+###########
+## Build ##
+###########
-create_library(TARGET ${PROJECT_NAME}
- LIBS ${catkin_LIBRARIES} ${royale_LIBRARIES} config_reader ff_nodelet
- INC ${catkin_INCLUDE_DIRS} ${royale_INCLUDE_DIRS}
+# Specify additional locations of header files
+include_directories(
+ include
+ ${catkin_INCLUDE_DIRS}
+ ${EIGEN3_INCLUDE_DIR}
+ ${royale_INCLUDE_DIRS}
+ ${OpenCV_INCLUDE_DIRS}
)
+# Declare C++ libraries
+add_library(pico_driver
+ src/pico_driver.cc
+)
+add_dependencies(pico_driver ${catkin_EXPORTED_TARGETS})
+target_link_libraries(pico_driver ${royale_LIBRARIES} ${EIGEN_LIBRARIES} ${catkin_LIBRARIES})
+
+## Declare a C++ executable: bag_to_csv
+add_executable(pico_proxy tools/pico_proxy.cc)
+add_dependencies(pico_proxy ${catkin_EXPORTED_TARGETS})
+target_link_libraries(pico_proxy
+ pico_driver gflags glog ${catkin_LIBRARIES})
+
+## Declare a C++ executable: bag_to_csv
+add_executable(pico_tool tools/pico_tool.cc)
+add_dependencies(pico_tool ${catkin_EXPORTED_TARGETS})
+target_link_libraries(pico_tool
+ pico_driver gflags glog ${royale_LIBRARIES} ${catkin_LIBRARIES})
+
if(CATKIN_ENABLE_TESTING)
+ find_package(rostest REQUIRED)
# Pico flexx initialization fault tester
add_rostest_gtest(test_init_pico_flexx
test/test_init_pico_flexx.test
@@ -38,14 +80,43 @@ if(CATKIN_ENABLE_TESTING)
)
target_link_libraries(test_init_pico_flexx
- ${catkin_LIBRARIES} config_reader ff_nodelet
+ glog ${catkin_LIBRARIES}
)
endif()
-create_tool_targets(DIR tools
- LIBS ${catkin_LIBRARIES} ${royale_LIBRARIES} uvc
- INC ${catkin_INCLUDE_DIRS} ${royale_INCLUDE_DIRS}
- DEPS ff_msgs opencv
+#############
+## Install ##
+#############
+
+# Mark libraries for installation
+install(TARGETS ${PROJECT_NAME}
+ ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
+ LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
+ RUNTIME DESTINATION ${CATKIN_GLOBAL_BIN_DESTINATION}
+)
+
+# Mark nodelet_plugin for installation
+install(FILES nodelet_plugins.xml
+ DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}
)
-install_launch_files()
+# Install C++ executables
+install(TARGETS pico_proxy DESTINATION bin)
+install(TARGETS pico_tool DESTINATION bin)
+install(CODE "execute_process(
+ COMMAND ln -s ../../bin/pico_proxy share/${PROJECT_NAME}
+ COMMAND ln -s ../../bin/pico_tool share/${PROJECT_NAME}
+ WORKING_DIRECTORY ${CMAKE_INSTALL_PREFIX}
+ OUTPUT_QUIET
+ ERROR_QUIET
+ )")
+
+# Mark launch files for installation
+install(DIRECTORY launch/
+ DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}/launch
+ PATTERN ".svn" EXCLUDE)
+
+else (ENABLE_PICOFLEXX)
+ find_package(catkin REQUIRED COMPONENTS)
+ catkin_package()
+endif (ENABLE_PICOFLEXX)
diff --git a/hardware/pico_driver/package.xml b/hardware/pico_driver/package.xml
index 00b2e7634a..d789d1c0cb 100644
--- a/hardware/pico_driver/package.xml
+++ b/hardware/pico_driver/package.xml
@@ -17,11 +17,15 @@
catkin
roscpp
nodelet
- ff_msgs
+ ff_msgs
+ ff_util
+ cv_bridge
roscpp
nodelet
tf2_ros
ff_msgs
+ ff_util
+ cv_bridge
diff --git a/hardware/pmc_actuator/CMakeLists.txt b/hardware/pmc_actuator/CMakeLists.txt
index 823883697b..438e4e1ed4 100644
--- a/hardware/pmc_actuator/CMakeLists.txt
+++ b/hardware/pmc_actuator/CMakeLists.txt
@@ -15,8 +15,24 @@
# License for the specific language governing permissions and limitations
# under the License.
+cmake_minimum_required(VERSION 3.0)
project(pmc_actuator)
+## Compile as C++14, supported in ROS Kinetic and newer
+add_compile_options(-std=c++14)
+
+## Find catkin macros and libraries
+find_package(catkin2 REQUIRED COMPONENTS
+ roscpp
+ nodelet
+ pluginlib
+ ff_util
+ std_msgs
+ ff_msgs
+ ff_hw_msgs
+ i2c
+)
+
catkin_package(
LIBRARIES
pmc_actuator
@@ -28,36 +44,103 @@ catkin_package(
std_msgs
ff_msgs
ff_hw_msgs
+ i2c
)
-# ROS agnostic driver and tool
+###########
+## Build ##
+###########
-create_library(
- DIR src/pmc_actuator
- TARGET pmc_actuator
- LIBS i2c
+# Specify additional locations of header files
+include_directories(
+ include
+ ${catkin_INCLUDE_DIRS}
+ ${EIGEN3_INCLUDE_DIR}
)
-create_tool_targets(DIR tools/pmc_actuator_tool
- LIBS pmc_actuator
+# ROS agnostic driver and tool
+
+# Declare C++ libraries
+add_library(pmc_actuator
+ src/pmc_actuator/pmc_actuator.cc
)
+add_dependencies(pmc_actuator ${catkin_EXPORTED_TARGETS})
+target_link_libraries(pmc_actuator ${catkin_LIBRARIES} ${EIGEN_LIBRARIES})
+
+## Declare a C++ executable: bag_to_csv
+add_executable(pmc_actuator_tool tools/pmc_actuator_tool/pmc_actuator_tool.cc)
+add_dependencies(pmc_actuator_tool ${catkin_EXPORTED_TARGETS})
+target_link_libraries(pmc_actuator_tool
+ pmc_actuator gflags glog ${catkin_LIBRARIES})
# ROS nodelet and tools
-create_library(
- DIR src/pmc_actuator_nodelet
- TARGET pmc_actuator_nodelet
- LIBS ${catkin_LIBRARIES} pmc_actuator config_reader ff_nodelet
- INC ${catkin_INCLUDE_DIRS}
- DEPS ff_hw_msgs
+# Declare C++ libraries
+add_library(pmc_actuator_nodelet
+ src/pmc_actuator_nodelet/pmc_actuator_nodelet.cc
+)
+add_dependencies(pmc_actuator_nodelet ${catkin_EXPORTED_TARGETS})
+target_link_libraries(pmc_actuator_nodelet pmc_actuator ${catkin_LIBRARIES} ${EIGEN_LIBRARIES})
+
+## Declare a C++ executable: pmc_actuator_cmd_test
+add_executable(pmc_actuator_cmd_test tools/pmc_actuator_cmd_test.cc)
+add_dependencies(pmc_actuator_cmd_test ${catkin_EXPORTED_TARGETS})
+target_link_libraries(pmc_actuator_cmd_test
+ pmc_actuator gflags glog ${catkin_LIBRARIES})
+
+## Declare a C++ executable: pmc_actuator_feeder
+add_executable(pmc_actuator_feeder tools/pmc_actuator_feeder.cc)
+add_dependencies(pmc_actuator_feeder ${catkin_EXPORTED_TARGETS})
+target_link_libraries(pmc_actuator_feeder
+ pmc_actuator gflags glog ${catkin_LIBRARIES})
+
+## Declare a C++ executable: pmc_autotrim_node
+add_executable(pmc_autotrim_node tools/pmc_autotrim_node.cc)
+add_dependencies(pmc_autotrim_node ${catkin_EXPORTED_TARGETS})
+target_link_libraries(pmc_autotrim_node
+ pmc_actuator gflags glog ${catkin_LIBRARIES})
+
+#############
+## Install ##
+#############
+
+# Mark libraries for installation
+install(TARGETS ${PROJECT_NAME}
+ ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
+ LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
+ RUNTIME DESTINATION ${CATKIN_GLOBAL_BIN_DESTINATION}
+)
+install(TARGETS ${PROJECT_NAME}_nodelet
+ ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
+ LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
+ RUNTIME DESTINATION ${CATKIN_GLOBAL_BIN_DESTINATION}
)
-create_tool_targets(DIR tools
- LIBS ${catkin_LIBRARIES} pmc_actuator ff_nodelet
- INC ${catkin_INCLUDE_DIRS}
+# Mark nodelet_plugin for installation
+install(FILES nodelet_plugins.xml
+ DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}
)
-install_launch_files()
+# Install C++ executables
+install(TARGETS pmc_actuator_tool DESTINATION bin)
+install(TARGETS pmc_actuator_cmd_test DESTINATION bin)
+install(TARGETS pmc_actuator_feeder DESTINATION bin)
+install(TARGETS pmc_autotrim_node DESTINATION bin)
+install(CODE "execute_process(
+ COMMAND ln -s ../../bin/pmc_actuator_tool share/${PROJECT_NAME}
+ COMMAND ln -s ../../bin/pmc_actuator_cmd_test share/${PROJECT_NAME}
+ COMMAND ln -s ../../bin/pmc_actuator_feeder share/${PROJECT_NAME}
+ COMMAND ln -s ../../bin/pmc_autotrim_node share/${PROJECT_NAME}
+ WORKING_DIRECTORY ${CMAKE_INSTALL_PREFIX}
+ OUTPUT_QUIET
+ ERROR_QUIET
+ )")
+
+# Mark launch files for installation
+install(DIRECTORY launch/
+ DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}/launch
+ PATTERN ".svn" EXCLUDE)
+
install(FILES
tools/pmc_currents.py
tools/pmc_status.py
diff --git a/hardware/pmc_actuator/tools/pmc_actuator_tool/pmc_actuator_tool.cc b/hardware/pmc_actuator/tools/pmc_actuator_tool/pmc_actuator_tool.cc
index 96576ddf0d..eb86a9dc9c 100644
--- a/hardware/pmc_actuator/tools/pmc_actuator_tool/pmc_actuator_tool.cc
+++ b/hardware/pmc_actuator/tools/pmc_actuator_tool/pmc_actuator_tool.cc
@@ -24,7 +24,7 @@
#include
#include
-// C++11 STL includes
+// C++ STL includes
#include
#include
#include
diff --git a/hardware/signal_lights/CMakeLists.txt b/hardware/signal_lights/CMakeLists.txt
index 7a6ba0ae3a..ce53bd52e6 100644
--- a/hardware/signal_lights/CMakeLists.txt
+++ b/hardware/signal_lights/CMakeLists.txt
@@ -15,8 +15,23 @@
# License for the specific language governing permissions and limitations
# under the License.
+cmake_minimum_required(VERSION 3.0)
project(signal_lights)
+## Compile as C++14, supported in ROS Kinetic and newer
+add_compile_options(-std=c++14)
+
+## Find catkin macros and libraries
+find_package(catkin2 REQUIRED COMPONENTS
+ roscpp
+ nodelet
+ pluginlib
+ ff_util
+ std_msgs
+ ff_msgs
+ ff_hw_msgs
+)
+
catkin_package(
LIBRARIES
signal_lights
@@ -30,32 +45,80 @@ catkin_package(
ff_hw_msgs
)
-# ROS agnostic driver and tool
-create_library(
- DIR src/custom_i2c
- TARGET custom_i2c
+###########
+## Build ##
+###########
+
+# Specify additional locations of header files
+include_directories(
+ include
+ ${catkin_INCLUDE_DIRS}
+)
+
+# Declare C++ libraries
+add_library(custom_i2c
+ src/custom_i2c/i2c.cc
)
+add_dependencies(custom_i2c ${catkin_EXPORTED_TARGETS})
+target_link_libraries(custom_i2c ${catkin_LIBRARIES})
-create_library(
- DIR src/signal_lights
- TARGET signal_lights
- LIBS custom_i2c
+# Declare C++ libraries
+add_library(signal_lights
+ src/signal_lights/signal_lights.cc
)
+add_dependencies(signal_lights ${catkin_EXPORTED_TARGETS})
+target_link_libraries(signal_lights custom_i2c ${catkin_LIBRARIES})
-create_tool_targets(
- DIR tools
- LIBS signal_lights ff_common custom_i2c
+# Declare C++ libraries
+add_library(signal_lights_nodelet
+ src/signal_lights_node/signal_lights_nodelet.cc
)
+add_dependencies(signal_lights_nodelet ${catkin_EXPORTED_TARGETS})
+target_link_libraries(signal_lights_nodelet signal_lights ${catkin_LIBRARIES})
-# ROS nodelet and tools
+## Declare a C++ executable: inspection_tool
+add_executable(signal_lights_tool tools/signal_lights_tool.cc)
+add_dependencies(signal_lights_tool ${catkin_EXPORTED_TARGETS})
+target_link_libraries(signal_lights_tool
+ signal_lights gflags ${catkin_LIBRARIES})
-create_library(
- DIR src/signal_lights_node
- TARGET signal_lights_nodelet
- LIBS ${catkin_LIBRARIES} signal_lights config_reader ff_nodelet custom_i2c
- INC ${catkin_INCLUDE_DIRS}
- DEPS ff_hw_msgs
+#############
+## Install ##
+#############
+
+# Mark libraries for installation
+install(TARGETS custom_i2c
+ ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
+ LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
+ RUNTIME DESTINATION ${CATKIN_GLOBAL_BIN_DESTINATION}
+)
+install(TARGETS signal_lights
+ ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
+ LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
+ RUNTIME DESTINATION ${CATKIN_GLOBAL_BIN_DESTINATION}
+)
+install(TARGETS signal_lights_nodelet
+ ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
+ LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
+ RUNTIME DESTINATION ${CATKIN_GLOBAL_BIN_DESTINATION}
)
-install_launch_files()
+# Mark nodelet_plugin for installation
+install(FILES nodelet_plugins.xml
+ DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}
+)
+
+# Install C++ executables
+install(TARGETS signal_lights_tool DESTINATION bin)
+install(CODE "execute_process(
+ COMMAND ln -s ../../bin/signal_lights_tool share/${PROJECT_NAME}
+ WORKING_DIRECTORY ${CMAKE_INSTALL_PREFIX}
+ OUTPUT_QUIET
+ ERROR_QUIET
+ )")
+
+# Mark launch files for installation
+install(DIRECTORY launch/
+ DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}/launch
+ PATTERN ".svn" EXCLUDE)
diff --git a/hardware/smart_dock/CMakeLists.txt b/hardware/smart_dock/CMakeLists.txt
index 8a71ce8c23..33ab1059e3 100644
--- a/hardware/smart_dock/CMakeLists.txt
+++ b/hardware/smart_dock/CMakeLists.txt
@@ -15,42 +15,117 @@
# License for the specific language governing permissions and limitations
# under the License.
+cmake_minimum_required(VERSION 3.0)
project(smart_dock)
-set(DEPS
- rapidExtAstrobee
-)
-
-set(LIBS
- Qt4::QtXml
- rapidIo
- rapidExtAstrobee
- ff_common)
-
-set(INCLUDES
- ${CMAKE_CURRENT_SOURCE_DIR}/include
- ${SORACORE_INCLUDE_DIRS}
-)
-
-create_library(TARGET smart_dock
- LIBS ${LIBS} i2c eps_driver
- INC ${INCLUDES}
- DEPS ${DEPS}
-)
-
-create_tool_targets(DIR tools
- LIBS ${LIBS} smart_dock config_reader
- INC ${INCLUDES}
- DEPS ${DEPS}
-)
-
-# Determine our module name
-get_filename_component(MODULE_NAME ${CMAKE_CURRENT_SOURCE_DIR} NAME)
-
-install(CODE "execute_process(
- COMMAND mkdir -p share/${MODULE_NAME}
- COMMAND ln -s ../../bin/dds_ros_bridge share/${MODULE_NAME}
- WORKING_DIRECTORY ${CMAKE_INSTALL_PREFIX}
- OUTPUT_QUIET
- ERROR_QUIET
- )")
+## Compile as C++14, supported in ROS Kinetic and newer
+add_compile_options(-std=c++14)
+
+if (USE_DDS)
+ ## Find catkin macros and libraries
+ find_package(catkin2 REQUIRED COMPONENTS
+ roscpp
+ nodelet
+ i2c
+ eps_driver
+ dds_msgs
+ )
+
+ # System dependencies are found with CMake's conventions
+ find_package(Boost 1.54.0 QUIET REQUIRED COMPONENTS filesystem system iostreams thread program_options timer)
+
+ list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/../../cmake")
+
+ if (USE_CTC)
+ set(SORACORE_ROOT_DIR ${ARM_CHROOT_DIR}/usr)
+ else (USE_CTC)
+ set(SORACORE_ROOT_DIR /usr)
+ endif (USE_CTC)
+
+ set(MIRO_ROOT_DIR ${SORACORE_ROOT_DIR})
+
+ SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
+ SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
+
+ # just calls the normal one
+ find_package(Qt4 4.6.0 REQUIRED QtXml)
+ find_package(Miro REQUIRED)
+ find_package(RtiDds REQUIRED)
+ find_package(Soracore REQUIRED)
+ catkin_package(
+ LIBRARIES
+ signal_lights
+ CATKIN_DEPENDS
+ roscpp
+ nodelet
+ i2c
+ eps_driver
+ dds_msgs
+ )
+
+ ###########
+ ## Build ##
+ ###########
+
+ # Specify additional locations of header files
+ include_directories(
+ include
+ ${catkin_INCLUDE_DIRS}
+ ${RTIDDS_INCLUDE_DIR}
+ ${SORACORE_INCLUDE_DIRS}
+ ${MIRO_INCLUDE_DIR}
+ ${QT_INCLUDE_DIR}
+ ${QT_INCLUDE_DIR}/Qt
+ )
+
+
+ # Declare C++ libraries
+ add_library(smart_dock
+ src/smart_dock.cc
+ src/smart_dock_node.cc
+ )
+ target_compile_definitions(smart_dock PUBLIC ${RTIDDS_DEFINE_FLAGS})
+ add_dependencies(smart_dock ${catkin_EXPORTED_TARGETS})
+ target_link_libraries(smart_dock rapidIo ${catkin_LIBRARIES})
+
+ ## Declare a C++ executable: smart_dock_service
+ add_executable(smart_dock_service tools/smart_dock_service.cc)
+ add_dependencies(smart_dock_service ${catkin_EXPORTED_TARGETS})
+ target_link_libraries(smart_dock_service
+ smart_dock gflags ${catkin_LIBRARIES})
+
+ ## Declare a C++ executable: smart_dock_tool
+ add_executable(smart_dock_tool tools/smart_dock_tool.cc)
+ add_dependencies(smart_dock_tool ${catkin_EXPORTED_TARGETS})
+ target_link_libraries(smart_dock_tool
+ smart_dock gflags ${catkin_LIBRARIES})
+
+ # Determine our module name
+ get_filename_component(MODULE_NAME ${CMAKE_CURRENT_SOURCE_DIR} NAME)
+
+ #############
+ ## Install ##
+ #############
+
+ # Mark libraries for installation
+ install(TARGETS ${PROJECT_NAME}
+ ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
+ LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
+ RUNTIME DESTINATION ${CATKIN_GLOBAL_BIN_DESTINATION}
+ )
+
+ # Install C++ executables
+ install(TARGETS smart_dock_service DESTINATION bin)
+ install(TARGETS smart_dock_tool DESTINATION bin)
+ install(CODE "execute_process(
+ COMMAND ln -s ../../bin/smart_dock_service share/${PROJECT_NAME}
+ COMMAND ln -s ../../bin/smart_dock_tool share/${PROJECT_NAME}
+ WORKING_DIRECTORY ${CMAKE_INSTALL_PREFIX}
+ OUTPUT_QUIET
+ ERROR_QUIET
+ )")
+
+else (USE_DDS)
+ find_package(catkin REQUIRED COMPONENTS)
+ catkin_package()
+endif (USE_DDS)
\ No newline at end of file
diff --git a/hardware/smart_dock/include/smart_dock/smart_dock_node.h b/hardware/smart_dock/include/smart_dock/smart_dock_node.h
index 4bdc4362c2..a04e0c31cc 100644
--- a/hardware/smart_dock/include/smart_dock/smart_dock_node.h
+++ b/hardware/smart_dock/include/smart_dock/smart_dock_node.h
@@ -28,11 +28,11 @@
#include
#include
diff --git a/localization/camera/readme.md b/localization/camera/readme.md
index a928647d89..8615710bce 100644
--- a/localization/camera/readme.md
+++ b/localization/camera/readme.md
@@ -1,4 +1,4 @@
-\page camera Camera Library
+\page camera Camera library
This library handles camera calibration parameters and
transformations, providing functions to handle between undistorted and
@@ -21,6 +21,28 @@ Usage:
undistort_image input_dir/*[0-9].jpg --output_directory output_dir \
--robot_camera nav_cam
-Other options, useful with the dense mapper, are --save_bgr,
---undistorted_crop_win, -scale, and --image_list. See
-undistort_image.cc for more information.
+Options:
+
+ --image_list: A file having the list of images to undistort, one per
+ line. If not specified it is assumed they are passed in directly on
+ the command line.
+
+ --output_directory: Output directory. If not specified, undistorted
+ images will saved in the same directory as the inputs.
+
+ --scale: Undistort images at different resolution, with their width
+ being a multiple of this scale compared to the camera model. The
+ default is 1.
+
+ --undistorted_crop_win: After undistorting, apply a crop window of
+ these dimensions centered at the undistorted image center. The
+ adjusted dimensions and optical center will be printed on screen.
+ Specify as: 'crop_x crop_y'.
+
+ --save_bgr: Save the undistorted images as BGR instead of
+ grayscale. (Some tools expect BGR.)
+
+ --histogram_equalization: If true, do histogram equalization.
+
+ --robot_camera: Which of bot's cameras to use. Tested with nav_cam
+ and sci_cam. The default is nav_cam.
diff --git a/localization/camera/test/test_camera_model.cc b/localization/camera/test/test_camera_model.cc
index 0b95949778..2ae5888e6e 100644
--- a/localization/camera/test/test_camera_model.cc
+++ b/localization/camera/test/test_camera_model.cc
@@ -176,3 +176,9 @@ TEST(camera_model, DistortionCoeffs) {
EXPECT_NEAR(3.92, optical_center[0], 1e-3);
EXPECT_NEAR(0.827, optical_center[1], 1e-3);
}
+
+// Run all the tests that were declared with TEST()
+int main(int argc, char** argv) {
+ testing::InitGoogleTest(&argc, argv);
+ return RUN_ALL_TESTS();
+}
diff --git a/localization/camera/test/test_camera_params.cc b/localization/camera/test/test_camera_params.cc
index 2021953974..6f417afd29 100644
--- a/localization/camera/test/test_camera_params.cc
+++ b/localization/camera/test/test_camera_params.cc
@@ -195,3 +195,9 @@ TEST(camera_params, conversion) {
EXPECT_NEAR(input[0], output2[0], 1e-6);
EXPECT_NEAR(input[1], output2[1], 1e-6);
}
+
+// Run all the tests that were declared with TEST()
+int main(int argc, char** argv) {
+ testing::InitGoogleTest(&argc, argv);
+ return RUN_ALL_TESTS();
+}
diff --git a/localization/camera/tools/undistort_image.cc b/localization/camera/tools/undistort_image.cc
index 5e27612b32..1101bb0fc7 100644
--- a/localization/camera/tools/undistort_image.cc
+++ b/localization/camera/tools/undistort_image.cc
@@ -45,19 +45,24 @@
separate directory is specified.
*/
-DEFINE_string(image_list, "", "The list of images to undistort, one per line. If not specified, "
- "it is assumed they are passed in directly on the command line.");
+DEFINE_string(image_list, "", "A file having the list of images to undistort, one per line. "
+ "If not specified, it is assumed they are passed in directly on the command line.");
-DEFINE_string(output_directory, "", "If not specified, undistorted images will "
+DEFINE_string(output_directory, "", "Output directory. If not specified, undistorted images will "
"saved in the same directory as the inputs.");
+DEFINE_string(output_list, "", "Save the undistorted images with names given in this list, "
+ "instead of using the output directory.");
+
+DEFINE_string(undistorted_intrinsics, "", "Save to this file the undistorted camera intrinsics.");
+
DEFINE_double(scale, 1.0, "Undistort images at different resolution, with their width "
"being a multiple of this scale compared to the camera model.");
DEFINE_string(undistorted_crop_win, "",
"After undistorting, apply a crop window of these dimensions "
"centered at the undistorted image center. The adjusted "
- "dimensions and optical center will be displayed below. "
+ "dimensions and optical center will be printed on screen. "
"Specify as: 'crop_x crop_y'.");
DEFINE_bool(save_bgr, false,
@@ -67,7 +72,7 @@ DEFINE_bool(histogram_equalization, false,
"If true, do histogram equalization.");
DEFINE_string(robot_camera, "nav_cam",
- "Which of bot's cameras to use. Anything except nav_cam is experimental.");
+ "Which of bot's cameras to use. Tested with nav_cam and sci_cam.");
int main(int argc, char ** argv) {
ff_common::InitFreeFlyerApplication(&argc, &argv);
@@ -87,6 +92,18 @@ int main(int argc, char ** argv) {
if (images.empty())
LOG(FATAL) << "Expecting at least one input image.";
+ std::vector undist_images;
+ if (FLAGS_output_list != "") {
+ std::ifstream ifs(FLAGS_output_list);
+ std::string image;
+ while (ifs >> image)
+ undist_images.push_back(image);
+
+ if (undist_images.size() != images.size())
+ LOG(FATAL) << "There must be as many output undistorted "
+ << "images as input distorted images.\n";
+ }
+
// Read the camera
config_reader::ConfigReader config;
config.AddFile("cameras.config");
@@ -243,7 +260,10 @@ int main(int argc, char ** argv) {
// The output file name
std::string undist_file;
- if (!FLAGS_output_directory.empty()) {
+ if (!undist_images.empty()) {
+ // Was specified via a list
+ undist_file = undist_images[i];
+ } else if (!FLAGS_output_directory.empty()) {
// A separate output directory was specified
undist_file = FLAGS_output_directory + "/" + ff_common::basename(filename);
} else {
@@ -256,7 +276,11 @@ int main(int argc, char ** argv) {
cv::Mat bgr_image;
if (FLAGS_save_bgr && undist_image.channels() == 1) {
// Convert from grayscale to color if needed
- cvtColor(undist_image, bgr_image, CV_GRAY2BGR);
+ #if (CV_VERSION_MAJOR >= 4)
+ cvtColor(undist_image, bgr_image, cv::COLOR_GRAY2BGR);
+ #else
+ cvtColor(undist_image, bgr_image, CV_GRAY2BGR);
+ #endif
undist_image = bgr_image;
}
cv::imwrite(undist_file, undist_image);
@@ -268,15 +292,18 @@ int main(int argc, char ** argv) {
std::cout << "Focal length: " << focal_length << "\n";
std::cout << "Undistorted optical center: " << optical_center.transpose() << "\n";
- if (!FLAGS_output_directory.empty()) {
- std::string intrinsics_file = FLAGS_output_directory + "/undistorted_intrinsics.txt";
+ std::string intrinsics_file = FLAGS_undistorted_intrinsics;
+ if (intrinsics_file.empty() && !FLAGS_output_directory.empty())
+ intrinsics_file = FLAGS_output_directory + "/undistorted_intrinsics.txt";
+
+ if (!intrinsics_file.empty()) {
+ std::cout << "Writing: " << intrinsics_file << std::endl;
std::ofstream ofs(intrinsics_file.c_str());
ofs.precision(17);
ofs << "# Unidistored width and height, focal length, undistorted optical center\n";
ofs << undist_size.transpose() << " " << focal_length << " "
<< optical_center.transpose() << "\n";
ofs.close();
- std::cout << "Wrote: " << intrinsics_file << std::endl;
}
return 0;
diff --git a/localization/graph_localizer/CMakeLists.txt b/localization/graph_localizer/CMakeLists.txt
index 499d41542c..e44fb1955a 100644
--- a/localization/graph_localizer/CMakeLists.txt
+++ b/localization/graph_localizer/CMakeLists.txt
@@ -15,23 +15,74 @@
#License for the specific language governing permissions and limitations
#under the License.
+cmake_minimum_required(VERSION 3.0)
project(graph_localizer)
-if (USE_ROS)
+## Compile as C++14, supported in ROS Kinetic and newer
+add_compile_options(-std=c++14)
+
+# Find GTSAM
+find_package(GTSAM REQUIRED)
+
+# System dependencies are found with CMake's conventions
+find_package(Eigen3 REQUIRED)
+
+## Find catkin macros and libraries
+find_package(catkin2 REQUIRED COMPONENTS
+ nodelet
+ camera
+ config_reader
+ ff_util
+ ff_msgs
+ graph_optimizer
+ imu_integration
+ localization_common
+ localization_measurements
+ msg_conversions
+)
+
+# Find OpenCV
+SET(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/../../cmake")
+find_package(OpenCV331 REQUIRED)
# include ff_nodelet to get ff_util header files since these aren't exposed elsewhere
catkin_package(
- LIBRARIES ${PROJECT_NAME} ${GLOG_LIBRARIES} ${GTSAM_LIBRARIES} camera config_reader ff_nodelet graph_optimizer imu_integration localization_common localization_measurements msg_conversions
+ LIBRARIES ${PROJECT_NAME} ${GLOG_LIBRARIES} ${GTSAM_LIBRARIES}
INCLUDE_DIRS include ${GLOG_INCLUDE_DIRS} ${GTSAM_INCLUDE_DIR}
- CATKIN_DEPENDS roscpp
- DEPENDS gtsam ff_msgs
+ CATKIN_DEPENDS
+ nodelet
+ camera
+ config_reader
+ ff_util
+ ff_msgs
+ graph_optimizer
+ imu_integration
+ localization_common
+ localization_measurements
+ msg_conversions
+)
+
+###########
+## Build ##
+###########
+# Specify additional locations of header files
+include_directories(
+ include
+ ${catkin_INCLUDE_DIRS}
+ ${EIGEN3_INCLUDE_DIRS}
+)
+
+file(GLOB cc_files
+ "src/*.cc"
)
-create_library(TARGET ${PROJECT_NAME}
- LIBS ${catkin_LIBRARIES} ${GLOG_LIBRARIES} gtsam camera config_reader ff_nodelet graph_optimizer imu_integration localization_common localization_measurements msg_conversions
- INC ${catkin_INCLUDE_DIRS} ${GLOG_INCLUDE_DIRS}
- DEPS ff_msgs
+# Declare C++ libraries
+add_library(${PROJECT_NAME}
+ ${cc_files}
)
+add_dependencies(${PROJECT_NAME} ${catkin_EXPORTED_TARGETS})
+target_link_libraries(${PROJECT_NAME} ${OpenCV_LIBRARIES} ${catkin_LIBRARIES})
+
if(CATKIN_ENABLE_TESTING)
find_package(rostest REQUIRED)
@@ -40,52 +91,77 @@ if(CATKIN_ENABLE_TESTING)
test/test_rotation_factor_adder.cc
)
target_link_libraries(test_rotation_factor_adder
- graph_localizer gtsam
+ graph_localizer gtsam ${catkin_LIBRARIES} glog
)
add_rostest_gtest(test_rotation_factor
test/test_rotation_factor.test
test/test_rotation_factor.cc
)
target_link_libraries(test_rotation_factor
- graph_localizer gtsam
+ graph_localizer gtsam ${catkin_LIBRARIES} glog
)
add_rostest_gtest(test_point_to_line_factor
test/test_point_to_line_factor.test
test/test_point_to_line_factor.cc
)
target_link_libraries(test_point_to_line_factor
- graph_localizer gtsam
+ graph_localizer gtsam ${catkin_LIBRARIES} glog
)
add_rostest_gtest(test_point_to_line_segment_factor
test/test_point_to_line_segment_factor.test
test/test_point_to_line_segment_factor.cc
)
target_link_libraries(test_point_to_line_segment_factor
- graph_localizer gtsam
+ graph_localizer gtsam ${catkin_LIBRARIES} glog
)
add_rostest_gtest(test_point_to_plane_factor
test/test_point_to_plane_factor.test
test/test_point_to_plane_factor.cc
)
target_link_libraries(test_point_to_plane_factor
- graph_localizer localization_measurements gtsam
+ graph_localizer gtsam ${catkin_LIBRARIES} glog
)
add_rostest_gtest(test_point_to_handrail_endpoint_factor
test/test_point_to_handrail_endpoint_factor.test
test/test_point_to_handrail_endpoint_factor.cc
)
target_link_libraries(test_point_to_handrail_endpoint_factor
- graph_localizer gtsam
+ graph_localizer gtsam ${catkin_LIBRARIES} glog
)
add_rostest_gtest(test_silu
test/test_silu.test
test/test_silu.cc
)
target_link_libraries(test_silu
- graph_localizer gtsam
+ graph_localizer gtsam ${catkin_LIBRARIES} glog
)
endif()
-install_launch_files()
+#############
+## Install ##
+#############
+
+# Mark libraries for installation
+install(TARGETS ${PROJECT_NAME}
+ ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
+ LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
+ RUNTIME DESTINATION ${CATKIN_GLOBAL_BIN_DESTINATION}
+)
+
+# Mark nodelet_plugin for installation
+install(FILES nodelet_plugins.xml
+ DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}
+)
+
+# Mark cpp header files for installation
+install(DIRECTORY include/${PROJECT_NAME}/
+ DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION}
+ FILES_MATCHING PATTERN "*.h"
+ PATTERN ".svn" EXCLUDE
+)
+
+# Mark launch files for installation
+install(DIRECTORY launch/
+ DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}/launch
+ PATTERN ".svn" EXCLUDE)
-endif (USE_ROS)
diff --git a/localization/graph_localizer/include/graph_localizer/graph_localizer_nodelet.h b/localization/graph_localizer/include/graph_localizer/graph_localizer_nodelet.h
index 0b1dd016e5..8ebea49c9c 100644
--- a/localization/graph_localizer/include/graph_localizer/graph_localizer_nodelet.h
+++ b/localization/graph_localizer/include/graph_localizer/graph_localizer_nodelet.h
@@ -122,6 +122,7 @@ class GraphLocalizerNodelet : public ff_util::FreeFlyerNodelet {
ros::Time last_time_tf_dock_;
ros::Time last_time_tf_handrail_;
+ ros::Time last_heartbeat_time_;
// Timers
localization_common::RosTimer vl_timer_ = localization_common::RosTimer("VL msg");
diff --git a/wdock/tools/wdock_main.cc b/localization/graph_localizer/include/graph_localizer/test_utilities.h
similarity index 68%
rename from wdock/tools/wdock_main.cc
rename to localization/graph_localizer/include/graph_localizer/test_utilities.h
index 0133164bd8..dfd2ba4d1a 100644
--- a/wdock/tools/wdock_main.cc
+++ b/localization/graph_localizer/include/graph_localizer/test_utilities.h
@@ -1,14 +1,14 @@
/* Copyright (c) 2017, United States Government, as represented by the
* Administrator of the National Aeronautics and Space Administration.
- *
+ *
* All rights reserved.
- *
+ *
* The Astrobee platform is licensed under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with the
* License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
@@ -16,23 +16,12 @@
* under the License.
*/
+#ifndef GRAPH_LOCALIZER_TEST_UTILITIES_H_
+#define GRAPH_LOCALIZER_TEST_UTILITIES_H_
-#include
-#include
-#include
-#include
+#include
-#include "wdock/wdock.h"
-
-int main(int argc, char** argv) {
- w_dock::WDock wan_dock(argc, argv, "RapidCommand");
-
- wan_dock.SetBerthOne();
- wan_dock.SetBerthTwo();
- while (true) {
- wan_dock.ProcessDdsEventLoop();
- sleep(1);
- }
-
- return 1;
-}
+namespace graph_localizer {
+localization_measurements::Plane RandomPlane();
+} // namespace graph_localizer
+#endif // GRAPH_LOCALIZER_TEST_UTILITIES_H_
diff --git a/localization/graph_localizer/package.xml b/localization/graph_localizer/package.xml
index 784d51ba15..764dd85b33 100644
--- a/localization/graph_localizer/package.xml
+++ b/localization/graph_localizer/package.xml
@@ -14,12 +14,26 @@
Astrobee Flight Software
catkin
- ff_msgs
nodelet
- roscpp
- ff_msgs
+ camera
+ config_reader
+ ff_util
+ ff_msgs
+ graph_optimizer
+ imu_integration
+ localization_common
+ localization_measurements
+ msg_conversions
nodelet
- roscpp
+ camera
+ config_reader
+ ff_util
+ ff_msgs
+ graph_optimizer
+ imu_integration
+ localization_common
+ localization_measurements
+ msg_conversions
diff --git a/localization/graph_localizer/src/graph_localizer_nodelet.cc b/localization/graph_localizer/src/graph_localizer_nodelet.cc
index bf9f26939f..5d32234e9d 100644
--- a/localization/graph_localizer/src/graph_localizer_nodelet.cc
+++ b/localization/graph_localizer/src/graph_localizer_nodelet.cc
@@ -43,6 +43,7 @@ GraphLocalizerNodelet::GraphLocalizerNodelet() : ff_util::FreeFlyerNodelet(NODE_
LogFatal("Failed to read config files.");
}
LoadGraphLocalizerNodeletParams(config, params_);
+ last_heartbeat_time_ = ros::Time::now();
}
void GraphLocalizerNodelet::Initialize(ros::NodeHandle* nh) {
@@ -263,8 +264,7 @@ void GraphLocalizerNodelet::PublishWorldTDockTF() {
const auto world_T_dock_tf =
lc::PoseToTF(world_T_dock, "world", "dock/body", lc::TimeFromRosTime(ros::Time::now()), platform_name_);
// If the rate is higher than the sim time, prevent repeated timestamps
- if (world_T_dock_tf.header.stamp == last_time_tf_dock_)
- return;
+ if (world_T_dock_tf.header.stamp == last_time_tf_dock_) return;
last_time_tf_dock_ = world_T_dock_tf.header.stamp;
transform_pub_.sendTransform(world_T_dock_tf);
}
@@ -275,8 +275,7 @@ void GraphLocalizerNodelet::PublishWorldTHandrailTF() {
const auto world_T_handrail_tf = lc::PoseToTF(world_T_handrail->pose, "world", "handrail/body",
lc::TimeFromRosTime(ros::Time::now()), platform_name_);
// If the rate is higher than the sim time, prevent repeated timestamps
- if (world_T_handrail_tf.header.stamp == last_time_tf_handrail_)
- return;
+ if (world_T_handrail_tf.header.stamp == last_time_tf_handrail_) return;
last_time_tf_handrail_ = world_T_handrail_tf.header.stamp;
transform_pub_.sendTransform(world_T_handrail_tf);
}
@@ -288,7 +287,9 @@ void GraphLocalizerNodelet::PublishReset() const {
void GraphLocalizerNodelet::PublishHeartbeat() {
heartbeat_.header.stamp = ros::Time::now();
+ if ((heartbeat_.header.stamp - last_heartbeat_time_).toSec() < 1.0) return;
heartbeat_pub_.publish(heartbeat_);
+ last_heartbeat_time_ = heartbeat_.header.stamp;
}
void GraphLocalizerNodelet::PublishGraphMessages() {
diff --git a/localization/graph_localizer/src/test_utilities.cc b/localization/graph_localizer/src/test_utilities.cc
new file mode 100644
index 0000000000..e51fe70cd3
--- /dev/null
+++ b/localization/graph_localizer/src/test_utilities.cc
@@ -0,0 +1,31 @@
+/* Copyright (c) 2017, United States Government, as represented by the
+ * Administrator of the National Aeronautics and Space Administration.
+ *
+ * All rights reserved.
+ *
+ * The Astrobee platform is licensed under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with the
+ * License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations
+ * under the License.
+ */
+#include
+#include
+
+#include
+
+namespace graph_localizer {
+namespace lc = localization_common;
+
+localization_measurements::Plane RandomPlane() {
+ gtsam::Point3 point = lc::RandomVector();
+ gtsam::Vector3 normal = lc::RandomVector().normalized();
+ return localization_measurements::Plane(point, normal);
+}
+} // namespace graph_localizer
diff --git a/localization/graph_localizer/test/test_point_to_handrail_endpoint_factor.cc b/localization/graph_localizer/test/test_point_to_handrail_endpoint_factor.cc
index 7f78f8f994..0f0d477dfc 100644
--- a/localization/graph_localizer/test/test_point_to_handrail_endpoint_factor.cc
+++ b/localization/graph_localizer/test/test_point_to_handrail_endpoint_factor.cc
@@ -16,9 +16,9 @@
* under the License.
*/
-#include "test_utilities.h" // NOLINT
#include
#include
+#include
#include
#include
@@ -26,15 +26,15 @@
#include
-namespace gl = graph_localizer;
+namespace lc = localization_common;
namespace sym = gtsam::symbol_shorthand;
TEST(PointToHandrailEndpointFactorTester, Jacobian) {
for (int i = 0; i < 500; ++i) {
- const gtsam::Point3 sensor_t_point = gl::RandomVector();
- const gtsam::Point3 world_t_handrail_endpoint_a = gl::RandomVector();
- const gtsam::Point3 world_t_handrail_endpoint_b = gl::RandomVector();
- const gtsam::Pose3 body_T_sensor = gl::RandomPose();
- const gtsam::Pose3 world_T_body = gl::RandomPose();
+ const gtsam::Point3 sensor_t_point = lc::RandomVector();
+ const gtsam::Point3 world_t_handrail_endpoint_a = lc::RandomVector();
+ const gtsam::Point3 world_t_handrail_endpoint_b = lc::RandomVector();
+ const gtsam::Pose3 body_T_sensor = lc::RandomPose();
+ const gtsam::Pose3 world_T_body = lc::RandomPose();
// Ignore case where sensor point is directly between two endpoints as this leads to a known
// discontinuity in the Jacobian.
{
@@ -79,3 +79,9 @@ TEST(PointToHandrailEndpointFactorTester, SelectingCorrectEndpoint) {
EXPECT_TRUE(error.isApprox(gtsam::Vector3(-0.4, 0, 0), 1e-6));
}
}
+
+// Run all the tests that were declared with TEST()
+int main(int argc, char** argv) {
+ testing::InitGoogleTest(&argc, argv);
+ return RUN_ALL_TESTS();
+}
diff --git a/localization/graph_localizer/test/test_point_to_line_factor.cc b/localization/graph_localizer/test/test_point_to_line_factor.cc
index 0cc55984cb..a04e8e3a5d 100644
--- a/localization/graph_localizer/test/test_point_to_line_factor.cc
+++ b/localization/graph_localizer/test/test_point_to_line_factor.cc
@@ -16,9 +16,9 @@
* under the License.
*/
-#include "test_utilities.h" // NOLINT
#include
#include
+#include
#include
#include
@@ -26,14 +26,14 @@
#include
-namespace gl = graph_localizer;
+namespace lc = localization_common;
namespace sym = gtsam::symbol_shorthand;
TEST(PointToLineFactorTester, Jacobian) {
for (int i = 0; i < 500; ++i) {
- const gtsam::Point3 sensor_t_point = gl::RandomVector();
- const gtsam::Pose3 world_T_line = gl::RandomPose();
- const gtsam::Pose3 body_T_sensor = gl::RandomPose();
- const gtsam::Pose3 world_T_body = gl::RandomPose();
+ const gtsam::Point3 sensor_t_point = lc::RandomVector();
+ const gtsam::Pose3 world_T_line = lc::RandomPose();
+ const gtsam::Pose3 body_T_sensor = lc::RandomPose();
+ const gtsam::Pose3 world_T_body = lc::RandomPose();
const auto noise = gtsam::noiseModel::Unit::Create(2);
const gtsam::PointToLineFactor factor(sensor_t_point, world_T_line, body_T_sensor, noise, sym::P(0));
gtsam::Matrix H;
@@ -137,3 +137,9 @@ TEST(PointToLineFactorTester, ZeroErrorForZeroOffest) {
error_norm = (factor.evaluateError(world_T_body)).norm();
EXPECT_DOUBLE_EQ(error_norm, 0);
}
+
+// Run all the tests that were declared with TEST()
+int main(int argc, char** argv) {
+ testing::InitGoogleTest(&argc, argv);
+ return RUN_ALL_TESTS();
+}
diff --git a/localization/graph_localizer/test/test_point_to_line_segment_factor.cc b/localization/graph_localizer/test/test_point_to_line_segment_factor.cc
index cc8d5d1072..eb07677c0b 100644
--- a/localization/graph_localizer/test/test_point_to_line_segment_factor.cc
+++ b/localization/graph_localizer/test/test_point_to_line_segment_factor.cc
@@ -16,9 +16,9 @@
* under the License.
*/
-#include "test_utilities.h" // NOLINT
#include
#include
+#include
#include
#include
@@ -26,15 +26,15 @@
#include
-namespace gl = graph_localizer;
+namespace lc = localization_common;
namespace sym = gtsam::symbol_shorthand;
TEST(PointToLineSegmentFactorTester, Jacobian) {
for (int i = 0; i < 500; ++i) {
- const gtsam::Point3 sensor_t_point = gl::RandomVector();
- const gtsam::Pose3 world_T_line = gl::RandomPose();
- const gtsam::Pose3 body_T_sensor = gl::RandomPose();
- const gtsam::Pose3 world_T_body = gl::RandomPose();
- const double line_length = gl::RandomPositiveDouble();
+ const gtsam::Point3 sensor_t_point = lc::RandomVector();
+ const gtsam::Pose3 world_T_line = lc::RandomPose();
+ const gtsam::Pose3 body_T_sensor = lc::RandomPose();
+ const gtsam::Pose3 world_T_body = lc::RandomPose();
+ const double line_length = lc::RandomPositiveDouble();
const auto noise = gtsam::noiseModel::Unit::Create(2);
const gtsam::PointToLineSegmentFactor factor(sensor_t_point, world_T_line, body_T_sensor, line_length, noise,
sym::P(0));
@@ -50,11 +50,11 @@ TEST(PointToLineSegmentFactorTester, Jacobian) {
TEST(PointToLineSegmentFactorTester, JacobianWithSilu) {
for (int i = 0; i < 500; ++i) {
- const gtsam::Point3 sensor_t_point = gl::RandomVector();
- const gtsam::Pose3 world_T_line = gl::RandomPose();
- const gtsam::Pose3 body_T_sensor = gl::RandomPose();
- const gtsam::Pose3 world_T_body = gl::RandomPose();
- const double line_length = gl::RandomPositiveDouble();
+ const gtsam::Point3 sensor_t_point = lc::RandomVector();
+ const gtsam::Pose3 world_T_line = lc::RandomPose();
+ const gtsam::Pose3 body_T_sensor = lc::RandomPose();
+ const gtsam::Pose3 world_T_body = lc::RandomPose();
+ const double line_length = lc::RandomPositiveDouble();
const auto noise = gtsam::noiseModel::Unit::Create(2);
const bool use_silu = true;
const gtsam::PointToLineSegmentFactor factor(sensor_t_point, world_T_line, body_T_sensor, line_length, noise,
@@ -311,3 +311,9 @@ TEST(PointToLineSegmentFactorTester, IncreaseErrorWithIncreasedYDistanceWithSilu
}
EXPECT_LT(error_1_norm, error_2_norm);
}
+
+// Run all the tests that were declared with TEST()
+int main(int argc, char** argv) {
+ testing::InitGoogleTest(&argc, argv);
+ return RUN_ALL_TESTS();
+}
diff --git a/localization/graph_localizer/test/test_point_to_plane_factor.cc b/localization/graph_localizer/test/test_point_to_plane_factor.cc
index 996de5475b..39194501bc 100644
--- a/localization/graph_localizer/test/test_point_to_plane_factor.cc
+++ b/localization/graph_localizer/test/test_point_to_plane_factor.cc
@@ -16,9 +16,10 @@
* under the License.
*/
-#include "test_utilities.h" // NOLINT
#include
+#include
#include
+#include
#include
#include
@@ -28,14 +29,15 @@
#include
namespace gl = graph_localizer;
+namespace lc = localization_common;
namespace lm = localization_measurements;
namespace sym = gtsam::symbol_shorthand;
TEST(PointToPlaneFactorTester, Jacobian) {
for (int i = 0; i < 500; ++i) {
- const gtsam::Point3 sensor_t_point = gl::RandomVector();
+ const gtsam::Point3 sensor_t_point = lc::RandomVector();
const lm::Plane world_T_handrail_plane = gl::RandomPlane();
- const gtsam::Pose3 body_T_sensor = gl::RandomPose();
- const gtsam::Pose3 world_T_body = gl::RandomPose();
+ const gtsam::Pose3 body_T_sensor = lc::RandomPose();
+ const gtsam::Pose3 world_T_body = lc::RandomPose();
const auto noise = gtsam::noiseModel::Unit::Create(1);
const gtsam::PointToPlaneFactor factor(sensor_t_point, world_T_handrail_plane, body_T_sensor, noise, sym::P(0));
gtsam::Matrix H;
@@ -47,3 +49,9 @@ TEST(PointToPlaneFactorTester, Jacobian) {
ASSERT_TRUE(numerical_H.isApprox(H.matrix(), 1e-6));
}
}
+
+// Run all the tests that were declared with TEST()
+int main(int argc, char** argv) {
+ testing::InitGoogleTest(&argc, argv);
+ return RUN_ALL_TESTS();
+}
diff --git a/localization/graph_localizer/test/test_rotation_factor.cc b/localization/graph_localizer/test/test_rotation_factor.cc
index 98abb72b3e..8444005e01 100644
--- a/localization/graph_localizer/test/test_rotation_factor.cc
+++ b/localization/graph_localizer/test/test_rotation_factor.cc
@@ -51,3 +51,9 @@ TEST(RotationFactorTester, Jacobian) {
world_T_body_1, world_T_perturbed_body_2, 1e-5);
ASSERT_TRUE(numerical_H2.isApprox(factor_H2.matrix(), 1e-6));
}
+
+// Run all the tests that were declared with TEST()
+int main(int argc, char** argv) {
+ testing::InitGoogleTest(&argc, argv);
+ return RUN_ALL_TESTS();
+}
diff --git a/localization/graph_localizer/test/test_rotation_factor_adder.cc b/localization/graph_localizer/test/test_rotation_factor_adder.cc
index 740c9de49c..236615cd8b 100644
--- a/localization/graph_localizer/test/test_rotation_factor_adder.cc
+++ b/localization/graph_localizer/test/test_rotation_factor_adder.cc
@@ -151,3 +151,9 @@ TEST_F(RotationFactorAdderTester, CorrectOptimization) {
ASSERT_TRUE(optimized_world_T_body_1.equals(world_T_body_1, 1e-6));
ASSERT_TRUE(optimized_world_T_body_2.equals(world_T_body_2, 1e-6));
}
+
+// Run all the tests that were declared with TEST()
+int main(int argc, char** argv) {
+ testing::InitGoogleTest(&argc, argv);
+ return RUN_ALL_TESTS();
+}
diff --git a/localization/graph_localizer/test/test_silu.cc b/localization/graph_localizer/test/test_silu.cc
index fc35450982..3bd5332550 100644
--- a/localization/graph_localizer/test/test_silu.cc
+++ b/localization/graph_localizer/test/test_silu.cc
@@ -16,18 +16,19 @@
* under the License.
*/
-#include "test_utilities.h" // NOLINT
#include
#include
+#include
#include
#include
namespace gl = graph_localizer;
+namespace lc = localization_common;
TEST(SiluTester, Jacobian) {
for (int i = 0; i < 500; ++i) {
- const double x = gl::RandomDouble();
+ const double x = lc::RandomDouble();
gtsam::Matrix H;
gl::Silu(x, H);
const auto numerical_H = gtsam::numericalDerivative11(
@@ -38,8 +39,8 @@ TEST(SiluTester, Jacobian) {
TEST(SiluWithOffsetTester, Jacobian) {
for (int i = 0; i < 500; ++i) {
- const double x = gl::RandomDouble();
- const double offset = gl::RandomPositiveDouble();
+ const double x = lc::RandomDouble();
+ const double offset = lc::RandomPositiveDouble();
gtsam::Matrix H;
gl::SiluWithOffset(x, offset, H);
const auto numerical_H = gtsam::numericalDerivative21(
@@ -93,8 +94,8 @@ TEST(SiluWithOffsetTester, XMuchLessThanOffset) {
TEST(SiluWithOffsetTwoWayTester, Jacobian) {
for (int i = 0; i < 500; ++i) {
- const double x = gl::RandomDouble();
- const double offset = gl::RandomPositiveDouble();
+ const double x = lc::RandomDouble();
+ const double offset = lc::RandomPositiveDouble();
gtsam::Matrix H;
gl::SiluWithOffsetTwoWay(x, offset, H);
const auto numerical_H = gtsam::numericalDerivative21(
@@ -180,3 +181,9 @@ TEST(SiluWithOffsetTwoWayTester, NegativeXMuchGreaterThanOffset) {
const double silu_x = gl::SiluWithOffsetTwoWay(x, offset);
EXPECT_NEAR(0.0, silu_x, 1e-6);
}
+
+// Run all the tests that were declared with TEST()
+int main(int argc, char** argv) {
+ testing::InitGoogleTest(&argc, argv);
+ return RUN_ALL_TESTS();
+}
diff --git a/localization/graph_localizer/test/test_utilities.h b/localization/graph_localizer/test/test_utilities.h
deleted file mode 100644
index b3ca3600d4..0000000000
--- a/localization/graph_localizer/test/test_utilities.h
+++ /dev/null
@@ -1,60 +0,0 @@
-/* Copyright (c) 2017, United States Government, as represented by the
- * Administrator of the National Aeronautics and Space Administration.
- *
- * All rights reserved.
- *
- * The Astrobee platform is licensed under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with the
- * License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations
- * under the License.
- */
-
-#ifndef GRAPH_LOCALIZER_TEST_UTILITIES_H_ // NOLINT
-#define GRAPH_LOCALIZER_TEST_UTILITIES_H_ // NOLINT
-
-#include
-
-#include
-
-#include
-
-namespace graph_localizer {
-double RandomDouble() {
- std::random_device dev;
- std::mt19937 rng(dev());
- return std::uniform_real_distribution(-100, 100)(rng);
-}
-
-double RandomPositiveDouble() {
- std::random_device dev;
- std::mt19937 rng(dev());
- return std::uniform_real_distribution(0, 100)(rng);
-}
-
-gtsam::Vector3 RandomVector() {
- // Eigen::Vector3 is constrained to [-1, 1]
- return RandomDouble() * Eigen::Vector3d::Random();
-}
-
-gtsam::Pose3 RandomPose() {
- std::random_device dev;
- std::mt19937 rng(dev());
- gtsam::Rot3 rot = gtsam::Rot3::Random(rng);
- gtsam::Point3 trans = RandomVector();
- return gtsam::Pose3(rot, trans);
-}
-
-localization_measurements::Plane RandomPlane() {
- gtsam::Point3 point = RandomVector();
- gtsam::Vector3 normal = RandomVector().normalized();
- return localization_measurements::Plane(point, normal);
-}
-} // namespace graph_localizer
-#endif // GRAPH_LOCALIZER_TEST_UTILITIES_H_ // NOLINT
diff --git a/localization/graph_optimizer/CMakeLists.txt b/localization/graph_optimizer/CMakeLists.txt
index cbc0a62a79..604d1dc2ad 100644
--- a/localization/graph_optimizer/CMakeLists.txt
+++ b/localization/graph_optimizer/CMakeLists.txt
@@ -15,18 +15,67 @@
#License for the specific language governing permissions and limitations
#under the License.
+cmake_minimum_required(VERSION 3.0)
project(graph_optimizer)
+## Compile as C++14, supported in ROS Kinetic and newer
+add_compile_options(-std=c++14)
+
+## Find catkin macros and libraries
+find_package(catkin2 REQUIRED COMPONENTS
+ config_reader
+ localization_common
+ localization_measurements
+ msg_conversions
+)
+
+# System dependencies are found with CMake's conventions
+find_package(Eigen3 REQUIRED)
+
# include ff_nodelet to get ff_util header files since these aren't exposed elsewhere
catkin_package(
- LIBRARIES ${PROJECT_NAME} ${GLOG_LIBRARIES} ${GTSAM_LIBRARIES} config_reader localization_common localization_measurements msg_conversions
- INCLUDE_DIRS include ${GLOG_INCLUDE_DIRS} ${GTSAM_INCLUDE_DIR}
- CATKIN_DEPENDS
- DEPENDS gtsam
+ LIBRARIES ${PROJECT_NAME} ${GLOG_LIBRARIES}
+ INCLUDE_DIRS include ${GLOG_INCLUDE_DIRS}
+ CATKIN_DEPENDS config_reader localization_common localization_measurements msg_conversions
)
-create_library(TARGET ${PROJECT_NAME}
- LIBS ${catkin_LIBRARIES} ${GLOG_LIBRARIES} gtsam config_reader localization_common localization_measurements msg_conversions
- INC ${catkin_INCLUDE_DIRS} ${GLOG_INCLUDE_DIRS}
- DEPS
+###########
+## Build ##
+###########
+
+# Specify additional locations of header files
+include_directories(
+ include
+ ${catkin_INCLUDE_DIRS}
+ ${EIGEN3_INCLUDE_DIRS}
+ ${GLOG_INCLUDE_DIRS}
)
+
+# Declare C++ libraries
+add_library(${PROJECT_NAME}
+ src/graph_optimizer.cc
+ src/graph_values.cc
+ src/utilities.cc
+ src/graph_stats.cc
+ src/parameter_reader.cc
+)
+add_dependencies(${PROJECT_NAME} ${catkin_EXPORTED_TARGETS})
+target_link_libraries(${PROJECT_NAME} ${catkin_LIBRARIES})
+
+#############
+## Install ##
+#############
+
+# Mark libraries for installation
+install(TARGETS ${PROJECT_NAME}
+ ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
+ LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
+ RUNTIME DESTINATION ${CATKIN_GLOBAL_BIN_DESTINATION}
+)
+
+# Mark cpp header files for installation
+install(DIRECTORY include/${PROJECT_NAME}/
+ DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION}
+ FILES_MATCHING PATTERN "*.h"
+ PATTERN ".svn" EXCLUDE
+)
\ No newline at end of file
diff --git a/localization/graph_optimizer/package.xml b/localization/graph_optimizer/package.xml
index 81b9009955..10b279e9d5 100644
--- a/localization/graph_optimizer/package.xml
+++ b/localization/graph_optimizer/package.xml
@@ -14,4 +14,16 @@
Astrobee Flight Software
catkin
+ roscpp
+ nodelet
+ config_reader
+ localization_common
+ localization_measurements
+ msg_conversions
+ roscpp
+ nodelet
+ config_reader
+ localization_common
+ localization_measurements
+ msg_conversions
diff --git a/localization/ground_truth_localizer/CMakeLists.txt b/localization/ground_truth_localizer/CMakeLists.txt
index 9d1d878271..d1bea27238 100644
--- a/localization/ground_truth_localizer/CMakeLists.txt
+++ b/localization/ground_truth_localizer/CMakeLists.txt
@@ -15,24 +15,74 @@
#License for the specific language governing permissions and limitations
#under the License.
+cmake_minimum_required(VERSION 3.0)
project(ground_truth_localizer)
if (USE_ROS)
+
+ ## Compile as C++14, supported in ROS Kinetic and newer
+ add_compile_options(-std=c++14)
-# include ff_nodelet to get ff_util header files since these aren't exposed elsewhere
-catkin_package(
- LIBRARIES ${PROJECT_NAME} ${GLOG_LIBRARIES} config_reader ff_nodelet localization_common
- INCLUDE_DIRS include ${GLOG_INCLUDE_DIRS}
- CATKIN_DEPENDS roscpp
- DEPENDS ff_msgs
-)
+ ## Find catkin macros and libraries
+ find_package(catkin2 REQUIRED COMPONENTS
+ roscpp
+ nodelet
+ ff_msgs
+ ff_util
+ localization_common
+ )
+
+ # System dependencies are found with CMake's conventions
+ find_package(Eigen3 REQUIRED)
+
+ # include ff_nodelet to get ff_util header files since these aren't exposed elsewhere
+ catkin_package(
+ LIBRARIES ${PROJECT_NAME} ${GLOG_LIBRARIES}
+ INCLUDE_DIRS include ${GLOG_INCLUDE_DIRS}
+ CATKIN_DEPENDS roscpp ff_msgs ff_util localization_common
+ )
+
+ ###########
+ ## Build ##
+ ###########
+ # Specify additional locations of header files
+ include_directories(
+ include
+ ${catkin_INCLUDE_DIRS}
+ ${EIGEN3_INCLUDE_DIRS}
+ )
+
+ # Declare C++ libraries
+ add_library(${PROJECT_NAME}
+ src/ground_truth_localizer_nodelet.cc
+ src/utilities.cc
+ )
+ add_dependencies(${PROJECT_NAME} ${catkin_EXPORTED_TARGETS})
+ target_link_libraries(${PROJECT_NAME} ${catkin_LIBRARIES} ${QT_LIBRARIES})
+
+
+ #############
+ ## Install ##
+ #############
+
+ # Mark libraries for installation
+ install(TARGETS ${PROJECT_NAME}
+ ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
+ LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
+ RUNTIME DESTINATION ${CATKIN_GLOBAL_BIN_DESTINATION}
+ )
-create_library(TARGET ${PROJECT_NAME}
- LIBS ${catkin_LIBRARIES} ${GLOG_LIBRARIES} config_reader ff_nodelet localization_common
- INC ${catkin_INCLUDE_DIRS} ${GLOG_INCLUDE_DIRS}
- DEPS ff_msgs
+# Mark nodelet_plugin for installation
+install(FILES nodelet_plugins.xml
+ DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}
)
-install_launch_files()
+ # Mark launch files for installation
+ install(DIRECTORY launch/
+ DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}/launch
+ PATTERN ".svn" EXCLUDE)
+else (USE_ROS)
+ find_package(catkin REQUIRED COMPONENTS)
+ catkin_package()
endif (USE_ROS)
diff --git a/localization/ground_truth_localizer/package.xml b/localization/ground_truth_localizer/package.xml
index 842b4c5d22..7d9c801f35 100644
--- a/localization/ground_truth_localizer/package.xml
+++ b/localization/ground_truth_localizer/package.xml
@@ -14,12 +14,16 @@
Astrobee Flight Software
catkin
- ff_msgs
- nodelet
roscpp
- ff_msgs
- nodelet
+ nodelet
+ ff_msgs
+ ff_util
+ localization_common
roscpp
+ nodelet
+ ff_msgs
+ ff_util
+ localization_common
diff --git a/localization/handrail_detect/CMakeLists.txt b/localization/handrail_detect/CMakeLists.txt
index 9887b0ecf1..36f2706e3c 100644
--- a/localization/handrail_detect/CMakeLists.txt
+++ b/localization/handrail_detect/CMakeLists.txt
@@ -15,30 +15,66 @@
# License for the specific language governing permissions and limitations
# under the License.
+cmake_minimum_required(VERSION 3.0)
project(handrail_detect)
-if (USE_ROS)
+## Compile as C++14, supported in ROS Kinetic and newer
+add_compile_options(-std=c++14)
+
+## Find catkin macros and libraries
+find_package(catkin2 REQUIRED COMPONENTS
+ roscpp
+ tf2
+ nodelet
+ visualization_msgs
+ ff_msgs
+ ff_util
+)
+
+# Find OpenCV3
+find_package(OpenCV 3.3.1 REQUIRED)
catkin_package(
LIBRARIES ${PROJECT_NAME}
- CATKIN_DEPENDS tf2 visualization_msgs roscpp ff_msgs nodelet
- DEPENDS ${PROJECT_NAME}
+ CATKIN_DEPENDS roscpp tf2 nodelet visualization_msgs ff_msgs ff_util
)
-set(CMAKE_CXX_FLAGS_HACKY "${CMAKE_CXX_FLAGS} -Wno-return-type")
+###########
+## Build ##
+###########
-create_library(TARGET ${PROJECT_NAME}
- LIBS ${catkin_LIBRARIES} ${OROCOS_KDL_LIBRARIES} ff_common config_reader msg_conversions ff_nodelet
- INC ${catkin_INCLUDE_DIRS} ${EIGEN3_INCLUDE_DIRS}
- DEPS ff_msgs
+# Specify additional locations of header files
+include_directories(
+ ${catkin_INCLUDE_DIRS}
+ ${OpenCV_INCLUDE_DIRS}
)
-set_target_properties(${PROJECT_NAME} PROPERTIES COMPILE_FLAGS ${CMAKE_CXX_FLAGS_HACKY})
+# Declare C++ libraries
+add_library(handrail_detect
+ src/handrail_detect.cc
+)
+add_dependencies(handrail_detect ${catkin_EXPORTED_TARGETS})
+target_link_libraries(handrail_detect ${catkin_LIBRARIES})
+
+#############
+## Install ##
+#############
+
+# Mark libraries for installation
+install(TARGETS ${PROJECT_NAME}
+ ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
+ LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
+ RUNTIME DESTINATION ${CATKIN_GLOBAL_BIN_DESTINATION}
+)
-create_tool_targets(DIR tools
- LIBS ${PROJECT_NAME}
+# Mark nodelet_plugin for installation
+install(FILES nodelet_plugins.xml
+ DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}
)
-install_launch_files()
+# Mark launch files for installation
+install(DIRECTORY launch/
+ DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}/launch
+ PATTERN ".svn" EXCLUDE)
-endif (USE_ROS)
+install(DIRECTORY config/ DESTINATION config)
diff --git a/localization/handrail_detect/package.xml b/localization/handrail_detect/package.xml
index 7ca3c4bf22..a4bb30a8ae 100644
--- a/localization/handrail_detect/package.xml
+++ b/localization/handrail_detect/package.xml
@@ -17,7 +17,6 @@
catkin
roscpp
nodelet
- pluginlib
tf2
tf2_ros
tf2_geometry_msgs
@@ -29,7 +28,6 @@
ff_util
roscpp
nodelet
- pluginlib
tf2
tf2_ros
tf2_geometry_msgs
diff --git a/localization/handrail_detect/src/handrail_detect.cc b/localization/handrail_detect/src/handrail_detect.cc
index 1fb3bef0d6..b2942d3731 100644
--- a/localization/handrail_detect/src/handrail_detect.cc
+++ b/localization/handrail_detect/src/handrail_detect.cc
@@ -52,7 +52,7 @@
#include
#include
-// Eigen incliudes
+// Eigen includes
#include
#include
#include
diff --git a/localization/imu_augmentor/CMakeLists.txt b/localization/imu_augmentor/CMakeLists.txt
index 2039fa6dee..de41cf6c1f 100644
--- a/localization/imu_augmentor/CMakeLists.txt
+++ b/localization/imu_augmentor/CMakeLists.txt
@@ -15,23 +15,105 @@
#License for the specific language governing permissions and limitations
#under the License.
+cmake_minimum_required(VERSION 3.0)
project(imu_augmentor)
-if (USE_ROS)
+## Compile as C++14, supported in ROS Kinetic and newer
+add_compile_options(-std=c++14)
+
+# Find GTSAM
+find_package(GTSAM REQUIRED)
+
+# System dependencies are found with CMake's conventions
+find_package(Eigen3 REQUIRED)
+
+## Find catkin macros and libraries
+find_package(catkin2 REQUIRED COMPONENTS
+ nodelet
+ ff_util
+ imu_integration
+ localization_common
+ localization_measurements
+)
catkin_package(
- LIBRARIES ${PROJECT_NAME} ${GLOG_LIBRARIES} ${GTSAM_LIBRARIES} ff_nodelet imu_integration localization_common localization_measurements
INCLUDE_DIRS include ${GTSAM_INCLUDE_DIR} ${GLOG_INCLUDE_DIRS}
- CATKIN_DEPENDS
- DEPENDS gtsam
+ LIBRARIES ${PROJECT_NAME} ${GLOG_LIBRARIES} ${GTSAM_LIBRARIES} gtsam
+ CATKIN_DEPENDS
+ nodelet
+ ff_util
+ imu_integration
+ localization_common
+ localization_measurements
+)
+
+###########
+## Build ##
+###########
+
+# Specify additional locations of header files
+include_directories(
+ include
+ ${catkin_INCLUDE_DIRS}
+ ${GTSAM_INCLUDE_DIR}
+ ${EIGEN3_INCLUDE_DIRS}
+)
+
+# Declare C++ libraries
+add_library(${PROJECT_NAME}
+ src/imu_augmentor.cc
+ src/imu_augmentor_nodelet.cc
+ src/imu_augmentor_wrapper.cc
+)
+add_dependencies(${PROJECT_NAME} ${catkin_EXPORTED_TARGETS})
+target_link_libraries(${PROJECT_NAME} ${catkin_LIBRARIES})
+
+if(CATKIN_ENABLE_TESTING)
+ find_package(rostest REQUIRED)
+ add_rostest_gtest(test_imu_augmentor
+ test/test_imu_augmentor.test
+ test/test_imu_augmentor.cc
+ test/test_utilities.cc
+ )
+ target_link_libraries(test_imu_augmentor
+ imu_augmentor ${catkin_LIBRARIES}
+ )
+ find_package(rostest REQUIRED)
+ add_rostest_gtest(test_imu_augmentor_wrapper
+ test/test_imu_augmentor_wrapper.test
+ test/test_imu_augmentor_wrapper.cc
+ test/test_utilities.cc
+ )
+ target_link_libraries(test_imu_augmentor_wrapper
+ imu_augmentor ${catkin_LIBRARIES}
+ )
+endif()
+
+#############
+## Install ##
+#############
+
+# Mark libraries for installation
+install(TARGETS ${PROJECT_NAME}
+ ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
+ LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
+ RUNTIME DESTINATION ${CATKIN_GLOBAL_BIN_DESTINATION}
+)
+
+# Mark nodelet_plugin for installation
+install(FILES nodelet_plugins.xml
+ DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}
)
-create_library(TARGET ${PROJECT_NAME}
- LIBS ${catkin_LIBRARIES} ${GLOG_LIBRARIES} ff_nodelet imu_integration localization_common localization_measurements
- INC ${catkin_INCLUDE_DIRS} ${GLOG_INCLUDE_DIRS}
- DEPS gtsam ff_msgs
+# Mark cpp header files for installation
+install(DIRECTORY include/${PROJECT_NAME}/
+ DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION}
+ FILES_MATCHING PATTERN "*.h"
+ PATTERN ".svn" EXCLUDE
)
-install_launch_files()
+# Mark launch files for installation
+install(DIRECTORY launch/
+ DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}/launch
+ PATTERN ".svn" EXCLUDE)
-endif (USE_ROS)
diff --git a/localization/imu_augmentor/include/imu_augmentor/imu_augmentor.h b/localization/imu_augmentor/include/imu_augmentor/imu_augmentor.h
index eefb45b064..3c7ccd2c30 100644
--- a/localization/imu_augmentor/include/imu_augmentor/imu_augmentor.h
+++ b/localization/imu_augmentor/include/imu_augmentor/imu_augmentor.h
@@ -30,8 +30,8 @@ class ImuAugmentor : public imu_integration::ImuIntegrator {
public:
explicit ImuAugmentor(const ImuAugmentorParams& params);
- boost::optional PimPredict(
- const localization_common::CombinedNavState& combined_nav_state);
+ void PimPredict(const localization_common::CombinedNavState& latest_combined_nav_state,
+ localization_common::CombinedNavState& latest_imu_augmented_combined_nav_state);
};
} // namespace imu_augmentor
diff --git a/localization/imu_augmentor/include/imu_augmentor/imu_augmentor_nodelet.h b/localization/imu_augmentor/include/imu_augmentor/imu_augmentor_nodelet.h
index 85a6a550b5..a8f2609124 100644
--- a/localization/imu_augmentor/include/imu_augmentor/imu_augmentor_nodelet.h
+++ b/localization/imu_augmentor/include/imu_augmentor/imu_augmentor_nodelet.h
@@ -68,6 +68,8 @@ class ImuAugmentorNodelet : public ff_util::FreeFlyerNodelet {
ff_msgs::Heartbeat heartbeat_;
tf2_ros::TransformBroadcaster transform_pub_;
ros::Time last_time_;
+ ros::Time last_heartbeat_time_;
+ boost::optional last_state_msg_time_;
};
} // namespace imu_augmentor
diff --git a/localization/imu_augmentor/include/imu_augmentor/imu_augmentor_wrapper.h b/localization/imu_augmentor/include/imu_augmentor/imu_augmentor_wrapper.h
index 6b51fbbefe..420f7e8da0 100644
--- a/localization/imu_augmentor/include/imu_augmentor/imu_augmentor_wrapper.h
+++ b/localization/imu_augmentor/include/imu_augmentor/imu_augmentor_wrapper.h
@@ -39,6 +39,8 @@ class ImuAugmentorWrapper {
public:
explicit ImuAugmentorWrapper(const std::string& graph_config_path_prefix = "");
+ explicit ImuAugmentorWrapper(const ImuAugmentorParams& params);
+
void LocalizationStateCallback(const ff_msgs::GraphState& loc_msg);
void ImuCallback(const sensor_msgs::Imu& imu_msg);
@@ -51,6 +53,8 @@ class ImuAugmentorWrapper {
boost::optional LatestImuAugmentedLocalizationMsg();
private:
+ void Initialize(const ImuAugmentorParams& params);
+
bool LatestImuAugmentedCombinedNavStateAndCovariances(
localization_common::CombinedNavState& latest_imu_augmented_combined_nav_state,
localization_common::CombinedNavStateCovariances& latest_imu_augmented_covariances);
@@ -61,6 +65,7 @@ class ImuAugmentorWrapper {
std::unique_ptr imu_augmentor_;
boost::optional latest_combined_nav_state_;
+ boost::optional latest_imu_augmented_combined_nav_state_;
boost::optional latest_covariances_;
boost::optional latest_loc_msg_;
std::unique_ptr preintegration_helper_;
diff --git a/localization/imu_augmentor/package.xml b/localization/imu_augmentor/package.xml
index 0e0156dca1..503996e830 100644
--- a/localization/imu_augmentor/package.xml
+++ b/localization/imu_augmentor/package.xml
@@ -14,13 +14,16 @@
Astrobee Flight Software
catkin
- catkin
- ff_msgs
nodelet
- roscpp
- ff_msgs
+ ff_util
+ imu_integration
+ localization_common
+ localization_measurements
nodelet
- roscpp
+ ff_util
+ imu_integration
+ localization_common
+ localization_measurements
diff --git a/localization/imu_augmentor/src/imu_augmentor.cc b/localization/imu_augmentor/src/imu_augmentor.cc
index abefad9fdb..49fce03489 100644
--- a/localization/imu_augmentor/src/imu_augmentor.cc
+++ b/localization/imu_augmentor/src/imu_augmentor.cc
@@ -26,28 +26,30 @@ namespace lc = localization_common;
namespace lm = localization_measurements;
ImuAugmentor::ImuAugmentor(const ImuAugmentorParams& params) : ii::ImuIntegrator(params) {}
-boost::optional ImuAugmentor::PimPredict(const lc::CombinedNavState& combined_nav_state) {
- if (Empty()) return combined_nav_state;
+void ImuAugmentor::PimPredict(const lc::CombinedNavState& latest_combined_nav_state,
+ lc::CombinedNavState& latest_imu_augmented_combined_nav_state) {
+ if (Empty()) return;
// Start with least upper bound measurement
// Don't add measurements with same timestamp as start_time
// since these would have a dt of 0 (wrt the pim start time) and cause errors for the pim
- auto measurement_it = measurements().upper_bound(combined_nav_state.timestamp());
- if (measurement_it == measurements().cend()) return combined_nav_state;
- auto last_predicted_combined_nav_state = combined_nav_state;
- auto pim = ii::Pim(last_predicted_combined_nav_state.bias(), pim_params());
+ auto measurement_it = measurements().upper_bound(latest_imu_augmented_combined_nav_state.timestamp());
+ if (measurement_it == measurements().cend()) return;
+ // Always use the biases from the lastest combined nav state
+ auto pim = ii::Pim(latest_combined_nav_state.bias(), pim_params());
int num_measurements_added = 0;
// Create new pim each time since pim uses beginning orientation and velocity for
// gravity integration and initial velocity integration.
for (; measurement_it != measurements().cend(); ++measurement_it) {
- pim.resetIntegrationAndSetBias(last_predicted_combined_nav_state.bias());
- auto time = last_predicted_combined_nav_state.timestamp();
+ pim.resetIntegrationAndSetBias(latest_combined_nav_state.bias());
+ auto time = latest_imu_augmented_combined_nav_state.timestamp();
ii::AddMeasurement(measurement_it->second, time, pim);
- last_predicted_combined_nav_state = ii::PimPredict(last_predicted_combined_nav_state, pim);
+ latest_imu_augmented_combined_nav_state = ii::PimPredict(latest_imu_augmented_combined_nav_state, pim);
++num_measurements_added;
}
- RemoveOldMeasurements(combined_nav_state.timestamp());
+ // Only remove measurements up to latest combined nav state so that when a new nav state is received IMU data is still
+ // available for extrapolation
+ RemoveOldMeasurements(latest_combined_nav_state.timestamp());
LogDebug("PimPredict: Added " << num_measurements_added << " measurements.");
- return last_predicted_combined_nav_state;
}
} // namespace imu_augmentor
diff --git a/localization/imu_augmentor/src/imu_augmentor_nodelet.cc b/localization/imu_augmentor/src/imu_augmentor_nodelet.cc
index d70cf903b1..dfba453ef2 100644
--- a/localization/imu_augmentor/src/imu_augmentor_nodelet.cc
+++ b/localization/imu_augmentor/src/imu_augmentor_nodelet.cc
@@ -33,6 +33,7 @@ ImuAugmentorNodelet::ImuAugmentorNodelet() : ff_util::FreeFlyerNodelet(NODE_IMU_
heartbeat_.node = GetName();
heartbeat_.nodelet_manager = ros::this_node::getName();
last_time_ = ros::Time::now();
+ last_heartbeat_time_ = ros::Time::now();
}
void ImuAugmentorNodelet::Initialize(ros::NodeHandle* nh) {
@@ -76,7 +77,10 @@ boost::optional ImuAugmentorNodelet::PublishLatestImuAugmente
LogDebugEveryN(100, "PublishLatestImuAugmentedLocalizationState: Failed to get latest imu augmented loc msg.");
return boost::none;
}
+ // Avoid sending repeat messages
+ if (last_state_msg_time_ && (latest_imu_augmented_loc_msg->header.stamp == *last_state_msg_time_)) return boost::none;
state_pub_.publish(*latest_imu_augmented_loc_msg);
+ last_state_msg_time_ = latest_imu_augmented_loc_msg->header.stamp;
return latest_imu_augmented_loc_msg;
}
@@ -112,7 +116,9 @@ void ImuAugmentorNodelet::PublishPoseAndTwistAndTransform(const ff_msgs::EkfStat
void ImuAugmentorNodelet::PublishHeartbeat() {
heartbeat_.header.stamp = ros::Time::now();
+ if ((heartbeat_.header.stamp - last_heartbeat_time_).toSec() < 1.0) return;
heartbeat_pub_.publish(heartbeat_);
+ last_heartbeat_time_ = heartbeat_.header.stamp;
}
void ImuAugmentorNodelet::Run() {
diff --git a/localization/imu_augmentor/src/imu_augmentor_wrapper.cc b/localization/imu_augmentor/src/imu_augmentor_wrapper.cc
index 4c0141c8d7..7373e4035a 100644
--- a/localization/imu_augmentor/src/imu_augmentor_wrapper.cc
+++ b/localization/imu_augmentor/src/imu_augmentor_wrapper.cc
@@ -41,8 +41,16 @@ ImuAugmentorWrapper::ImuAugmentorWrapper(const std::string& graph_config_path_pr
LogFatal("Failed to read config files.");
}
- ii::LoadImuIntegratorParams(config, params_);
- params_.standstill_enabled = mc::LoadBool(config, "imu_augmentor_standstill");
+ ImuAugmentorParams params;
+ ii::LoadImuIntegratorParams(config, params);
+ params.standstill_enabled = mc::LoadBool(config, "imu_augmentor_standstill");
+ Initialize(params);
+}
+
+ImuAugmentorWrapper::ImuAugmentorWrapper(const ImuAugmentorParams& params) { Initialize(params); }
+
+void ImuAugmentorWrapper::Initialize(const ImuAugmentorParams& params) {
+ params_ = params;
imu_augmentor_.reset(new ImuAugmentor(params_));
// Preintegration_helper_ is only being used to frame change and remove centrifugal acceleration, so body_T_imu is the
@@ -61,6 +69,8 @@ void ImuAugmentorWrapper::LocalizationStateCallback(const ff_msgs::GraphState& l
latest_combined_nav_state_ = lc::CombinedNavStateFromMsg(loc_msg);
latest_covariances_ = lc::CombinedNavStateCovariancesFromMsg(loc_msg);
+ // Reset imu augmented state so IMU data is added starting with the most recent combined nav state's biases
+ latest_imu_augmented_combined_nav_state_ = latest_combined_nav_state_;
latest_loc_msg_ = loc_msg;
standstill_ = loc_msg.standstill;
}
@@ -83,7 +93,8 @@ void ImuAugmentorWrapper::FlightModeCallback(const ff_msgs::FlightMode& flight_m
boost::optional>
ImuAugmentorWrapper::LatestImuAugmentedCombinedNavStateAndCovariances() {
- if (!latest_combined_nav_state_ || !latest_covariances_ || !imu_augmentor_) {
+ if (!latest_combined_nav_state_ || !latest_covariances_ || !imu_augmentor_ ||
+ !latest_imu_augmented_combined_nav_state_) {
LogError(
"LatestImuAugmentedCombinedNavStateAndCovariances: Not enough information available to create desired data.");
return boost::none;
@@ -91,17 +102,24 @@ ImuAugmentorWrapper::LatestImuAugmentedCombinedNavStateAndCovariances() {
if (standstill()) {
LogDebugEveryN(100, "LatestImuAugmentedCombinedNavStateAndCovariances: Standstill.");
- return std::pair{*latest_combined_nav_state_,
+ const auto latest_timestamp = imu_augmentor_->LatestTime();
+ if (!latest_timestamp) {
+ LogError("LatestImuAugmentedCombinedNavStateAndCovariances: Failed to get latest timestamp.");
+ return boost::none;
+ }
+ const lc::CombinedNavState latest_timestamp_combined_nav_state(
+ latest_combined_nav_state_->nav_state(), latest_combined_nav_state_->bias(), *latest_timestamp);
+ return std::pair{latest_timestamp_combined_nav_state,
*latest_covariances_};
}
- const auto latest_imu_augmented_combined_nav_state = imu_augmentor_->PimPredict(*latest_combined_nav_state_);
- if (!latest_imu_augmented_combined_nav_state) {
+ imu_augmentor_->PimPredict(*latest_combined_nav_state_, *latest_imu_augmented_combined_nav_state_);
+ if (!latest_imu_augmented_combined_nav_state_) {
LogError("LatestImuAugmentedCombinedNavSTateAndCovariances: Failed to pim predict combined nav state.");
return boost::none;
}
// TODO(rsoussan): propogate uncertainties from imu augmentor
- return std::pair{*latest_imu_augmented_combined_nav_state,
+ return std::pair{*latest_imu_augmented_combined_nav_state_,
*latest_covariances_};
}
diff --git a/localization/imu_augmentor/test/test_imu_augmentor.cc b/localization/imu_augmentor/test/test_imu_augmentor.cc
new file mode 100644
index 0000000000..1997bbe30b
--- /dev/null
+++ b/localization/imu_augmentor/test/test_imu_augmentor.cc
@@ -0,0 +1,204 @@
+/* Copyright (c) 2017, United States Government, as represented by the
+ * Administrator of the National Aeronautics and Space Administration.
+ *
+ * All rights reserved.
+ *
+ * The Astrobee platform is licensed under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with the
+ * License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations
+ * under the License.
+ */
+
+#include "test_utilities.h" // NOLINT
+#include
+#include
+#include
+#include
+
+#include
+
+namespace ia = imu_augmentor;
+namespace lc = localization_common;
+namespace lm = localization_measurements;
+
+class ConstantAccelerationTest : public ::testing::Test {
+ public:
+ // Start at time increment so first IMU measurement is after starting combined nav state time
+ ConstantAccelerationTest()
+ : acceleration_i_(0.1),
+ acceleration_(acceleration_i_, acceleration_i_, acceleration_i_),
+ time_increment_(1.0 / 125.0),
+ start_time_(time_increment_),
+ num_measurements_(20) {
+ const ia::ImuAugmentorParams params = ia::DefaultImuAugmentorParams();
+ imu_augmentor_.reset(new ia::ImuAugmentor(params));
+ }
+
+ void SetUp() final {
+ const std::vector imu_measurements =
+ ia::ConstantAccelerationMeasurements(acceleration_, num_measurements_, start_time_, time_increment_);
+ for (const auto& imu_measurement : imu_measurements) {
+ imu_augmentor_->BufferImuMeasurement(imu_measurement);
+ }
+ }
+
+ ia::ImuAugmentor& imu_augmentor() { return *imu_augmentor_; }
+
+ double acceleration_i() { return acceleration_i_; }
+
+ const Eigen::Vector3d& acceleration() { return acceleration_; }
+
+ double time_increment() { return time_increment_; }
+
+ double start_time() { return start_time_; }
+
+ int num_measurements() { return num_measurements_; }
+
+ private:
+ std::unique_ptr imu_augmentor_;
+ const double acceleration_i_;
+ const Eigen::Vector3d acceleration_;
+ const double time_increment_;
+ const lc::Time start_time_;
+ const int num_measurements_;
+};
+
+class ConstantAngularVelocityTest : public ::testing::Test {
+ public:
+ // Start at time increment so first IMU measurement is after starting combined nav state time
+ ConstantAngularVelocityTest()
+ : angular_velocity_i_(0.1),
+ angular_velocity_(angular_velocity_i_, angular_velocity_i_, angular_velocity_i_),
+ time_increment_(1.0 / 125.0),
+ start_time_(time_increment_),
+ num_measurements_(20) {
+ const ia::ImuAugmentorParams params = ia::DefaultImuAugmentorParams();
+ imu_augmentor_.reset(new ia::ImuAugmentor(params));
+ }
+
+ void SetUp() final {
+ imu_measurements_ =
+ ia::ConstantAngularVelocityMeasurements(angular_velocity_, num_measurements_, start_time_, time_increment_);
+ for (const auto& imu_measurement : imu_measurements_) {
+ imu_augmentor_->BufferImuMeasurement(imu_measurement);
+ }
+ }
+
+ ia::ImuAugmentor& imu_augmentor() { return *imu_augmentor_; }
+
+ double angular_velocity_i() { return angular_velocity_i_; }
+
+ const Eigen::Vector3d& angular_velocity() { return angular_velocity_; }
+
+ double time_increment() { return time_increment_; }
+
+ double start_time() { return start_time_; }
+
+ int num_measurements() { return num_measurements_; }
+
+ const std::vector& imu_measurements() { return imu_measurements_; }
+
+ private:
+ std::unique_ptr imu_augmentor_;
+ const double angular_velocity_i_;
+ const Eigen::Vector3d angular_velocity_;
+ const double time_increment_;
+ const lc::Time start_time_;
+ const int num_measurements_;
+ std::vector imu_measurements_;
+};
+
+TEST_F(ConstantAccelerationTest, AddAllMeasurements) {
+ const lc::CombinedNavState initial_state(gtsam::Pose3::identity(), gtsam::Velocity3::Zero(),
+ gtsam::imuBias::ConstantBias(), 0);
+ lc::CombinedNavState imu_augmented_state = initial_state;
+ imu_augmentor().PimPredict(initial_state, imu_augmented_state);
+
+ EXPECT_NEAR(imu_augmented_state.timestamp(), num_measurements() * time_increment(), 1e-6);
+ const double expected_velocity_i = acceleration_i() * num_measurements() * time_increment();
+ const gtsam::Vector3 expected_velocity(expected_velocity_i, expected_velocity_i, expected_velocity_i);
+ ASSERT_PRED2(lc::MatrixEquality<6>, imu_augmented_state.velocity().matrix(), expected_velocity.matrix());
+ // x = 1/2*a*t^2
+ const double expected_position_i = acceleration_i() * 0.5 * std::pow(num_measurements() * time_increment(), 2);
+ const gtsam::Vector3 expected_position(expected_position_i, expected_position_i, expected_position_i);
+ ASSERT_PRED2(lc::MatrixEquality<6>, imu_augmented_state.pose().translation().matrix(), expected_position.matrix());
+}
+
+TEST_F(ConstantAccelerationTest, AddHalfOfMeasurements) {
+ const lc::CombinedNavState initial_state(gtsam::Pose3::identity(), gtsam::Velocity3::Zero(),
+ gtsam::imuBias::ConstantBias(), 0);
+ const lc::Time imu_augmented_state_start_time = num_measurements() / 2 * time_increment();
+ lc::CombinedNavState imu_augmented_state(gtsam::Pose3::identity(), gtsam::Velocity3::Zero(),
+ gtsam::imuBias::ConstantBias(), imu_augmented_state_start_time);
+ imu_augmentor().PimPredict(initial_state, imu_augmented_state);
+
+ EXPECT_NEAR(imu_augmented_state.timestamp(), num_measurements() * time_increment(), 1e-6);
+ const double expected_velocity_i = acceleration_i() * num_measurements() / 2 * time_increment();
+ const gtsam::Vector3 expected_velocity(expected_velocity_i, expected_velocity_i, expected_velocity_i);
+ ASSERT_PRED2(lc::MatrixEquality<6>, imu_augmented_state.velocity().matrix(), expected_velocity.matrix());
+ // x = 1/2*a*t^2
+ const double expected_position_i = acceleration_i() * 0.5 * std::pow(num_measurements() / 2 * time_increment(), 2);
+ const gtsam::Vector3 expected_position(expected_position_i, expected_position_i, expected_position_i);
+ ASSERT_PRED2(lc::MatrixEquality<6>, imu_augmented_state.pose().translation().matrix(), expected_position.matrix());
+}
+
+TEST_F(ConstantAccelerationTest, AddAllMeasurementsWithAccelBias) {
+ const lc::CombinedNavState initial_state(gtsam::Pose3::identity(), gtsam::Velocity3::Zero(),
+ gtsam::imuBias::ConstantBias(acceleration(), gtsam::Vector3::Zero()), 0);
+ lc::CombinedNavState imu_augmented_state = initial_state;
+ imu_augmentor().PimPredict(initial_state, imu_augmented_state);
+
+ EXPECT_NEAR(imu_augmented_state.timestamp(), num_measurements() * time_increment(), 1e-6);
+ ASSERT_PRED2(lc::MatrixEquality<6>, imu_augmented_state.velocity().matrix(), gtsam::Vector3::Zero().matrix());
+ ASSERT_PRED2(lc::MatrixEquality<6>, imu_augmented_state.pose().translation().matrix(),
+ gtsam::Vector3::Zero().matrix());
+}
+
+TEST_F(ConstantAngularVelocityTest, AddAllMeasurements) {
+ const lc::CombinedNavState initial_state(gtsam::Pose3::identity(), gtsam::Velocity3::Zero(),
+ gtsam::imuBias::ConstantBias(), 0);
+ lc::CombinedNavState imu_augmented_state = initial_state;
+ imu_augmentor().PimPredict(initial_state, imu_augmented_state);
+
+ EXPECT_NEAR(imu_augmented_state.timestamp(), num_measurements() * time_increment(), 1e-6);
+ gtsam::Rot3 expected_orientation =
+ ia::IntegrateAngularVelocities(imu_measurements(), gtsam::Rot3::identity(), initial_state.timestamp());
+ ASSERT_PRED2(lc::MatrixEquality<6>, imu_augmented_state.pose().rotation().matrix(), expected_orientation.matrix());
+}
+
+TEST_F(ConstantAngularVelocityTest, AddHalfOfMeasurements) {
+ const lc::CombinedNavState initial_state(gtsam::Pose3::identity(), gtsam::Velocity3::Zero(),
+ gtsam::imuBias::ConstantBias(), 0);
+ const lc::Time imu_augmented_state_start_time = num_measurements() / 2 * time_increment();
+ lc::CombinedNavState imu_augmented_state(gtsam::Pose3::identity(), gtsam::Velocity3::Zero(),
+ gtsam::imuBias::ConstantBias(), imu_augmented_state_start_time);
+ imu_augmentor().PimPredict(initial_state, imu_augmented_state);
+
+ EXPECT_NEAR(imu_augmented_state.timestamp(), num_measurements() * time_increment(), 1e-6);
+ gtsam::Rot3 expected_orientation =
+ ia::IntegrateAngularVelocities(imu_measurements(), gtsam::Rot3::identity(), imu_augmented_state_start_time);
+ ASSERT_PRED2(lc::MatrixEquality<6>, imu_augmented_state.pose().rotation().matrix(), expected_orientation.matrix());
+}
+
+TEST_F(ConstantAngularVelocityTest, AddAllMeasurementsWithAccelBias) {
+ const lc::CombinedNavState initial_state(gtsam::Pose3::identity(), gtsam::Velocity3::Zero(),
+ gtsam::imuBias::ConstantBias(gtsam::Vector3::Zero(), angular_velocity()), 0);
+ lc::CombinedNavState imu_augmented_state = initial_state;
+ imu_augmentor().PimPredict(initial_state, imu_augmented_state);
+
+ EXPECT_NEAR(imu_augmented_state.timestamp(), num_measurements() * time_increment(), 1e-6);
+ ASSERT_PRED2(lc::MatrixEquality<6>, imu_augmented_state.pose().rotation().matrix(), gtsam::Rot3::identity().matrix());
+}
+
+// Run all the tests that were declared with TEST()
+int main(int argc, char** argv) {
+ testing::InitGoogleTest(&argc, argv);
+ return RUN_ALL_TESTS();
+}
diff --git a/tools/rviz_visualizer/launch/granite_table_visualizer.launch b/localization/imu_augmentor/test/test_imu_augmentor.test
similarity index 91%
rename from tools/rviz_visualizer/launch/granite_table_visualizer.launch
rename to localization/imu_augmentor/test/test_imu_augmentor.test
index b2fa6c62f0..4e44c50ef7 100644
--- a/tools/rviz_visualizer/launch/granite_table_visualizer.launch
+++ b/localization/imu_augmentor/test/test_imu_augmentor.test
@@ -16,7 +16,5 @@
-
-
+
diff --git a/localization/imu_augmentor/test/test_imu_augmentor_wrapper.cc b/localization/imu_augmentor/test/test_imu_augmentor_wrapper.cc
new file mode 100644
index 0000000000..7b3977ca73
--- /dev/null
+++ b/localization/imu_augmentor/test/test_imu_augmentor_wrapper.cc
@@ -0,0 +1,176 @@
+/* Copyright (c) 2017, United States Government, as represented by the
+ * Administrator of the National Aeronautics and Space Administration.
+ *
+ * All rights reserved.
+ *
+ * The Astrobee platform is licensed under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with the
+ * License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations
+ * under the License.
+ */
+
+#include "test_utilities.h" // NOLINT
+#include
+#include
+#include
+#include
+#include
+
+#include
+
+namespace ia = imu_augmentor;
+namespace lc = localization_common;
+namespace lm = localization_measurements;
+
+class ConstantAccelerationTest : public ::testing::Test {
+ public:
+ // Start at time increment so first IMU measurement is after starting combined nav state time
+ ConstantAccelerationTest()
+ : acceleration_i_(0.1),
+ acceleration_(acceleration_i_, acceleration_i_, acceleration_i_),
+ time_increment_(1.0 / 125.0),
+ start_time_(time_increment_),
+ num_measurements_(20) {
+ const ia::ImuAugmentorParams params = ia::DefaultImuAugmentorParams();
+ imu_augmentor_wrapper_.reset(new ia::ImuAugmentorWrapper(params));
+ }
+
+ void SetUp() final {
+ const std::vector imu_measurements =
+ ia::ConstantAccelerationMeasurements(acceleration_, num_measurements_, start_time_, time_increment_);
+ AddMeasurements(imu_measurements);
+ }
+
+ void AddMeasurements(const std::vector& imu_measurements) {
+ for (const auto& imu_measurement : imu_measurements) {
+ const auto imu_msg = ia::ImuMsg(imu_measurement);
+ imu_augmentor_wrapper_->ImuCallback(imu_msg);
+ }
+ }
+
+ void AddCombinedNavState(const lc::CombinedNavState& state) {
+ ff_msgs::GraphState loc_msg;
+ lc::CombinedNavStateToMsg(state, loc_msg);
+ imu_augmentor_wrapper_->LocalizationStateCallback(loc_msg);
+ }
+
+ ia::ImuAugmentorWrapper& imu_augmentor_wrapper() { return *imu_augmentor_wrapper_; }
+
+ double acceleration_i() { return acceleration_i_; }
+
+ const Eigen::Vector3d& acceleration() { return acceleration_; }
+
+ double time_increment() { return time_increment_; }
+
+ double start_time() { return start_time_; }
+
+ int num_measurements() { return num_measurements_; }
+
+ double TotalDuration() { return num_measurements_ * time_increment_; }
+
+ private:
+ std::unique_ptr imu_augmentor_wrapper_;
+ const double acceleration_i_;
+ const Eigen::Vector3d acceleration_;
+ const double time_increment_;
+ const lc::Time start_time_;
+ const int num_measurements_;
+};
+
+TEST_F(ConstantAccelerationTest, AddAllMeasurements) {
+ const lc::CombinedNavState initial_state(gtsam::Pose3::identity(), gtsam::Velocity3::Zero(),
+ gtsam::imuBias::ConstantBias(), 0);
+ AddCombinedNavState(initial_state);
+ const auto imu_augmented_state = imu_augmentor_wrapper().LatestImuAugmentedCombinedNavStateAndCovariances();
+ ASSERT_TRUE(imu_augmented_state != boost::none);
+ EXPECT_NEAR(imu_augmented_state->first.timestamp(), TotalDuration(), 1e-6);
+ const double expected_velocity_i = acceleration_i() * TotalDuration();
+ const gtsam::Vector3 expected_velocity(expected_velocity_i, expected_velocity_i, expected_velocity_i);
+ ASSERT_PRED2(lc::MatrixEquality<6>, imu_augmented_state->first.velocity().matrix(), expected_velocity.matrix());
+ // x = 1/2*a*t^2
+ const double expected_position_i = acceleration_i() * 0.5 * std::pow(TotalDuration(), 2);
+ const gtsam::Vector3 expected_position(expected_position_i, expected_position_i, expected_position_i);
+ ASSERT_PRED2(lc::MatrixEquality<6>, imu_augmented_state->first.pose().translation().matrix(),
+ expected_position.matrix());
+}
+
+TEST_F(ConstantAccelerationTest, AddAllMeasurementsWithHalfwayBias) {
+ // Now add a new combined nav state halfway through with an acceleration bias equal to the constant acceleration
+ // The new latest imu augmented state should have the same pose and velocity as the halfway state
+ const lc::CombinedNavState halfway_state_with_bias(
+ gtsam::Pose3(gtsam::Rot3::identity(), gtsam::Point3(1, 2, 3)), gtsam::Velocity3(4, 5, 6),
+ gtsam::imuBias::ConstantBias(acceleration(), gtsam::Vector3::Zero()), num_measurements() / 2 * time_increment());
+ AddCombinedNavState(halfway_state_with_bias);
+ const auto imu_augmented_state = imu_augmentor_wrapper().LatestImuAugmentedCombinedNavStateAndCovariances();
+
+ ASSERT_TRUE(imu_augmented_state != boost::none);
+ EXPECT_NEAR(imu_augmented_state->first.timestamp(), TotalDuration(), 1e-6);
+ ASSERT_PRED2(lc::MatrixEquality<6>, imu_augmented_state->first.velocity().matrix(),
+ halfway_state_with_bias.velocity().matrix());
+ const gtsam::Point3 expected_translation =
+ halfway_state_with_bias.pose().translation() +
+ halfway_state_with_bias.velocity() * num_measurements() / 2 * time_increment();
+ ASSERT_PRED2(lc::MatrixEquality<6>, imu_augmented_state->first.pose().translation().matrix(), expected_translation);
+}
+
+TEST_F(ConstantAccelerationTest, AddAllMeasurementsTieredBiases) {
+ {
+ const lc::CombinedNavState state_a_no_bias(gtsam::Pose3::identity(), gtsam::Velocity3::Zero(),
+ gtsam::imuBias::ConstantBias(), 0);
+ AddCombinedNavState(state_a_no_bias);
+ const lc::CombinedNavState state_b_half_bias_quarter_time(
+ gtsam::Pose3::identity(), gtsam::Velocity3::Zero(),
+ gtsam::imuBias::ConstantBias(acceleration() / 2.0, gtsam::Vector3::Zero()),
+ num_measurements() / 4 * time_increment());
+ AddCombinedNavState(state_b_half_bias_quarter_time);
+ const auto imu_augmented_state = imu_augmentor_wrapper().LatestImuAugmentedCombinedNavStateAndCovariances();
+ ASSERT_TRUE(imu_augmented_state != boost::none);
+ EXPECT_NEAR(imu_augmented_state->first.timestamp(), TotalDuration(), 1e-6);
+ // Expect half the acceleration for the last three quarters of the imu msgs
+ const double expected_velocity_i = acceleration_i() / 2 * TotalDuration() * 0.75;
+ const gtsam::Vector3 expected_velocity(expected_velocity_i, expected_velocity_i, expected_velocity_i);
+ ASSERT_PRED2(lc::MatrixEquality<6>, imu_augmented_state->first.velocity().matrix(), expected_velocity.matrix());
+ // x = 1/2*a*t^2
+ const double expected_position_i = acceleration_i() / 2.0 * 0.5 * std::pow(TotalDuration() * 0.75, 2);
+ const gtsam::Vector3 expected_position(expected_position_i, expected_position_i, expected_position_i);
+ ASSERT_PRED2(lc::MatrixEquality<6>, imu_augmented_state->first.pose().translation().matrix(),
+ expected_position.matrix());
+ }
+
+ {
+ const lc::CombinedNavState state_c_quarter_bias_half_time_initial_pose_and_velocity(
+ gtsam::Pose3(gtsam::Rot3::identity(), gtsam::Point3(1, 2, 3)), gtsam::Velocity3(4, 5, 6),
+ gtsam::imuBias::ConstantBias(acceleration() / 4.0, gtsam::Vector3::Zero()), TotalDuration() / 2.0);
+ AddCombinedNavState(state_c_quarter_bias_half_time_initial_pose_and_velocity);
+ const auto imu_augmented_state = imu_augmentor_wrapper().LatestImuAugmentedCombinedNavStateAndCovariances();
+ ASSERT_TRUE(imu_augmented_state != boost::none);
+ EXPECT_NEAR(imu_augmented_state->first.timestamp(), TotalDuration(), 1e-6);
+ // Expect 3/4 of the acceleration for the last half of the imu msgs
+ const double expected_velocity_i = acceleration_i() * 0.75 * TotalDuration() * 0.5;
+ const gtsam::Vector3 expected_velocity =
+ state_c_quarter_bias_half_time_initial_pose_and_velocity.velocity() +
+ gtsam::Vector3(expected_velocity_i, expected_velocity_i, expected_velocity_i);
+ ASSERT_PRED2(lc::MatrixEquality<6>, imu_augmented_state->first.velocity().matrix(), expected_velocity.matrix());
+ // x = x_0 + v_0*t + 1/2*a*t^2
+ const double expected_position_i = acceleration_i() * 0.75 * 0.5 * std::pow(TotalDuration() * 0.5, 2);
+ const gtsam::Vector3 expected_position =
+ state_c_quarter_bias_half_time_initial_pose_and_velocity.pose().translation() +
+ state_c_quarter_bias_half_time_initial_pose_and_velocity.velocity() * TotalDuration() * 0.5 +
+ gtsam::Vector3(expected_position_i, expected_position_i, expected_position_i);
+ ASSERT_PRED2(lc::MatrixEquality<6>, imu_augmented_state->first.pose().translation().matrix(),
+ expected_position.matrix());
+ }
+}
+
+// Run all the tests that were declared with TEST()
+int main(int argc, char** argv) {
+ testing::InitGoogleTest(&argc, argv);
+ return RUN_ALL_TESTS();
+}
diff --git a/tools/simulator/arm_sim/launch/arm_sim.launch b/localization/imu_augmentor/test/test_imu_augmentor_wrapper.test
similarity index 86%
rename from tools/simulator/arm_sim/launch/arm_sim.launch
rename to localization/imu_augmentor/test/test_imu_augmentor_wrapper.test
index e8f017c573..fede20d3b6 100644
--- a/tools/simulator/arm_sim/launch/arm_sim.launch
+++ b/localization/imu_augmentor/test/test_imu_augmentor_wrapper.test
@@ -16,6 +16,5 @@
-
-
+
diff --git a/localization/imu_augmentor/test/test_utilities.cc b/localization/imu_augmentor/test/test_utilities.cc
new file mode 100644
index 0000000000..de12c0c5db
--- /dev/null
+++ b/localization/imu_augmentor/test/test_utilities.cc
@@ -0,0 +1,95 @@
+/* Copyright (c) 2017, United States Government, as represented by the
+ * Administrator of the National Aeronautics and Space Administration.
+ *
+ * All rights reserved.
+ *
+ * The Astrobee platform is licensed under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with the
+ * License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations
+ * under the License.
+ */
+
+#include "test_utilities.h" // NOLINT
+#include
+#include
+#include
+
+namespace imu_augmentor {
+namespace lc = localization_common;
+namespace lm = localization_measurements;
+namespace mc = msg_conversions;
+
+ImuAugmentorParams DefaultImuAugmentorParams() {
+ ImuAugmentorParams params;
+ params.gravity = gtsam::Vector3::Zero();
+ params.body_T_imu = gtsam::Pose3::identity();
+ // Filer params are already default none
+ params.filter = imu_integration::ImuFilterParams();
+ params.gyro_sigma = 0.1;
+ params.accel_sigma = 0.1;
+ params.accel_bias_sigma = 0.1;
+ params.gyro_bias_sigma = 0.1;
+ params.integration_variance = 0.1;
+ params.bias_acc_omega_int = 0.1;
+ params.standstill_enabled = true;
+ return params;
+}
+
+std::vector ConstantMeasurements(const Eigen::Vector3d& acceleration,
+ const Eigen::Vector3d& angular_velocity,
+ const int num_measurements, const lc::Time start_time,
+ const double time_increment) {
+ std::vector imu_measurements;
+ for (int i = 0; i < num_measurements; ++i) {
+ const lc::Time time = start_time + i * time_increment;
+ imu_measurements.emplace_back(lm::ImuMeasurement(acceleration, angular_velocity, time));
+ }
+ return imu_measurements;
+}
+
+std::vector ConstantAccelerationMeasurements(const Eigen::Vector3d& acceleration,
+ const int num_measurements, const lc::Time start_time,
+ const double time_increment) {
+ const Eigen::Vector3d zero_angular_velocity(Eigen::Vector3d::Zero());
+ return ConstantMeasurements(acceleration, zero_angular_velocity, num_measurements, start_time, time_increment);
+}
+
+std::vector ConstantAngularVelocityMeasurements(const Eigen::Vector3d& angular_velocity,
+ const int num_measurements,
+ const lc::Time start_time,
+ const double time_increment) {
+ const Eigen::Vector3d zero_acceleration(Eigen::Vector3d::Zero());
+ return ConstantMeasurements(zero_acceleration, angular_velocity, num_measurements, start_time, time_increment);
+}
+
+gtsam::Rot3 IntegrateAngularVelocities(const std::vector& imu_measurements,
+ const gtsam::Rot3& starting_orientation,
+ const localization_common::Time starting_time) {
+ gtsam::Rot3 integrated_orientation = starting_orientation;
+ lc::Time integrated_time = starting_time;
+ for (const auto& imu_measurement : imu_measurements) {
+ if (imu_measurement.timestamp <= integrated_time) continue;
+ const double dt = imu_measurement.timestamp - integrated_time;
+ integrated_time = imu_measurement.timestamp;
+ // TODO(rsoussan): subtract ang vel bias first!! add this as param!!
+ const gtsam::Rot3 orientation_update = gtsam::Rot3::Expmap(imu_measurement.angular_velocity * dt);
+ integrated_orientation = integrated_orientation * orientation_update;
+ }
+ return integrated_orientation;
+}
+
+sensor_msgs::Imu ImuMsg(const localization_measurements::ImuMeasurement& imu_measurement) {
+ sensor_msgs::Imu imu_msg;
+ msg_conversions::VectorToMsg(imu_measurement.acceleration, imu_msg.linear_acceleration);
+ msg_conversions::VectorToMsg(imu_measurement.angular_velocity, imu_msg.angular_velocity);
+ lc::TimeToHeader(imu_measurement.timestamp, imu_msg.header);
+ return imu_msg;
+}
+} // namespace imu_augmentor
diff --git a/localization/imu_augmentor/test/test_utilities.h b/localization/imu_augmentor/test/test_utilities.h
new file mode 100644
index 0000000000..6a9397c339
--- /dev/null
+++ b/localization/imu_augmentor/test/test_utilities.h
@@ -0,0 +1,53 @@
+/* Copyright (c) 2017, United States Government, as represented by the
+ * Administrator of the National Aeronautics and Space Administration.
+ *
+ * All rights reserved.
+ *
+ * The Astrobee platform is licensed under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with the
+ * License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations
+ * under the License.
+ */
+
+#ifndef IMU_AUGMENTOR_TEST_UTILITIES_H_ // NOLINT
+#define IMU_AUGMENTOR_TEST_UTILITIES_H_ // NOLINT
+
+#include
+#include
+#include
+#include
+
+#include
+
+namespace imu_augmentor {
+ImuAugmentorParams DefaultImuAugmentorParams();
+
+std::vector ConstantMeasurements(const Eigen::Vector3d& acceleration,
+ const Eigen::Vector3d& angular_velocity,
+ const int num_measurements,
+ const localization_common::Time start_time,
+ const double time_increment);
+
+std::vector ConstantAccelerationMeasurements(
+ const Eigen::Vector3d& acceleration, const int num_measurements, const localization_common::Time start_time,
+ const double time_increment);
+
+std::vector ConstantAngularVelocityMeasurements(
+ const Eigen::Vector3d& angular_velocity, const int num_measurements, const localization_common::Time start_time,
+ const double time_increment);
+
+gtsam::Rot3 IntegrateAngularVelocities(const std::vector& imu_measurements,
+ const gtsam::Rot3& starting_orientation,
+ const localization_common::Time starting_time);
+
+sensor_msgs::Imu ImuMsg(const localization_measurements::ImuMeasurement& imu_measurement);
+} // namespace imu_augmentor
+
+#endif // IMU_AUGMENTOR_TEST_UTILITIES_H_ // NOLINT
diff --git a/localization/imu_integration/CMakeLists.txt b/localization/imu_integration/CMakeLists.txt
index 7d07b77bed..1a7b581447 100644
--- a/localization/imu_integration/CMakeLists.txt
+++ b/localization/imu_integration/CMakeLists.txt
@@ -15,17 +15,67 @@
#License for the specific language governing permissions and limitations
#under the License.
+cmake_minimum_required(VERSION 3.0)
project(imu_integration)
+## Compile as C++14, supported in ROS Kinetic and newer
+add_compile_options(-std=c++14)
+
+## Find catkin macros and libraries
+find_package(catkin2 REQUIRED COMPONENTS
+ config_reader
+ localization_common
+ localization_measurements
+)
+
+# System dependencies are found with CMake's conventions
+find_package(Eigen3 REQUIRED)
+
catkin_package(
- LIBRARIES ${PROJECT_NAME} ${GLOG_LIBRARIES} ${GTSAM_LIBRARIES} config_reader localization_common localization_measurements
+ LIBRARIES ${PROJECT_NAME} ${GLOG_LIBRARIES} ${GTSAM_LIBRARIES}
INCLUDE_DIRS include ${GTSAM_INCLUDE_DIR} ${GLOG_INCLUDE_DIRS}
- CATKIN_DEPENDS
- DEPENDS gtsam
+ CATKIN_DEPENDS config_reader localization_common localization_measurements
+)
+
+###########
+## Build ##
+###########
+
+# Specify additional locations of header files
+include_directories(
+ include
+ ${catkin_INCLUDE_DIRS}
+ ${EIGEN3_INCLUDE_DIRS}
+ ${GLOG_INCLUDE_DIRS}
+)
+
+# Declare C++ libraries
+add_library(${PROJECT_NAME}
+ src/dynamic_imu_filter.cc
+ src/identity_filter.cc
+ src/imu_filter.cc
+ src/imu_integrator.cc
+ src/latest_imu_integrator.cc
+ src/utilities.cc
+)
+add_dependencies(${PROJECT_NAME} ${catkin_EXPORTED_TARGETS})
+target_link_libraries(${PROJECT_NAME} ${catkin_LIBRARIES})
+
+
+#############
+## Install ##
+#############
+
+# Mark libraries for installation
+install(TARGETS ${PROJECT_NAME}
+ ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
+ LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
+ RUNTIME DESTINATION ${CATKIN_GLOBAL_BIN_DESTINATION}
)
-create_library(TARGET ${PROJECT_NAME}
- LIBS ${catkin_LIBRARIES} ${GLOG_LIBRARIES} config_reader localization_common localization_measurements
- INC ${catkin_INCLUDE_DIRS} ${GLOG_INCLUDE_DIRS}
- DEPS gtsam
+# Mark cpp header files for installation
+install(DIRECTORY include/${PROJECT_NAME}/
+ DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION}
+ FILES_MATCHING PATTERN "*.h"
+ PATTERN ".svn" EXCLUDE
)
diff --git a/localization/imu_integration/package.xml b/localization/imu_integration/package.xml
index dde9b9886c..f4bccb1e22 100644
--- a/localization/imu_integration/package.xml
+++ b/localization/imu_integration/package.xml
@@ -14,4 +14,11 @@
Astrobee Flight Software
catkin
+ config_reader
+ localization_common
+ localization_measurements
+ config_reader
+ localization_common
+ localization_measurements
+
diff --git a/localization/interest_point/CMakeLists.txt b/localization/interest_point/CMakeLists.txt
index 58ceb35cdb..2989c725ad 100644
--- a/localization/interest_point/CMakeLists.txt
+++ b/localization/interest_point/CMakeLists.txt
@@ -15,48 +15,55 @@
# License for the specific language governing permissions and limitations
# under the License.
-cmake_minimum_required(VERSION 2.8.3)
+cmake_minimum_required(VERSION 3.0)
project(interest_point)
-set(LIBS
- ${GLOG_LIBRARIES}
- ${GFLAGS_LIBRARIES}
- ${OpenCV_LIBRARIES}
- ${OPENMVG_LIBRARIES}
- ${CERES_LIBRARY}
- )
-set(INCLUDES
- ${CMAKE_CURRENT_SOURCE_DIR}/include
- ${CMAKE_SOURCE_DIR}/common/include
- ${CERES_INCLUDE_DIRS}
- ${EIGEN3_INCLUDE_DIRS}
- ${OpenCV_INCLUDE_DIRS}
- ${OPENMVG_INCLUDE_DIRS}
- ${GFLAGS_INCLUDE_DIRS}
- ${GLOG_INCLUDE_DIRS}
+## Compile as C++14, supported in ROS Kinetic and newer
+add_compile_options(-std=c++14)
+
+## Find catkin macros and libraries
+find_package(catkin2 REQUIRED COMPONENTS
+ roscpp
)
+# System dependencies are found with CMake's conventions
+find_package(cmake_modules REQUIRED)
+find_package(Eigen3 REQUIRED)
+find_package(OpenMVG QUIET REQUIRED)
+
+# Find OpenCV
+SET(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/../../cmake")
+find_package(OpenCV331 REQUIRED)
+
catkin_package(
INCLUDE_DIRS include
- LIBRARIES interest_point
+ LIBRARIES interest_point ${OpenCV_LIBRARIES}
CATKIN_DEPENDS
# DEPENDS system_lib
)
-create_library(TARGET interest_point
- LIBS ${LIBS}
- INC ${INCLUDES}
-)
+###########
+## Build ##
+###########
-set(INTEREST_LIBS
- interest_point
- ff_common
- ${LIBS})
+# Specify additional locations of header files
+include_directories(
+ include
+ ${catkin_INCLUDE_DIRS}
+ ${EIGEN3_INCLUDE_DIR}
+ ${OpenCV_INCLUDE_DIRS}
+ ${OPENMVG_INCLUDE_DIRS}
+)
-create_tool_targets(DIR tools
- LIBS ${INTEREST_LIBS}
- INC ${INCLUDES}
+# Declare C++ libraries
+add_library(interest_point
+ src/agast_score.cc
+ src/brisk.cc
+ src/essential.cc
+ src/matching.cc
)
+add_dependencies(interest_point ${catkin_EXPORTED_TARGETS})
+target_link_libraries(interest_point ${OPENMVG_LIBRARIES} ${catkin_LIBRARIES} ${OpenCV_LIBRARIES})
if(CATKIN_ENABLE_TESTING)
find_package(rostest REQUIRED)
@@ -66,10 +73,25 @@ if(CATKIN_ENABLE_TESTING)
test/test_matching.cc
)
target_link_libraries(test_matching
- interest_point
+ interest_point glog
)
endif()
-set(INTEREST_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/include PARENT_SCOPE)
+#############
+## Install ##
+#############
+
+# Mark libraries for installation
+install(TARGETS ${PROJECT_NAME}
+ ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
+ LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
+ RUNTIME DESTINATION ${CATKIN_GLOBAL_BIN_DESTINATION}
+)
+# Mark cpp header files for installation
+install(DIRECTORY include/${PROJECT_NAME}/
+ DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION}
+ FILES_MATCHING PATTERN "*.h"
+ PATTERN ".svn" EXCLUDE
+)
\ No newline at end of file
diff --git a/localization/interest_point/test/test_matching.cc b/localization/interest_point/test/test_matching.cc
index 6f2ce0d3d1..d623f8c6ed 100644
--- a/localization/interest_point/test/test_matching.cc
+++ b/localization/interest_point/test/test_matching.cc
@@ -73,3 +73,9 @@ TEST_F(MatchingTest, ORGBRISK) {
EXPECT_EQ(64, descriptor1.cols);
EXPECT_LT(50u, matches.size());
}
+
+// Run all the tests that were declared with TEST()
+int main(int argc, char** argv) {
+ testing::InitGoogleTest(&argc, argv);
+ return RUN_ALL_TESTS();
+}
diff --git a/localization/lk_optical_flow/CMakeLists.txt b/localization/lk_optical_flow/CMakeLists.txt
index 5ff2d04f17..79b87e341a 100644
--- a/localization/lk_optical_flow/CMakeLists.txt
+++ b/localization/lk_optical_flow/CMakeLists.txt
@@ -15,22 +15,70 @@
# License for the specific language governing permissions and limitations
# under the License.
+cmake_minimum_required(VERSION 3.0)
project(lk_optical_flow)
-if (USE_ROS)
+## Compile as C++14, supported in ROS Kinetic and newer
+add_compile_options(-std=c++14)
+
+## Find catkin macros and libraries
+find_package(catkin2 REQUIRED COMPONENTS
+ roscpp
+ cv_bridge
+ image_transport
+ nodelet
+ camera
+ ff_util
+)
catkin_package(
+ INCLUDE_DIRS include
LIBRARIES ${PROJECT_NAME}
- CATKIN_DEPENDS roscpp cv_bridge image_transport nodelet
- DEPENDS lk_optical_flow
+ CATKIN_DEPENDS roscpp cv_bridge image_transport nodelet camera ff_util
+)
+
+###########
+## Build ##
+###########
+
+# Specify additional locations of header files
+include_directories(
+ include
+ ${catkin_INCLUDE_DIRS}
)
-create_library(TARGET lk_optical_flow
- LIBS ff_nodelet camera config_reader ${catkin_LIBRARIES}
- INC ${catkin_INCLUDE_DIRS}
- DEPS ff_msgs config_reader camera
+# Declare C++ libraries
+add_library(lk_optical_flow
+ src/lk_optical_flow.cc
+ src/lk_optical_flow_nodelet.cc
)
+add_dependencies(lk_optical_flow ${catkin_EXPORTED_TARGETS})
+target_link_libraries(lk_optical_flow ${catkin_LIBRARIES})
+
+#############
+## Install ##
+#############
-install_launch_files()
+# Mark libraries for installation
+install(TARGETS ${PROJECT_NAME}
+ ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
+ LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
+ RUNTIME DESTINATION ${CATKIN_GLOBAL_BIN_DESTINATION}
+)
+
+# Mark nodelet_plugin for installation
+install(FILES nodelet_plugins.xml
+ DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}
+)
+
+# Mark cpp header files for installation
+install(DIRECTORY include/${PROJECT_NAME}/
+ DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION}
+ FILES_MATCHING PATTERN "*.h"
+ PATTERN ".svn" EXCLUDE
+)
-endif (USE_ROS)
+# Mark launch files for installation
+install(DIRECTORY launch/
+ DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}/launch
+ PATTERN ".svn" EXCLUDE)
diff --git a/localization/lk_optical_flow/package.xml b/localization/lk_optical_flow/package.xml
index 4ae2b03065..33799fcf96 100644
--- a/localization/lk_optical_flow/package.xml
+++ b/localization/lk_optical_flow/package.xml
@@ -19,11 +19,15 @@
roscpp
nodelet
ff_msgs
+ camera
+ ff_util
cv_bridge
image_transport
roscpp
nodelet
ff_msgs
+ camera
+ ff_util
diff --git a/localization/localization_common/CMakeLists.txt b/localization/localization_common/CMakeLists.txt
index 953e1db213..f804327bff 100644
--- a/localization/localization_common/CMakeLists.txt
+++ b/localization/localization_common/CMakeLists.txt
@@ -15,17 +15,88 @@
#License for the specific language governing permissions and limitations
#under the License.
+cmake_minimum_required(VERSION 3.0)
project(localization_common)
+## Compile as C++14, supported in ROS Kinetic and newer
+add_compile_options(-std=c++14)
+
+## Find catkin macros and libraries
+find_package(catkin2 REQUIRED COMPONENTS
+ camera
+ config_reader
+ msg_conversions
+ ff_msgs
+)
+
+# Find GTSAM
+find_package(GTSAM REQUIRED)
+
+# System dependencies are found with CMake's conventions
+find_package(Eigen3 REQUIRED)
+
catkin_package(
- LIBRARIES ${PROJECT_NAME} ${GTSAM_LIBRARIES} camera config_reader msg_conversions
- INCLUDE_DIRS include ${GTSAM_INCLUDE_DIR} ${Boost_INCLUDE_DIRS}
- CATKIN_DEPENDS
- DEPENDS gtsam
+ INCLUDE_DIRS include
+ LIBRARIES ${PROJECT_NAME} ${GTSAM_LIBRARIES} gtsam
+ CATKIN_DEPENDS
+ camera
+ config_reader
+ msg_conversions
+ ff_msgs
+)
+
+###########
+## Build ##
+###########
+
+# Specify additional locations of header files
+include_directories(
+ include
+ ${catkin_INCLUDE_DIRS}
+ ${GTSAM_INCLUDE_DIR}
+ ${EIGEN3_INCLUDE_DIRS}
+)
+
+# Declare C++ libraries
+add_library(${PROJECT_NAME}
+ src/averager.cc
+ src/combined_nav_state.cc
+ src/combined_nav_state_covariances.cc
+ src/rate_timer.cc
+ src/ros_timer.cc
+ src/time.cc
+ src/timer.cc
+ src/test_utilities.cc
+ src/utilities.cc
)
+add_dependencies(${PROJECT_NAME} ${catkin_EXPORTED_TARGETS})
+target_link_libraries(${PROJECT_NAME} ${catkin_LIBRARIES} gtsam)
+
+#############
+## Install ##
+#############
+
+# Mark libraries for installation
+install(TARGETS ${PROJECT_NAME}
+ ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
+ LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
+ RUNTIME DESTINATION ${CATKIN_GLOBAL_BIN_DESTINATION}
+)
+
+if(CATKIN_ENABLE_TESTING)
+ find_package(rostest REQUIRED)
+ add_rostest_gtest(test_utilities_localization_common
+ test/test_utilities.test
+ test/test_utilities.cc
+ )
+ target_link_libraries(test_utilities_localization_common
+ ${PROJECT_NAME}
+ )
+endif()
-create_library(TARGET ${PROJECT_NAME}
- LIBS ${catkin_LIBRARIES} camera config_reader gtsam msg_conversions
- INC ${catkin_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS}
- DEPS
+# Mark cpp header files for installation
+install(DIRECTORY include/${PROJECT_NAME}/
+ DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION}
+ FILES_MATCHING PATTERN "*.h"
+ PATTERN ".svn" EXCLUDE
)
diff --git a/localization/localization_common/include/localization_common/image_correspondences.h b/localization/localization_common/include/localization_common/image_correspondences.h
new file mode 100644
index 0000000000..192d4659f9
--- /dev/null
+++ b/localization/localization_common/include/localization_common/image_correspondences.h
@@ -0,0 +1,43 @@
+/* Copyright (c) 2017, United States Government, as represented by the
+ * Administrator of the National Aeronautics and Space Administration.
+ *
+ * All rights reserved.
+ *
+ * The Astrobee platform is licensed under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with the
+ * License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations
+ * under the License.
+ */
+#ifndef LOCALIZATION_COMMON_IMAGE_CORRESPONDENCES_H_
+#define LOCALIZATION_COMMON_IMAGE_CORRESPONDENCES_H_
+
+#include
+
+#include
+
+namespace localization_common {
+struct ImageCorrespondences {
+ ImageCorrespondences(const std::vector& image_points, const std::vector& points_3d)
+ : image_points(image_points), points_3d(points_3d) {}
+ ImageCorrespondences() {}
+
+ void AddCorrespondence(const Eigen::Vector2d& image_point, const Eigen::Vector3d& point_3d) {
+ image_points.emplace_back(image_point);
+ points_3d.emplace_back(point_3d);
+ }
+
+ size_t size() const { return image_points.size(); }
+
+ std::vector image_points;
+ std::vector points_3d;
+};
+} // namespace localization_common
+
+#endif // LOCALIZATION_COMMON_IMAGE_CORRESPONDENCES_H_
diff --git a/localization/localization_common/include/localization_common/pose_with_covariance.h b/localization/localization_common/include/localization_common/pose_with_covariance.h
new file mode 100644
index 0000000000..67de44e0c9
--- /dev/null
+++ b/localization/localization_common/include/localization_common/pose_with_covariance.h
@@ -0,0 +1,37 @@
+
+/* Copyright (c) 2017, United States Government, as represented by the
+ * Administrator of the National Aeronautics and Space Administration.
+ *
+ * All rights reserved.
+ *
+ * The Astrobee platform is licensed under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with the
+ * License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations
+ * under the License.
+ */
+
+#ifndef LOCALIZATION_COMMON_POSE_WITH_COVARIANCE_H_
+#define LOCALIZATION_COMMON_POSE_WITH_COVARIANCE_H_
+
+#include
+
+namespace localization_common {
+using PoseCovariance = Eigen::Matrix;
+struct PoseWithCovariance {
+ PoseWithCovariance(const Eigen::Isometry3d& pose, const PoseCovariance& covariance)
+ : pose(pose), covariance(covariance) {}
+ Eigen::Isometry3d pose;
+ PoseCovariance covariance;
+
+ EIGEN_MAKE_ALIGNED_OPERATOR_NEW
+};
+} // namespace localization_common
+
+#endif // LOCALIZATION_COMMON_POSE_WITH_COVARIANCE_H_
diff --git a/localization/localization_common/include/localization_common/test_utilities.h b/localization/localization_common/include/localization_common/test_utilities.h
new file mode 100644
index 0000000000..20b03e5237
--- /dev/null
+++ b/localization/localization_common/include/localization_common/test_utilities.h
@@ -0,0 +1,96 @@
+/* Copyright (c) 2017, United States Government, as represented by the
+ * Administrator of the National Aeronautics and Space Administration.
+ *
+ * All rights reserved.
+ *
+ * The Astrobee platform is licensed under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with the
+ * License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations
+ * under the License.
+ */
+
+#ifndef LOCALIZATION_COMMON_TEST_UTILITIES_H_
+#define LOCALIZATION_COMMON_TEST_UTILITIES_H_
+
+#include
+
+namespace localization_common {
+class Sampler {
+ public:
+ Sampler(const double min, const double max, const double count);
+ double Sample(const int increment) const;
+
+ private:
+ const double scale_;
+ const double min_;
+};
+
+// Selected from [-100, 100]
+double RandomDouble();
+
+// Selected from [0, 100]
+double RandomPositiveDouble();
+
+// Selected from [min, max]
+double RandomDouble(const double min, const double max);
+
+double RandomGaussianDouble(const double mean, const double stddev);
+
+bool RandomBool();
+
+// Returns white noise with set stddev
+double Noise(const double stddev);
+
+// Each index ranges from [-100, 100]
+Eigen::Vector3d RandomVector();
+
+// Translation ranges from [-100, 100]
+// Rotation spans all possible rotations
+gtsam::Pose3 RandomPose();
+
+Eigen::Isometry3d RandomIsometry3d();
+
+Eigen::Affine3d RandomAffine3d();
+
+// Focal lengths and principal points selected from [0.1, 1000]
+Eigen::Matrix3d RandomIntrinsics();
+
+Eigen::Isometry3d AddNoiseToIsometry3d(const Eigen::Isometry3d& pose, const double translation_stddev,
+ const double rotation_stddev);
+
+template
+Eigen::Matrix AddNoiseToVector(const Eigen::Matrix& vector, const double noise_stddev);
+
+// Template on tolerance power so this can be used with gtest's ASSERT_PRED2.
+// If pass tolerance as argument, this is no longer a binary function and valid for usage with
+// ASSERT_PRED2.
+template
+bool MatrixEquality(const Eigen::MatrixXd& lhs, const Eigen::MatrixXd& rhs);
+
+template
+Eigen::Matrix AddNoiseToVector(const Eigen::Matrix& vector, const double noise_stddev) {
+ Eigen::Matrix noisy_vector = vector;
+ for (int i = 0; i < vector.rows(); ++i) {
+ noisy_vector(i, 0) += Noise(noise_stddev);
+ }
+ return noisy_vector;
+}
+
+template
+bool MatrixEquality(const Eigen::MatrixXd& lhs, const Eigen::MatrixXd& rhs) {
+ constexpr double tolerance = std::pow(10, -1.0 * TolerancePower);
+ // Seperately check for zero matrices since isApprox fails for these
+ if (lhs.isZero(tolerance) || rhs.isZero(tolerance)) {
+ return lhs.isZero(tolerance) && rhs.isZero(tolerance);
+ }
+ return lhs.isApprox(rhs, tolerance);
+}
+} // namespace localization_common
+#endif // LOCALIZATION_COMMON_TEST_UTILITIES_H_
diff --git a/localization/localization_common/include/localization_common/utilities.h b/localization/localization_common/include/localization_common/utilities.h
index 112fb75b5b..0ebd379b46 100644
--- a/localization/localization_common/include/localization_common/utilities.h
+++ b/localization/localization_common/include/localization_common/utilities.h
@@ -38,6 +38,7 @@
#include
#include
+#include
namespace localization_common {
gtsam::Pose3 LoadTransform(config_reader::ConfigReader& config, const std::string& transform_config_name);
@@ -120,6 +121,21 @@ void CombinedNavStateCovariancesToMsg(const CombinedNavStateCovariances& covaria
msg_conversions::VariancesToCovDiag(covariances.position_variances(), &loc_msg.cov_diag[12]);
}
+Eigen::Isometry3d Isometry3d(const Eigen::Vector3d& translation, const Eigen::Matrix3d& rotation);
+
+double Deg2Rad(const double degrees);
+
+double Rad2Deg(const double radians);
+
+// Assumes angles in degrees, ordered as rho, phi, z
+Eigen::Vector3d CylindricalToCartesian(const Eigen::Vector3d& cylindrical_coordinates);
+
+// Uses Euler Angles in intrinsic ypr representation in degrees
+Eigen::Matrix3d RotationFromEulerAngles(const double yaw, const double pitch, const double roll);
+
+Eigen::Vector2d FocalLengths(const Eigen::Matrix3d& intrinsics);
+
+Eigen::Vector2d PrincipalPoints(const Eigen::Matrix3d& intrinsics);
} // namespace localization_common
#endif // LOCALIZATION_COMMON_UTILITIES_H_
diff --git a/localization/localization_common/package.xml b/localization/localization_common/package.xml
index defe706423..2663824daa 100644
--- a/localization/localization_common/package.xml
+++ b/localization/localization_common/package.xml
@@ -14,4 +14,12 @@
Astrobee Flight Software
catkin
+ camera
+ config_reader
+ msg_conversions
+ ff_msgs
+ camera
+ config_reader
+ msg_conversions
+ ff_msgs
diff --git a/localization/localization_common/src/test_utilities.cc b/localization/localization_common/src/test_utilities.cc
new file mode 100644
index 0000000000..1943e386dc
--- /dev/null
+++ b/localization/localization_common/src/test_utilities.cc
@@ -0,0 +1,109 @@
+/* Copyright (c) 2017, United States Government, as represented by the
+ * Administrator of the National Aeronautics and Space Administration.
+ *
+ * All rights reserved.
+ *
+ * The Astrobee platform is licensed under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with the
+ * License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations
+ * under the License.
+ */
+
+#include
+#include
+
+#include
+
+namespace localization_common {
+Sampler::Sampler(const double min, const double max, const double count)
+ : min_(min), scale_((max - min) / static_cast(count - 1)) {}
+
+double Sampler::Sample(const int increment) const { return min_ + increment * scale_; }
+
+double RandomDouble() { return RandomDouble(-100, 100); }
+
+double RandomPositiveDouble() { return RandomDouble(0, 100); }
+
+double RandomDouble(const double min, const double max) {
+ std::random_device dev;
+ std::mt19937 rng(dev());
+ return std::uniform_real_distribution(min, max)(rng);
+}
+
+double RandomGaussianDouble(const double mean, const double stddev) {
+ std::random_device dev;
+ std::mt19937 rng(dev());
+ std::normal_distribution distribution(mean, stddev);
+ return distribution(rng);
+}
+
+bool RandomBool() { return RandomDouble(0, 1) < 0.5; }
+
+double Noise(const double stddev) { return RandomGaussianDouble(0.0, stddev); }
+
+Eigen::Vector3d RandomVector() {
+ // Eigen::Vector3 is constrained to [-1, 1]
+ return RandomDouble() * Eigen::Vector3d::Random();
+}
+
+gtsam::Pose3 RandomPose() {
+ std::random_device dev;
+ std::mt19937 rng(dev());
+ gtsam::Rot3 rot = gtsam::Rot3::Random(rng);
+ gtsam::Point3 trans = RandomVector();
+ return gtsam::Pose3(rot, trans);
+}
+
+Eigen::Isometry3d RandomIsometry3d() {
+ const gtsam::Pose3 random_pose = RandomPose();
+ return EigenPose(random_pose);
+}
+
+Eigen::Affine3d RandomAffine3d() {
+ const Eigen::Isometry3d random_pose = RandomIsometry3d();
+ const double scale = RandomPositiveDouble();
+ Eigen::Affine3d random_affine3d = Eigen::Affine3d::Identity();
+ random_affine3d.translation() = random_pose.translation();
+ random_affine3d.linear() = scale * random_pose.linear();
+ return random_affine3d;
+}
+
+Eigen::Matrix3d RandomIntrinsics() {
+ Eigen::Matrix3d intrinsics = Eigen::Matrix3d::Identity();
+ const double f_x = RandomGaussianDouble(500, 20);
+ // Ensure that focal lengths are quite similar
+ const double f_y = RandomGaussianDouble(f_x, 5);
+ const double p_x = RandomGaussianDouble(640, 50);
+ const double p_y = RandomGaussianDouble(480, 50);
+
+ intrinsics(0, 0) = f_x;
+ intrinsics(1, 1) = f_y;
+ intrinsics(0, 2) = p_x;
+ intrinsics(1, 2) = p_y;
+ return intrinsics;
+}
+
+Eigen::Isometry3d AddNoiseToIsometry3d(const Eigen::Isometry3d& pose, const double translation_stddev,
+ const double rotation_stddev) {
+ const double mean = 0.0;
+ std::random_device dev;
+ std::mt19937 rng(dev());
+ std::normal_distribution translation_distribution(mean, translation_stddev);
+ std::normal_distribution rotation_distribution(mean, rotation_stddev);
+
+ const Eigen::Vector3d translation_noise(translation_distribution(rng), translation_distribution(rng),
+ translation_distribution(rng));
+ const Eigen::Matrix3d rotation_noise(
+ RotationFromEulerAngles(rotation_distribution(rng), rotation_distribution(rng), rotation_distribution(rng)));
+
+ Eigen::Isometry3d pose_noise = Isometry3d(translation_noise, rotation_noise);
+ return pose * pose_noise;
+}
+} // namespace localization_common
diff --git a/localization/localization_common/src/utilities.cc b/localization/localization_common/src/utilities.cc
index 6386db115e..6cb275d65b 100644
--- a/localization/localization_common/src/utilities.cc
+++ b/localization/localization_common/src/utilities.cc
@@ -146,4 +146,41 @@ gtsam::Vector3 RemoveGravityFromAccelerometerMeasurement(const gtsam::Vector3& g
// Add gravity correction to measurement to offset negatively measured gravity
return (uncorrected_accelerometer_measurement + imu_F_gravity);
}
+
+Eigen::Isometry3d Isometry3d(const Eigen::Vector3d& translation, const Eigen::Matrix3d& rotation) {
+ Eigen::Isometry3d pose = Eigen::Isometry3d::Identity();
+ pose.translation() = translation;
+ pose.linear() = rotation;
+ return pose;
+}
+
+double Deg2Rad(const double degrees) { return M_PI / 180.0 * degrees; }
+
+double Rad2Deg(const double radians) { return 180.0 / M_PI * radians; }
+
+Eigen::Vector3d CylindricalToCartesian(const Eigen::Vector3d& cylindrical_coordinates) {
+ Eigen::Vector3d cartesian_coordinates;
+ cartesian_coordinates.x() = cylindrical_coordinates[0] * std::cos(Deg2Rad(cylindrical_coordinates[1]));
+ cartesian_coordinates.y() = cylindrical_coordinates[0] * std::sin(Deg2Rad(cylindrical_coordinates[1]));
+ cartesian_coordinates.z() = cylindrical_coordinates[2];
+ return cartesian_coordinates;
+}
+
+Eigen::Matrix3d RotationFromEulerAngles(const double yaw, const double pitch, const double roll) {
+ const Eigen::AngleAxisd yaw_aa = Eigen::AngleAxisd(Deg2Rad(yaw), Eigen::Vector3d::UnitZ());
+ const Eigen::AngleAxisd pitch_aa = Eigen::AngleAxisd(Deg2Rad(pitch), Eigen::Vector3d::UnitY());
+ const Eigen::AngleAxisd roll_aa = Eigen::AngleAxisd(Deg2Rad(roll), Eigen::Vector3d::UnitX());
+ // For intrinsics euler angle convention, yaw, pitch, then roll in intrinsic body frame is equivalent to
+ // roll, pitch, then yaw in extrinsic global frame
+ const Eigen::Matrix3d rotation(roll_aa * pitch_aa * yaw_aa);
+ return rotation;
+}
+
+Eigen::Vector2d FocalLengths(const Eigen::Matrix3d& intrinsics) {
+ return Eigen::Vector2d(intrinsics(0, 0), intrinsics(1, 1));
+}
+
+Eigen::Vector2d PrincipalPoints(const Eigen::Matrix3d& intrinsics) {
+ return Eigen::Vector2d(intrinsics(0, 2), intrinsics(1, 2));
+}
} // namespace localization_common
diff --git a/localization/localization_common/test/test_utilities.cc b/localization/localization_common/test/test_utilities.cc
new file mode 100644
index 0000000000..b871e0465d
--- /dev/null
+++ b/localization/localization_common/test/test_utilities.cc
@@ -0,0 +1,53 @@
+/* Copyright (c) 2017, United States Government, as represented by the
+ * Administrator of the National Aeronautics and Space Administration.
+ *
+ * All rights reserved.
+ *
+ * The Astrobee platform is licensed under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with the
+ * License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations
+ * under the License.
+ */
+
+#include
+#include
+#include
+
+#include
+
+namespace lc = localization_common;
+TEST(UtilitiesTester, Deg2Rad2Deg) {
+ for (int i = 0; i < 500; ++i) {
+ const double degrees = lc::RandomDouble(-360.0, 360.0);
+ const double radians = lc::Deg2Rad(degrees);
+ const double degrees_again = lc::Rad2Deg(radians);
+ ASSERT_NEAR(degrees, degrees_again, 1e-6);
+ }
+}
+
+TEST(UtilitiesTester, EulerAngles) {
+ for (int i = 0; i < 500; ++i) {
+ const double yaw = lc::RandomDouble(-360.0, 360.0);
+ const double pitch = lc::RandomDouble(-360.0, 360.0);
+ const double roll = lc::RandomDouble(-360.0, 360.0);
+ const Eigen::Matrix3d rotation = lc::RotationFromEulerAngles(yaw, pitch, roll);
+ // ypr intrinsics equivalent to rpy extrinsics, and Eigen uses extrinsics convention
+ const Eigen::Vector3d angles = rotation.eulerAngles(0, 1, 2);
+ const Eigen::Matrix3d rotation_again =
+ lc::RotationFromEulerAngles(lc::Rad2Deg(angles[2]), lc::Rad2Deg(angles[1]), lc::Rad2Deg(angles[0]));
+ ASSERT_TRUE(rotation.matrix().isApprox(rotation_again.matrix(), 1e-6));
+ }
+}
+
+// Run all the tests that were declared with TEST()
+int main(int argc, char** argv) {
+ testing::InitGoogleTest(&argc, argv);
+ return RUN_ALL_TESTS();
+}
diff --git a/tools/simulator/eps_sim/launch/eps_sim.launch b/localization/localization_common/test/test_utilities.test
similarity index 86%
rename from tools/simulator/eps_sim/launch/eps_sim.launch
rename to localization/localization_common/test/test_utilities.test
index 7cd4e5c75e..ff23a5eec9 100644
--- a/tools/simulator/eps_sim/launch/eps_sim.launch
+++ b/localization/localization_common/test/test_utilities.test
@@ -16,6 +16,5 @@
-
-
+
diff --git a/localization/localization_manager/CMakeLists.txt b/localization/localization_manager/CMakeLists.txt
index 17964c6dfb..a8d82d33ca 100644
--- a/localization/localization_manager/CMakeLists.txt
+++ b/localization/localization_manager/CMakeLists.txt
@@ -15,8 +15,24 @@
# License for the specific language governing permissions and limitations
# under the License.
+cmake_minimum_required(VERSION 3.0)
project(localization_manager)
+## Compile as C++14, supported in ROS Kinetic and newer
+add_compile_options(-std=c++14)
+
+## Find catkin macros and libraries
+find_package(catkin2 REQUIRED COMPONENTS
+ roscpp
+ actionlib
+ nodelet
+ pluginlib
+ ff_msgs
+ std_msgs
+ std_srvs
+ ff_util
+)
+
catkin_package(
LIBRARIES
localization_manager
@@ -28,12 +44,44 @@ catkin_package(
ff_msgs
std_msgs
std_srvs
+ ff_util
+)
+
+###########
+## Build ##
+###########
+
+# Specify additional locations of header files
+include_directories(
+ include
+ ${catkin_INCLUDE_DIRS}
+)
+
+# Declare C++ libraries
+add_library(localization_manager
+ src/localization_manager_nodelet.cc
+)
+add_dependencies(localization_manager ${catkin_EXPORTED_TARGETS})
+target_link_libraries(localization_manager ${catkin_LIBRARIES})
+
+
+#############
+## Install ##
+#############
+
+# Mark libraries for installation
+install(TARGETS ${PROJECT_NAME}
+ ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
+ LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
+ RUNTIME DESTINATION ${CATKIN_GLOBAL_BIN_DESTINATION}
)
-create_library(TARGET localization_manager
- LIBS ${catkin_LIBRARIES} ff_common ff_nodelet config_server
- INC ${catkin_INCLUDE_DIRS}
- DEPS ff_msgs
+# Mark nodelet_plugin for installation
+install(FILES nodelet_plugins.xml
+ DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}
)
-install_launch_files()
+# Mark launch files for installation
+install(DIRECTORY launch/
+ DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}/launch
+ PATTERN ".svn" EXCLUDE)
diff --git a/localization/localization_manager/include/localization_manager/localization_pipeline.h b/localization/localization_manager/include/localization_manager/localization_pipeline.h
index 0f6911a90f..060652725d 100644
--- a/localization/localization_manager/include/localization_manager/localization_pipeline.h
+++ b/localization/localization_manager/include/localization_manager/localization_pipeline.h
@@ -29,7 +29,7 @@
#include
#include
-// C++11
+// C++ includes
#include
#include
#include