Skip to content

Commit

Permalink
Merge pull request #57 from ethz-adrl/devel
Browse files Browse the repository at this point in the history
prepare release 3.0.2
  • Loading branch information
markusgft authored Dec 24, 2019
2 parents f5f8cf9 + afaaae6 commit af3ea07
Show file tree
Hide file tree
Showing 708 changed files with 3,729 additions and 163,156 deletions.
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,14 @@ CMakeCache.txt
*.cmake
!clang-cxx-dev-tools.cmake
!compilerSettings.cmake
!ct-cmake-helpers.cmake
!FindIPOPT.cmake
!Findblasfeo.cmake
!Findhpipm.cmake
!FindCppAD.cmake
!FindCppADCG.cmake
!Findllvm.cmake
!Findclang.cmake
!ct_core/cmake/ct_coreConfig.cmake
!ct_optcon/cmake/ct_optconConfig.cmake
!ct_rbd/cmake/ct_rbdConfig.cmake
Expand Down
8 changes: 4 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ cache:
language: generic
matrix:
include:
- name: "Xenial kinetic"
dist: xenial
env: ROS_DISTRO=kinetic
- name: "Bionic melodic"
dist: bionic
env: ROS_DISTRO=melodic

env:
global:
Expand Down Expand Up @@ -82,7 +82,7 @@ script:
- cd ~/catkin_ws
- catkin clean --all
- catkin config --blacklist ct_doc
- catkin build -DBUILD_TESTS=true -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS="-w"
- catkin build -DUSE_CLANG=true -DBUILD_TESTS=true -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS="-w"
# Run the tests, ensuring the path is set correctly.
# we do not want to run the kindr tests
- catkin config --blacklist kindr
Expand Down
8 changes: 1 addition & 7 deletions NOTICE.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,11 @@ Copyright 2014-2018 ETH Zurich
This software has been developed at the Agile & Dexterous Robotics Lab
at ETH Zurich under the lead of Michael Neunert and Markus Giftthaler.

Software included in any folder named "external" and any subsequent
subfolders is software developed by third parties and not by the
authors above. Thererfore, neither the developers nor the institution
listed above holds copyright for this external software. Furthermore,
external software might be distributed under different licences
agreements included in the subfolders.

Authors:

