Skip to content

Commit

Permalink
Merge pull request #120 from personalrobotics/feature/vandercorput_me…
Browse files Browse the repository at this point in the history
…rge_master

Merge master into VanDerCorput Sequence (#37)
  • Loading branch information
ClintLiddick committed Jan 10, 2017
2 parents 022990b + 0f2d320 commit 5adb350
Show file tree
Hide file tree
Showing 528 changed files with 31,273 additions and 3,069 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,6 @@ build/
*.exe
*.out
*.app

# Temp files
*~
9 changes: 7 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ before_install:
- mkdir -p "${HOME}/workspace/src"
- cd "${HOME}/workspace"
- git clone https://github.com/personalrobotics/pr-cleanroom.git scripts
- curl -sS "${DISTRIBUTION}" | ./scripts/internal-convert.py > distribution.yml
- curl -sS "${DISTRIBUTION}" > distribution.yml
- ./scripts/internal-setup.sh
- export PACKAGE_NAMES="$(./scripts/internal-get-packages.py distribution.yml ${REPOSITORY})"
install:
Expand All @@ -20,6 +20,11 @@ install:
script:
- ./scripts/internal-build.sh ${PACKAGE_NAMES}
- ./scripts/internal-test.sh ${PACKAGE_NAMES}
- ./scripts/internal-run.sh catkin build --no-status --no-deps -p 1 --make-args tests test -- aikido
# Manually run Aikido's tests; they are not run automatically because it is not a Catkin package.
- ./scripts/internal-run.sh catkin build --no-status --no-deps -p 1 -i --make-args tests test -- aikido
# Rebuild Aikido in debug mode with coveralls enabled to measure test coverage.
- ./scripts/internal-run.sh catkin clean -y aikido
- ./scripts/internal-run.sh catkin build --no-status --no-deps -p 1 -i --cmake-args -DCMAKE_BUILD_TYPE=Debug -DCOVERALLS=ON -- --make-args all tests -- aikido
- ./scripts/internal-run.sh make -C build/aikido coveralls
after_script:
- ./scripts/view-all-results.sh test_results
250 changes: 250 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,250 @@
# CMake 2.8.12 or above is required for CMakeParseArguments.
# CMake 2.8.11 or above is required for target_include_directories.
cmake_minimum_required(VERSION 2.8.12)
project(aikido)

list(INSERT CMAKE_MODULE_PATH 0 "${PROJECT_SOURCE_DIR}/cmake")

#==============================================================================
# Configuration Options
#

set(INCLUDE_INSTALL_DIR "include")
set(LIBRARY_INSTALL_DIR "lib")
set(CONFIG_INSTALL_DIR "${LIBRARY_INSTALL_DIR}/${PROJECT_NAME}/cmake")

option(COVERALLS "Enable coveralls support" OFF)
option(COVERALLS_UPLOAD "Upload coveralls JSON output" ON)
option(DOWNLOAD_TAGFILES "Download Doxygen tagfiles for dependencies" OFF)

#==============================================================================
# Coveralls Setup
#
define_property(GLOBAL PROPERTY COVERALLS_SOURCES
BRIEF_DOCS "Source files that Coveralls evaluates for test coverage."
FULL_DOCS "Source files that Coveralls evaluates for test coverage."
)

function(coveralls_add_sources)
foreach(source ${ARGN})
get_filename_component(source_abs
"${CMAKE_CURRENT_LIST_DIR}/${source}" ABSOLUTE)
if(EXISTS "${source_abs}")
set_property(GLOBAL APPEND PROPERTY COVERALLS_SOURCES "${source_abs}")
else()
message(FATAL_ERROR
"Source file '${source}' does not exist at absolute path"
" '${source_abs}'. This should never happen. Did you recently delete"
" this file or modify 'CMAKE_CURRENT_LIST_DIR'")
endif()
endforeach()
endfunction()

if(COVERALLS)
include(Coveralls)
coveralls_turn_on_coverage()
endif()

#==============================================================================
# Helper functions.
#
function(evaluate_condition output_variable)
if(${ARGN})
set("${output_variable}" TRUE PARENT_SCOPE)
else()
set("${output_variable}" FALSE PARENT_SCOPE)
endif()
endfunction()

function(aikido_space_delimit output_variable input_list)
set(accumulator)
foreach(input_element ${input_list})
set(accumulator "${accumulator} ${input_element}")
endforeach()

set("${output_variable}" "${accumulator}" PARENT_SCOPE)
endfunction()

macro(aikido_check_package variable component dependency)
if(${${variable}_FOUND})
message(STATUS "Looking for ${dependency} - version ${${variable}_VERSION}"
" found")
else()
message(STATUS "Looking for ${dependency} - NOT found, to use"
" ${component}, please install ${dependency}")
return()
endif()
endmacro()

#==============================================================================
# Register an Aikido test.
#
set_property(GLOBAL PROPERTY AIKIDO_TESTS)

function(aikido_add_test target_name)
add_executable("${target_name}" ${ARGN})
add_test("${target_name}" "${target_name}")

target_link_libraries("${target_name}" gtest gtest_main)

set_property(GLOBAL APPEND PROPERTY AIKIDO_TESTS "${target_name}")
endfunction()

#==============================================================================
# Required Dependencies
#
include(Components)
initialize_component_helpers(aikido)
include(CMakePackageConfigHelpers)
include(FindPkgConfig)

find_package(Boost COMPONENTS filesystem)
include_directories(${Boost_INCLUDE_DIRS})

# TODO: utils-urdf should only be required for aikido::perception.
find_package(DART 6.1.0 REQUIRED COMPONENTS optimizer-nlopt utils-urdf CONFIG)
include_directories(${DART_INCLUDE_DIRS})

#==============================================================================
# Libraries and unit tests.
#
# TODO: Add this to each target's DEFINITIONS property.
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")

include_directories("include")

add_subdirectory("src")

enable_testing()
add_subdirectory("tests" EXCLUDE_FROM_ALL)

# Targets to mimic a Catkin package. "tests" builds tests and "test" (or
# "run_tests") runs them.
get_property(all_tests GLOBAL PROPERTY AIKIDO_TESTS)
add_custom_target(tests DEPENDS ${all_tests})
add_custom_target(run_tests COMMAND "${CMAKE_CTEST_COMMAND}")

#==============================================================================
# Doxygen.
#
find_package(Doxygen QUIET)

if(${DOXYGEN_FOUND})
message(STATUS "Looking for Doxygen - version ${DOXYGEN_VERSION} found")

set(DOXYGEN_INPUT_ROOT
"${CMAKE_CURRENT_SOURCE_DIR}/src ${CMAKE_CURRENT_SOURCE_DIR}/include")
set(DOXYGEN_OUTPUT_ROOT "${CMAKE_CURRENT_BINARY_DIR}/doxygen")
set(DOXYGEN_GENERATE_TAGFILE "${DOXYGEN_OUTPUT_ROOT}/aikido.tag")
set(DOXYGEN_HTML_INDEX "${DOXYGEN_OUTPUT_ROOT}/index.html")
set(DOXYGEN_WORKING_DIR "${CMAKE_CURRENT_BINARY_DIR}/doxygen_working")
set(DOXYGEN_EXCLUDE "${CMAKE_CURRENT_SOURCE_DIR}/src/external")

# Strip include_directories() being used by CMake from #include paths.
# TODO: Add per-target INCLUDE_DIRECTORIES properties to this list.
get_property(DOXYGEN_STRIP_FROM_INC_PATH_LIST
DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
PROPERTY INCLUDE_DIRECTORIES)
aikido_space_delimit(DOXYGEN_STRIP_FROM_INC_PATH
"${DOXYGEN_STRIP_FROM_INC_PATH_LIST}")

# Optionally download Doxygen tagfiles for dependencies.
set(DOXYGEN_TAGFILES "")
if(DOWNLOAD_TAGFILES)
set(tagfile_url "http://dartsim.github.io/dart/dart.tag")
message(STATUS "Downloading DART Doxygen tagfile from: ${tagfile_url}")
file(DOWNLOAD "${tagfile_url}" "${DOXYGEN_WORKING_DIR}/dart.tag")
set(DOXYGEN_TAGFILES
"${DOXYGEN_TAGFILES} dart.tag=http://dartsim.github.io/dart/")

is_component(needs_ompl aikido planner_ompl)
if(needs_ompl)
set(tagfile_url "http://ompl.kavrakilab.org/core/ompl.tag")
message(STATUS "Downloading OMPL Doxygen tagfile from: ${tagfile_url}")
file(DOWNLOAD "${tagfile_url}" "${DOXYGEN_WORKING_DIR}/ompl.tag")
set(DOXYGEN_TAGFILES
"${DOXYGEN_TAGFILES} ompl.tag=http://ompl.kavrakilab.org/")
endif()
endif()

# Generate a Doxyfile. This uses the variables:
#
# - DOXYGEN_EXCLUDE
# - DOXYGEN_EXTRA_INPUTS
# - DOXYGEN_GENERATE_TAGFILE
# - DOXYGEN_INPUT_ROOT
# - DOXYGEN_OUTPUT_ROOT
# - DOXYGEN_STRIP_FROM_INC_PATH
# - DOXYGEN_TAGFILES
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/cmake/Doxyfile.in"
"${DOXYGEN_WORKING_DIR}/Doxyfile" @ONLY)

