Commit d1ed6fd4 authored by Raphael Memmesheimer's avatar Raphael Memmesheimer

big bang

parents
cmake_minimum_required(VERSION 2.8.3)
project(or_libs)
find_package(catkin REQUIRED COMPONENTS message_generation roscpp_serialization roscpp cv_bridge tf)
set(CMAKE_BUILD_TYPE Release)
#set the default path for built executables to the "bin" directory
set(EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/bin)
#set the default path for built libraries to the "lib" directory
set(LIBRARY_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/lib)
# find and activate OpenMP multicore processing standard
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}")
message(STATUS "Found OpenMP")
endif()
#uncomment if you have defined messages
#rosbuild_genmsg()
#uncomment if you have defined services
#rosbuild_gensrv()
#common commands for building c++ executables and libraries
#rosbuild_add_library(${PROJECT_NAME} src/example.cpp)
#target_link_libraries(${PROJECT_NAME} another_library)
#rosbuild_add_boost_directories()
#rosbuild_link_boost(${PROJECT_NAME} thread)
#rosbuild_add_executable(example examples/example.cpp)
#target_link_libraries(example ${PROJECT_NAME})
##############################################################################
# Required 3rd party
##############################################################################
include_directories(
${catkin_INCLUDE_DIRS}
src
$ENV{HOMER_DIR}/catkin_ws/src/Libraries/robbie_architecture/src
)
add_subdirectory(src/ConnectedComponentAnalyzer)
add_subdirectory(src/KeyPointExtraction)
add_subdirectory(src/ObjectRecognition)
add_subdirectory(src/ParallelSurf)
catkin_package(
INCLUDE_DIRS src
CATKIN_DEPENDS message_runtime std_msgs sensor_msgs roscpp_serialization
LIBRARIES ConnectedComponentAnalyzer KeyPointExtraction ObjectRecognition ParallelSurf
)
set(_CATKIN_CURRENT_PACKAGE "catkin")
set(catkin_VERSION "0.5.77")
set(catkin_MAINTAINER "Dirk Thomas <dthomas@osrfoundation.org>")
set(catkin_BUILD_DEPENDS "gtest" "python-argparse" "python-catkin-pkg" "python-empy" "python-nose")
set(catkin_RUN_DEPENDS "cmake" "gtest" "python-argparse" "python-catkin-pkg" "python-empy" "python-nose")
set(catkin_DEPRECATED "")
set(catkin_BUILDTOOL_DEPENDS "cmake")
set(catkin_RUN_DEPENDS_python-catkin-pkg_VERSION_GTE "0.1.12")
\ No newline at end of file
#!/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
# source setup_cached.sh from same directory as this file
_CATKIN_SETUP_DIR=$(cd "`dirname "$0"`" && pwd)
. "$_CATKIN_SETUP_DIR/setup_cached.sh"
exec "$@"
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('/opt/ros/hydro/share/catkin/cmake', 'catkinConfig.cmake.in')):
sys.path.insert(0, os.path.join('/opt/ros/hydro/share/catkin/cmake', '..', '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 "/home/robbie/homer/catkin_ws/devel;/opt/ros/hydro".split(';'):
python_path = os.path.join(workspace, 'lib/python2.7/dist-packages')
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('/home/robbie/homer/catkin_ws/src/vision/object_recognition/or_libs/devel/env.sh')
output_filename = '/home/robbie/homer/catkin_ws/src/vision/object_recognition/or_libs/catkin_generated/setup_cached.sh'
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)
- setup-file:
local-name: /usr/local/setup.sh
This diff is collapsed.
#!/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
# source setup.sh from same directory as this file
_CATKIN_SETUP_DIR=$(cd "`dirname "$0"`" && pwd)
. "$_CATKIN_SETUP_DIR/setup.sh"
exec "$@"
#!/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=$(cd "`dirname "${BASH_SOURCE[0]}"`" && pwd)
. "$_CATKIN_SETUP_DIR/setup.sh"
#!/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:=/usr/local}
_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
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
#!/usr/bin/env zsh
# generated from catkin/cmake/templates/setup.zsh.in
CATKIN_SHELL=zsh
_CATKIN_SETUP_DIR=$(cd "`dirname "$0"`" && pwd)
emulate sh # emulate POSIX
. "$_CATKIN_SETUP_DIR/setup.sh"
emulate zsh # back to zsh mode
set(ORDERED_PATHS "/opt/ros/hydro/lib")
\ No newline at end of file
#!/usr/bin/env sh
# generated from catkin/python/catkin/environment_cache.py
# based on a snapshot of the environment before and after calling the setup script
# it emulates the modifications of the setup script without recurring computations
# new environment variables
# modified environment variables
export CATKIN_TEST_RESULTS_DIR="/home/robbie/homer/catkin_ws/src/vision/object_recognition/or_libs/test_results"
export CMAKE_PREFIX_PATH="/home/robbie/homer/catkin_ws/src/vision/object_recognition/or_libs/devel:$CMAKE_PREFIX_PATH"
export CPATH="/home/robbie/homer/catkin_ws/src/vision/object_recognition/or_libs/devel/include:$CPATH"
export LD_LIBRARY_PATH="/home/robbie/homer/catkin_ws/src/vision/object_recognition/or_libs/devel/lib:$LD_LIBRARY_PATH"
export PATH="/home/robbie/homer/catkin_ws/src/vision/object_recognition/or_libs/devel/bin:$PATH"
export PKG_CONFIG_PATH="/home/robbie/homer/catkin_ws/src/vision/object_recognition/or_libs/devel/lib/pkgconfig:$PKG_CONFIG_PATH"
export PYTHONPATH="/home/robbie/homer/catkin_ws/src/vision/object_recognition/or_libs/devel/lib/python2.7/dist-packages:$PYTHONPATH"
export ROSLISP_PACKAGE_DIRECTORIES="/home/robbie/homer/catkin_ws/src/vision/object_recognition/or_libs/devel/share/common-lisp:$ROSLISP_PACKAGE_DIRECTORIES"
export ROS_PACKAGE_PATH="/home/robbie/homer/catkin_ws/src/vision/object_recognition/or_libs:$ROS_PACKAGE_PATH"
export ROS_TEST_RESULTS_DIR="/home/robbie/homer/catkin_ws/src/vision/object_recognition/or_libs/test_results"
\ No newline at end of file
#!/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):
"""
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
"""
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("\\", "/")))
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', [])
unsupported_args = [
'entry_points',
'exclude_package_data',
'ext_modules ',
'ext_package',
'include_package_data',
'namespace_packages',
'py_modules',
'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)
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()
<?xml version="1.0"?>
<package>
<name>catkin</name>
<version>0.5.77</version>
<description>Low-level build system macros and infrastructure for ROS.</description>
<maintainer email="dthomas@osrfoundation.org">Dirk Thomas</maintainer>
<license>BSD</license>
<url type="website">http://www.ros.org/wiki/catkin</url>
<url type="bugtracker">https://github.com/ros/catkin/issues</url>
<url type="repository">https://github.com/ros/catkin</url>
<author>Troy Straszheim</author>
<author>Morten Kjaergaard</author>
<author>Brian Gerkey</author>
<author>Dirk Thomas</author>
<build_depend>gtest</build_depend>
<build_depend>python-argparse</build_depend>
<build_depend>python-catkin-pkg</build_depend>
<build_depend>python-empy</build_depend>
<build_depend>python-nose</build_depend>
<buildtool_depend>cmake</buildtool_depend>
<run_depend>cmake</run_depend>
<run_depend>gtest</run_depend>
<run_depend>python-argparse</run_depend>
<run_depend version_gte="0.1.12">python-catkin-pkg</run_depend>
<run_depend>python-empy</run_depend>
<run_depend>python-nose</run_depend>
<export>
<rosdoc config="rosdoc.yaml"/>
</export>
</package>
/**
\mainpage
\htmlinclude manifest.html
\b or_libs
<!--
Provide an overview of your package.
-->
-->
*/
<package>
<description brief="or_libs">
or_libs
</description>
<author>Viktor Seib</author>
<license>BSD</license>
<review status="unreviewed" notes=""/>
<url>http://ros.org/wiki/or_libs</url>
<depend package="roscpp"/>
<depend package="robbie_architecture"/>
<export>
<cpp cflags="-I${prefix}/src" lflags="-Wl,-rpath,${prefix}/lib -L${prefix}/lib -lConnectedComponentAnalyzer"/>
<cpp cflags="-I${prefix}/src" lflags="-Wl,-rpath,${prefix}/lib -L${prefix}/lib -lKeyPointExtraction"/>
<cpp cflags="-I${prefix}/src" lflags="-Wl,-rpath,${prefix}/lib -L${prefix}/lib -lObjectRecognition"/>
<cpp cflags="-I${prefix}/src" lflags="-Wl,-rpath,${prefix}/lib -L${prefix}/lib -lParallelSurf"/>
</export>
</package>
<package>
<name>or_libs</name>
<description>
or_libs
</description>
<maintainer email="raphael@uni-koblenz.de">raphael</maintainer>
<version>0.0.1</version>
<author>raphael</author>
<license>BSD</license>
<url>http://ros.org/wiki/user_distance_tracker</url>
<build_depend>message_generation</build_depend>
<build_depend>genmsg</build_depend>
<buildtool_depend>catkin</buildtool_depend>
<build_depend>roscpp</build_depend>
<build_depend>roslang</build_depend>
<build_depend>std_msgs</build_depend>
<run_depend>cv_bridge</run_depend>
<build_depend>cv_bridge</build_depend>
<run_depend>message_runtime</run_depend>
<run_depend>sensor_msgs</run_depend>
<build_depend>sensor_msgs</build_depend>
<run_depend>std_msgs</run_depend>
<run_depend>tf</run_depend>
<run_depend>roscpp_serialization</run_depend>
<build_depend>roscpp_serialization</build_depend>
<run_depend>robbie_architecture</run_depend>
<build_depend>robbie_architecture</build_depend>
</package>
set(ConnectedComponentAnalyzer_SRC
ConnectedComponentAnalyzer.cpp
)
add_library(ConnectedComponentAnalyzer ${ConnectedComponentAnalyzer_SRC})
/*******************************************************************************
* ConnectedComponent.h
*
* (C) 2006 AG Aktives Sehen <agas@uni-koblenz.de>
* Universitaet Koblenz-Landau
*
* Information on Code Review state:
* §Author: SB; DevelTest: ; Reviewer: ; Review: ; State:
*
* Additional information:
* $Id: ConnectedComponent.h 44313 2011-04-06 22:46:28Z agas $