Michael Neunert,
Markus Giftthaler,
Michael Neunert,
Markus Stäuble,
Diego Pardo,
Farbod Farshidian,
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Control Toolbox
![Travis (.org) branch](https://img.shields.io/travis/ethz-adrl/control-toolbox/3.0.1.svg?style=popout-square)
![Travis (.org) branch](https://img.shields.io/travis/ethz-adrl/control-toolbox/3.0.2.svg?style=popout-square)
![GitHub top language](https://img.shields.io/github/languages/top/ethz-adrl/control-toolbox.svg?style=social)
![GitHub](https://img.shields.io/github/license/ethz-adrl/control-toolbox.svg?style=social)

Expand Down
2 changes: 1 addition & 1 deletion ct/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 3.3)
project(ct VERSION 3.0.1 LANGUAGES CXX)
project(ct VERSION 3.0.2 LANGUAGES CXX)

#Make sure metapackage does not fail when building documentation
add_custom_target(doc
Expand Down
12 changes: 12 additions & 0 deletions ct/cmake/ct-cmake-helpers.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@

# import interface compile definitions from ext_target as cmake option
function(importInterfaceCompileDefinitionsAsOptions ext_target)

get_property(_if_compile_defs TARGET ${ext_target} PROPERTY INTERFACE_COMPILE_DEFINITIONS)

foreach( i ${_if_compile_defs} )
set(${i} ON PARENT_SCOPE) # mark all interface compile definitions as options
message(STATUS "Importing compile definition " ${i} " as option.")
endforeach()

endfunction()
28 changes: 28 additions & 0 deletions ct/install_cppadcg.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#!/bin/bash

## get llvm
yes Y | sudo apt-get install llvm

## get clang
# todo

## install CppAD
mkdir /tmp/cppadcg_deps
cd /tmp/cppadcg_deps
wget https://github.com/coin-or/CppAD/archive/20190200.4.tar.gz
tar -xzf 20190200.4.tar.gz
cd CppAD-20190200.4
mkdir build
cd build
cmake -Dcppad_prefix:PATH='/usr/local' ..
sudo make install


## install CppADCodeGen
git clone https://github.com/joaoleal/CppADCodeGen.git /tmp/CppADCodeGen
cd /tmp/CppADCodeGen
mkdir -p build
cd build
cmake .. #-DLLVM_VERSION=6.0
make
sudo make install
19 changes: 14 additions & 5 deletions ct/install_deps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,25 @@
sudo apt-get update

## get lapack
sudo apt-get install liblapack-dev
yes Y | sudo apt-get install liblapack-dev

## get eigen3
sudo apt-get install libeigen3-dev
yes Y | sudo apt-get install libeigen3-dev

## get cmake
sudo apt-get install cmake
yes Y | sudo apt-get install cmake

## get IPOPT
sudo apt-get install coinor-libipopt-dev
yes Y | sudo apt-get install coinor-libipopt-dev

## get boost
sudo apt-get install libboost-all-dev
yes Y | sudo apt-get install libboost-all-dev

## get open mp
yes Y | sudo apt install libomp-dev

## get clang
yes Y | sudo apt install clang

## get CppAD and CppADCodeGen
sudo ./install_cppadcg.sh
20 changes: 20 additions & 0 deletions ct/install_hpipm.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/bin/bash

## get blasfeo 0.1.1
echo "now installing blasfeo 0.1.1 ..."
cd /tmp
git clone https://github.com/giaf/blasfeo.git
cd /tmp/blasfeo
git checkout 0.1.1 # we currently are on this release
make static_library
sudo make install_static

## get hpipm 0.1.1
echo "now installing hpipm 0.1.1 ..."
cd /tmp
git clone https://github.com/giaf/hpipm.git
cd /tmp/hpipm
git checkout 806c845
make static_library
make examples
sudo make install_static
4 changes: 2 additions & 2 deletions ct/package.xml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<package>
<name>ct</name>
<version>3.0.1</version>
<version>3.0.2</version>
<description>
ADRL Control Toolbox 3.0.1
ADRL Control Toolbox 3.0.2
</description>
<maintainer email="[email protected]">Markus Giftthaler</maintainer>
<license>BSD-2</license>
Expand Down
64 changes: 45 additions & 19 deletions ct_core/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ include(${CMAKE_CURRENT_SOURCE_DIR}/../ct/cmake/explicitTemplateHelpers.cmake)
include(${CMAKE_CURRENT_SOURCE_DIR}/../ct/cmake/clang-cxx-dev-tools.cmake)


project(ct_core VERSION 3.0.1 LANGUAGES CXX)
project(ct_core VERSION 3.0.2 LANGUAGES CXX)


set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake)
Expand All @@ -14,13 +14,44 @@ set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -pthread -std=c++14 -Wall
set(CMAKE_EXPORT_COMPILE_COMMANDS TRUE)


set(ct_core_LIBS "")

## find and include required dependencies
find_package(Eigen3 REQUIRED)
find_package(Boost COMPONENTS REQUIRED)

set(ct_core_LIBS "")

## find and include optional dependencies
find_package(llvm QUIET)
find_package(clang QUIET)
if(LLVM_FOUND AND CLANG_FOUND)
message(STATUS "Found LLVM/CLANG version " ${LLVM_VERSION_MAJOR}.${LLVM_VERSION_MINOR})
set (LLVM ON)
list(APPEND ct_core_COMPILE_DEFINITIONS LLVM_VERSION_MAJOR=${LLVM_VERSION_MAJOR})
list(APPEND ct_core_COMPILE_DEFINITIONS LLVM_VERSION_MINOR=${LLVM_VERSION_MINOR})
list(APPEND ct_core_LIBS ${CLANG_LIBS})
list(APPEND ct_core_LIBS ${LLVM_MODULE_LIBS})
list(APPEND ct_core_target_include_dirs ${LLVM_INCLUDE_DIRS})
list(APPEND ct_core_target_include_dirs ${CLANG_INCLUDE_DIRS})
else()
message(STATUS "Could not find LLVM/CLANG, LLVM-JIT will not be available")
endif()
find_package(CppAD QUIET)
if(CPPAD_FOUND)
set(CPPAD ON)
list(APPEND ct_core_COMPILE_DEFINITIONS CPPAD)
list(APPEND ct_core_target_include_dirs ${CPPAD_INCLUDE_DIRS})
else()
message(STATUS "Could not find CppAD, auto-diff will not be available")
endif()
find_package(CppADCG QUIET)
if(CPPADCG_FOUND)
set(CPPADCG ON)
list(APPEND ct_core_COMPILE_DEFINITIONS CPPADCG)
list(APPEND ct_core_target_include_dirs ${CPPADCG_INCLUDE_DIRS})
else()
message(STATUS "Could not find CppADCodeGen, derivative code generation will not be available")
endif()

find_package(Qwt QUIET)
find_package(Qt4 QUIET)
if(QWT_FOUND AND Qt4_FOUND)
Expand All @@ -32,15 +63,14 @@ else()
message(STATUS "COMPILING WITHOUT QWT")
endif()

## find and include optional dependencies
find_package(PythonLibs 2.7 QUIET)
if (PYTHONLIBS_FOUND)
message(STATUS "Python found")
list(APPEND ct_plot_COMPILE_DEFINITIONS PLOTTING_ENABLED)
message(STATUS "Found python 2.7")
list(APPEND ct_core_COMPILE_DEFINITIONS PLOTTING_ENABLED)
message(STATUS "Python library path ... " ${PYTHON_LIBRARY})
list(APPEND ct_core_LIBS ${PYTHON_LIBRARY})
else()
message(STATUS "Python not found")
message(STATUS "Python not found, plotting will not be available")
endif()


Expand All @@ -55,16 +85,12 @@ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/include/ct/core/templateDir.h.in ${CM
###################

## define the directories to be included in all ct_core targets
set(ct_core_target_include_dirs
${EIGEN3_INCLUDE_DIR}
${PYTHON_INCLUDE_DIRS}
${QWT_INCLUDE_DIR}
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include/ct/external>
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/examples/include>
$<INSTALL_INTERFACE:include>
$<INSTALL_INTERFACE:include/ct/external>
)
list(APPEND ct_core_target_include_dirs ${EIGEN3_INCLUDE_DIR})
list(APPEND ct_core_target_include_dirs ${PYTHON_INCLUDE_DIRS})
list(APPEND ct_core_target_include_dirs ${QWT_INCLUDE_DIR})
list(APPEND ct_core_target_include_dirs $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>)
list(APPEND ct_core_target_include_dirs $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/examples/include>)
list(APPEND ct_core_target_include_dirs $<INSTALL_INTERFACE:include>)

## declare prespec libraries
set(PRESPEC_LIB_NAMES "")
Expand All @@ -88,11 +114,12 @@ endif()
## create ct_core libraries
add_library(ct_plot SHARED src/core/plot/plot.cpp)
target_include_directories(ct_plot PUBLIC ${ct_core_target_include_dirs})
target_compile_definitions(ct_plot PUBLIC ${ct_plot_COMPILE_DEFINITIONS})
target_compile_definitions(ct_plot PUBLIC ${ct_core_COMPILE_DEFINITIONS})
target_link_libraries(ct_plot ${ct_core_LIBS})

add_library(ct_core INTERFACE)
target_include_directories(ct_core INTERFACE ${ct_core_target_include_dirs})
target_compile_definitions(ct_core INTERFACE ${ct_core_COMPILE_DEFINITIONS})
target_link_libraries(ct_core INTERFACE
${ct_core_LIBS}
${PRESPEC_LIB_NAMES}
Expand Down Expand Up @@ -135,7 +162,6 @@ include(GNUInstallDirs)

## copy the header files
install(DIRECTORY include/ct/core DESTINATION include/ct)
install(DIRECTORY include/ct/external DESTINATION include/ct)
install(DIRECTORY examples/include/ct/core DESTINATION include/ct)

## copy the cmake files required for find_package()
Expand Down
63 changes: 63 additions & 0 deletions ct_core/cmake/FindCppAD.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@

IF (CPPAD_INCLUDES AND CPPAD_LIBRARIES)
SET(CPPAD_FIND_QUIETLY TRUE)
ENDIF ()


IF(DEFINED CPPAD_HOME)

FIND_PATH(CPPAD_INCLUDE_DIR NAMES cppad/cppad.hpp
PATHS "${CPPAD_HOME}"
NO_DEFAULT_PATH)

FIND_LIBRARY(CPPAD_IPOPT_LIBRARY
cppad_ipopt
PATHS "${CPPAD_HOME}/lib"
NO_DEFAULT_PATH)

SET(CPPAD_INCLUDE_DIRS ${CPPAD_INCLUDE_DIR})
SET(CPPAD_LIBRARIES ${CPPAD_IPOPT_LIBRARY})

ELSE()

FIND_PACKAGE(PkgConfig)

IF( PKG_CONFIG_FOUND )
pkg_check_modules( CPPAD QUIET cppad)
ENDIF()


IF( NOT CPPAD_FOUND )
FIND_PATH(CPPAD_INCLUDE_DIR NAMES cppad/cppad.hpp
HINTS "$ENV{CPPAD_HOME}"
"/usr/include" )

FIND_LIBRARY(CPPAD_IPOPT_LIBRARY
cppad_ipopt
HINTS "$ENV{CPPAD_HOME}/lib"
"/usr/lib" )

IF( CPPAD_INCLUDE_DIR )
SET(CPPAD_INCLUDE_DIRS ${CPPAD_INCLUDE_DIR})
ENDIF()

IF( CPPAD_IPOPT_LIBRARY )
SET(CPPAD_LIBRARIES ${CPPAD_IPOPT_LIBRARY})
ENDIF()

INCLUDE(FindPackageHandleStandardArgs)
# handle the QUIETLY and REQUIRED arguments and set CPPAD_FOUND to TRUE
# if all listed variables are TRUE
find_package_handle_standard_args(CppAD DEFAULT_MSG
CPPAD_INCLUDE_DIRS)

MARK_AS_ADVANCED(CPPAD_INCLUDE_DIRS CPPAD_LIBRARIES)

ENDIF()
ENDIF()


IF( CPPAD_FOUND AND NOT CPPAD_FIND_QUIETLY )
MESSAGE(STATUS "package CppAD found")
ENDIF()

Loading

0 comments on commit af3ea07

Please sign in to comment.