# Create the "docs" target that runs Doxygen.
add_custom_command(OUTPUT "${DOXYGEN_HTML_INDEX}"
COMMAND "${DOXYGEN_EXECUTABLE}"
DEPENDS "${DOXYGEN_WORKING_DIR}/Doxyfile"
WORKING_DIRECTORY "${DOXYGEN_WORKING_DIR}")

add_custom_target(docs
DEPENDS "${DOXYGEN_HTML_INDEX}"
COMMENT "Generating documentation.")

# Create the "view_docs" target that opens the documentation.
if(APPLE)
set(open_command "open")
else()
set(open_command "xdg-open")
endif()

add_custom_target(view_docs "${open_command}" "${DOXYGEN_HTML_INDEX}"
DEPENDS "${DOXYGEN_HTML_INDEX}"
COMMENT "Opening documentation in a web browser.")
else()
message(STATUS "Looking for Doxygen - NOT found, to generate API"
" documentation, please install Doxygen")
endif()

#==============================================================================
# Coveralls.
#
if(COVERALLS)
get_property(sources GLOBAL PROPERTY COVERALLS_SOURCES)

list(LENGTH sources sources_length)
message(STATUS "Running Coveralls on ${sources_length} source files.")

coveralls_setup("${sources}" ${COVERALLS_UPLOAD}
"${PROJECT_SOURCE_DIR}/cmake")
endif()

#==============================================================================
# Installation.
#
install(DIRECTORY "include/"
DESTINATION "${INCLUDE_INSTALL_DIR}")

# Install the package.xml file (to satisfy REP-136).
install(FILES "package.xml"
DESTINATION "share/${PROJECT_NAME}")

# Generate and install CMake configuration files for each component <C>:
# - <C>Component.cmake, which defines:
# - aikido_<C>_DEPENDENCIES: list of component dependencies
# - aikido_<C>_LIBRARIES: list of library targets in this component
# - <C>Targets.cmake, which creates IMPORTED targets
install_component_exports(aikido)

# Generate and install a Config.cmake file. This file includes the
# <C>Component.cmake and <C>Targets.cmake created above. It also uses the
# following variables:
#
# - PACKAGE_INCLUDE_INSTALL_DIR
# - PACKAGE_INCLUDE_DIRS
get_property(PACKAGE_INCLUDE_DIRS GLOBAL
PROPERTY "${PROJECT_NAME}_INCLUDE_DIRS")
configure_package_config_file("cmake/${PROJECT_NAME}Config.cmake.in"
"${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}Config.cmake"
INSTALL_DESTINATION "${CONFIG_INSTALL_DIR}"
PATH_VARS INCLUDE_INSTALL_DIR)
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}Config.cmake"
DESTINATION "${CONFIG_INSTALL_DIR}")
23 changes: 13 additions & 10 deletions aikido/LICENSE → LICENSE
Original file line number Diff line number Diff line change
@@ -1,24 +1,27 @@
Copyright (c) 2014, Pras Velagapudi
Copyright (c) 2016 Carnegie Mellon University
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.
1. 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.
2. 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.

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
3. Neither the name of the 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 HOLDER 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.

25 changes: 19 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# AIKIDO - AI for KIDO [![Build Status](https://travis-ci.com/personalrobotics/aikido.svg?token=1MmAniN9fkMcwpRUTdFq&branch=master)](https://travis-ci.com/personalrobotics/aikido)
# AIKIDO - AI for KIDO [![Build Status](https://travis-ci.org/personalrobotics/aikido.svg?branch=master)](https://travis-ci.org/personalrobotics/aikido) [![Coverage Status](https://coveralls.io/repos/github/personalrobotics/aikido/badge.svg?branch=master)](https://coveralls.io/github/personalrobotics/aikido?branch=master)

> :warning: **Warning:** AIKIDO is under heavy development. These instructions are
> primarily for reference by the developers.
Expand All @@ -10,7 +10,7 @@ optionally integrates with [ROS], through the suite of `aikido_ros` packages, fo
execution on real robots.

### Dependencies
AIKIDO depends on [CMake], [Boost], [DART] \(version 5.0 or above), [OMPL], and the
AIKIDO depends on [CMake], [Boost], [DART] \(version 6.1 or above), [OMPL], and the
Python development headers (`python-dev` on Debian systems). [DART] and AIKIDO both
make heavy use of C++11 and require a modern compiler.

Expand All @@ -35,14 +35,27 @@ with `catkin_make_isolated`. This may dramatically increase your build time, so
[`catkin_tools` package][Catkin Tools], if possible.

### License
AIKIDO is licensed under a BSD license. See [LICENSE](./LICENSE) for more information.
Aikido is licensed under a BSD license. See [LICENSE](./LICENSE) for more
information.

### Authors
AIKIDO was developed by Michael Koval ([**@mkoval**](https://github.com/mkoval))
and Pras Velagapudi ([**@psigen**](https://github.com/psigen)) in the
Aikido is developed by the
[Personal Robotics Lab](https://personalrobotics.ri.cmu.edu/) in the
[Robotics Institute](http://ri.cmu.edu/) at
[Carnegie Mellon University](http://www.cmu.edu/).
[Carnegie Mellon University](http://www.cmu.edu/). The library was started by
Michael Koval ([**@mkoval**](https://github.com/mkoval))
and Pras Velagapudi ([**@psigen**](https://github.com/psigen)). It has received
major contributions from
Shushman Choudhury ([**@Shushman**](https://github.com/Shushman)),
Aaron Johnson ([**@aaronjoh**](https://github.com/aaronjoh)),
Jennifer King ([**@jeking**](https://github.com/jeking04)),
Gilwoo Lee ([**@lgw903**](https://github.com/lgw903)),
and Clint Liddick ([**@ClintLiddick**](https://github.com/ClintLiddick)). We
also would like to thank
Michael Grey ([**@mxgrey**](https://github.com/mxgrey))
and J.S. Lee ([**@jslee02**](https://github.com/jslee02))
for making changes to DART to better support Aikido.


[DART]: http://dartsim.github.io/
[OMPL]: http://ompl.kavrakilab.org/
Expand Down

0 comments on commit 5adb350

Please sign in to comment.