Skip to content
Snippets Groups Projects
Commit 09f25e4c authored by acoromin's avatar acoromin
Browse files

Adding trunk-branches-tags structure to the project

parents
No related branches found
No related tags found
No related merge requests found
Showing
with 1196 additions and 0 deletions
# Pre-requisites about cmake itself
CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
if(COMMAND cmake_policy)
cmake_policy(SET CMP0005 NEW)
cmake_policy(SET CMP0003 NEW)
endif(COMMAND cmake_policy)
# The project name and the type of project
PROJECT(wolf)
SET(EXECUTABLE_OUTPUT_PATH ${CMAKE_CURRENT_SOURCE_DIR}/bin)
SET(LIBRARY_OUTPUT_PATH ${CMAKE_CURRENT_SOURCE_DIR}/lib)
SET(CMAKE_INSTALL_PREFIX /usr/local)
IF (NOT CMAKE_BUILD_TYPE)
SET(CMAKE_BUILD_TYPE "DEBUG")
ENDIF (NOT CMAKE_BUILD_TYPE)
message(STATUS "Configured to compile in ${CMAKE_BUILD_TYPE} mode.")
#Set Flags
SET(CMAKE_CXX_FLAGS_DEBUG "-g -Wall -D_REENTRANT")
SET(CMAKE_CXX_FLAGS_RELEASE "-O3 -D_REENTRANT")
#Set compiler according C++11 support
include(CheckCXXCompilerFlag)
CHECK_CXX_COMPILER_FLAG("-std=c++11" COMPILER_SUPPORTS_CXX11)
CHECK_CXX_COMPILER_FLAG("-std=c++0x" COMPILER_SUPPORTS_CXX0X)
if(COMPILER_SUPPORTS_CXX11)
message(STATUS "The compiler ${CMAKE_CXX_COMPILER} has C++11 support.")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
elseif(COMPILER_SUPPORTS_CXX0X)
message(STATUS "The compiler ${CMAKE_CXX_COMPILER} has C++0x support.")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x")
else()
message(STATUS "The compiler ${CMAKE_CXX_COMPILER} has no C++11 support. Please use a different C++ compiler.")
endif()
ADD_SUBDIRECTORY(src)
FIND_PACKAGE(Doxygen)
FIND_PATH(IRI_DOC_DIR doxygen.conf ${CMAKE_SOURCE_DIR}/doc/iri_doc/)
IF (IRI_DOC_DIR)
ADD_CUSTOM_TARGET (doc ${DOXYGEN_EXECUTABLE} ${CMAKE_SOURCE_DIR}/doc/iri_doc/doxygen.conf)
ELSE (IRI_DOC_DIR)
ADD_CUSTOM_TARGET (doc ${DOXYGEN_EXECUTABLE} ${CMAKE_SOURCE_DIR}/doc/doxygen.conf)
ENDIF (IRI_DOC_DIR)
ADD_CUSTOM_TARGET (distclean @echo cleaning cmake files)
IF (UNIX)
ADD_CUSTOM_COMMAND(
COMMENT "distribution clean"
COMMAND make ARGS clean
COMMAND rm ARGS -rf ${CMAKE_SOURCE_DIR}/build/*
TARGET distclean
)
ELSE(UNIX)
ADD_CUSTOM_COMMAND(
COMMENT "distclean only implemented in unix"
TARGET distclean
)
ENDIF(UNIX)
ADD_CUSTOM_TARGET (uninstall @echo uninstall package)
IF (UNIX)
ADD_CUSTOM_COMMAND(
COMMENT "uninstall package"
COMMAND xargs ARGS rm < install_manifest.txt
TARGET uninstall
)
ELSE(UNIX)
ADD_CUSTOM_COMMAND(
COMMENT "uninstall only implemented in unix"
TARGET uninstall
)
ENDIF(UNIX)
IF (UNIX)
SET(CPACK_PACKAGE_FILE_NAME "iri-${PROJECT_NAME}-dev-${CPACK_PACKAGE_VERSION}${CPACK_DEBIAN_PACKAGE_ARCHITECTURE}")
SET(CPACK_PACKAGE_NAME "iri-${PROJECT_NAME}-dev")
SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "...Enter something here...")
SET(CPACK_PACKAGING_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX})
SET(CPACK_GENERATOR "DEB")
SET(CPACK_DEBIAN_PACKAGE_MAINTAINER "galenya - labrobotica@iri.upc.edu")
SET(CPACK_SET_DESTDIR "ON") # Necessary because of the absolute install paths
# SET(CPACK_DEBIAN_PACKAGE_DEPENDS "libeigen3-dev (>= 3.2.1~${DISTRIB}), freeglut3-dev (>= 2.6.0)")
INCLUDE(CPack)
ELSE(UNIX)
ADD_CUSTOM_COMMAND(
COMMENT "packaging only implemented in unix"
TARGET uninstall
)
ENDIF(UNIX)
#edit the following line to add the librarie's header files
FIND_PATH(
wolf_INCLUDE_DIR
)
FIND_LIBRARY(
wolf_LIBRARY
NAMES wolf
PATHS /usr/lib /usr/local/lib /usr/local/lib/iri-algorithms)
IF (wolf_INCLUDE_DIR AND wolf_LIBRARY)
SET(wolf_FOUND TRUE)
ENDIF (wolf_INCLUDE_DIR AND wolf_LIBRARY)
IF (wolf_FOUND)
IF (NOT wolf_FIND_QUIETLY)
MESSAGE(STATUS "Found wolf: ${wolf_LIBRARY}")
ENDIF (NOT wolf_FIND_QUIETLY)
ELSE (wolf_FOUND)
IF (wolf_FIND_REQUIRED)
MESSAGE(FATAL_ERROR "Could not find wolf")
ENDIF (wolf_FIND_REQUIRED)
ENDIF (wolf_FOUND)
Wolf means Windowed Localization Frames !
Tips:
1. Use with ECLIPSE: If you use eclipse, cd to wolf/, then > source src/make_eclipse_project.bash, before importing the project.
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<profiles version="1">
<profile kind="CodeFormatterProfile" name="ROS Formatting" version="1">
<setting id="org.eclipse.cdt.core.formatter.insert_space_after_opening_paren_in_for" value="do not insert"/>
<setting id="org.eclipse.cdt.core.formatter.insert_space_before_opening_paren_in_method_declaration" value="do not insert"/>
<setting id="org.eclipse.cdt.core.formatter.insert_new_line_in_empty_block" value="insert"/>
<setting id="org.eclipse.cdt.core.formatter.lineSplit" value="120"/>
<setting id="org.eclipse.cdt.core.formatter.alignment_for_member_access" value="0"/>
<setting id="org.eclipse.cdt.core.formatter.insert_space_before_comma_in_base_types" value="do not insert"/>
<setting id="org.eclipse.cdt.core.formatter.keep_else_statement_on_same_line" value="false"/>
<setting id="org.eclipse.cdt.core.formatter.alignment_for_constructor_initializer_list" value="2"/>
<setting id="org.eclipse.cdt.core.formatter.indent_switchstatements_compare_to_switch" value="true"/>
<setting id="org.eclipse.cdt.core.formatter.insert_space_after_opening_brace_in_array_initializer" value="do not insert"/>
<setting id="org.eclipse.cdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters" value="do not insert"/>
<setting id="org.eclipse.cdt.core.formatter.insert_space_after_opening_paren_in_if" value="do not insert"/>
<setting id="org.eclipse.cdt.core.formatter.insert_space_after_opening_paren_in_exception_specification" value="do not insert"/>
<setting id="org.eclipse.cdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression" value="do not insert"/>
<setting id="org.eclipse.cdt.core.formatter.insert_space_after_comma_in_base_types" value="insert"/>
<setting id="org.eclipse.cdt.core.formatter.indent_body_declarations_compare_to_access_specifier" value="true"/>
<setting id="org.eclipse.cdt.core.formatter.insert_space_before_closing_paren_in_exception_specification" value="do not insert"/>
<setting id="org.eclipse.cdt.core.formatter.insert_space_after_comma_in_template_arguments" value="insert"/>
<setting id="org.eclipse.cdt.core.formatter.insert_space_before_opening_brace_in_block" value="insert"/>
<setting id="org.eclipse.cdt.core.formatter.insert_space_before_closing_paren_in_method_declaration" value="do not insert"/>
<setting id="org.eclipse.cdt.core.formatter.insert_space_before_colon_in_labeled_statement" value="do not insert"/>
<setting id="org.eclipse.cdt.core.formatter.use_tabs_only_for_leading_indentations" value="false"/>
<setting id="org.eclipse.cdt.core.formatter.insert_space_after_colon_in_case" value="insert"/>
<setting id="org.eclipse.cdt.core.formatter.insert_space_after_comma_in_enum_declarations" value="insert"/>
<setting id="org.eclipse.cdt.core.formatter.insert_space_after_comma_in_array_initializer" value="insert"/>
<setting id="org.eclipse.cdt.core.formatter.comment.min_distance_between_code_and_line_comment" value="1"/>
<setting id="org.eclipse.cdt.core.formatter.alignment_for_expressions_in_array_initializer" value="18"/>
<setting id="org.eclipse.cdt.core.formatter.insert_space_after_comma_in_declarator_list" value="insert"/>
<setting id="org.eclipse.cdt.core.formatter.insert_space_before_closing_paren_in_for" value="do not insert"/>
<setting id="org.eclipse.cdt.core.formatter.insert_space_before_opening_bracket" value="do not insert"/>
<setting id="org.eclipse.cdt.core.formatter.insert_space_before_prefix_operator" value="do not insert"/>
<setting id="org.eclipse.cdt.core.formatter.tabulation.size" value="2"/>
<setting id="org.eclipse.cdt.core.formatter.insert_new_line_before_else_in_if_statement" value="insert"/>
<setting id="org.eclipse.cdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression" value="do not insert"/>
<setting id="org.eclipse.cdt.core.formatter.alignment_for_enumerator_list" value="16"/>
<setting id="org.eclipse.cdt.core.formatter.insert_space_between_empty_parens_in_method_declaration" value="do not insert"/>
<setting id="org.eclipse.cdt.core.formatter.alignment_for_declarator_list" value="16"/>
<setting id="org.eclipse.cdt.core.formatter.insert_space_before_closing_paren_in_switch" value="do not insert"/>
<setting id="org.eclipse.cdt.core.formatter.indent_empty_lines" value="false"/>
<setting id="org.eclipse.cdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression" value="do not insert"/>
<setting id="org.eclipse.cdt.core.formatter.indent_switchstatements_compare_to_cases" value="true"/>
<setting id="org.eclipse.cdt.core.formatter.insert_space_before_opening_brace_in_method_declaration" value="insert"/>
<setting id="org.eclipse.cdt.core.formatter.keep_empty_array_initializer_on_one_line" value="false"/>
<setting id="org.eclipse.cdt.core.formatter.insert_space_before_opening_brace_in_switch" value="insert"/>
<setting id="org.eclipse.cdt.core.formatter.put_empty_statement_on_new_line" value="true"/>
<setting id="org.eclipse.cdt.core.formatter.insert_space_before_closing_paren_in_cast" value="do not insert"/>
<setting id="org.eclipse.cdt.core.formatter.brace_position_for_method_declaration" value="next_line"/>
<setting id="org.eclipse.cdt.core.formatter.insert_space_between_empty_braces_in_array_initializer" value="do not insert"/>
<setting id="org.eclipse.cdt.core.formatter.insert_space_before_closing_paren_in_while" value="do not insert"/>
<setting id="org.eclipse.cdt.core.formatter.insert_space_after_question_in_conditional" value="insert"/>
<setting id="org.eclipse.cdt.core.formatter.insert_space_before_semicolon" value="do not insert"/>
<setting id="org.eclipse.cdt.core.formatter.insert_space_after_closing_angle_bracket_in_template_arguments" value="insert"/>
<setting id="org.eclipse.cdt.core.formatter.insert_space_before_colon_in_base_clause" value="insert"/>
<setting id="org.eclipse.cdt.core.formatter.indent_breaks_compare_to_cases" value="true"/>
<setting id="org.eclipse.cdt.core.formatter.insert_space_before_unary_operator" value="do not insert"/>
<setting id="org.eclipse.cdt.core.formatter.insert_space_before_comma_in_declarator_list" value="do not insert"/>
<setting id="org.eclipse.cdt.core.formatter.join_wrapped_lines" value="true"/>
<setting id="org.eclipse.cdt.core.formatter.alignment_for_arguments_in_method_invocation" value="18"/>
<setting id="org.eclipse.cdt.core.formatter.comment.never_indent_line_comments_on_first_column" value="true"/>
<setting id="org.eclipse.cdt.core.formatter.insert_space_before_opening_paren_in_while" value="insert"/>
<setting id="org.eclipse.cdt.core.formatter.insert_space_after_opening_bracket" value="do not insert"/>
<setting id="org.eclipse.cdt.core.formatter.insert_space_between_empty_brackets" value="do not insert"/>
<setting id="org.eclipse.cdt.core.formatter.alignment_for_parameters_in_method_declaration" value="18"/>
<setting id="org.eclipse.cdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer" value="do not insert"/>
<setting id="org.eclipse.cdt.core.formatter.number_of_empty_lines_to_preserve" value="1"/>
<setting id="org.eclipse.cdt.core.formatter.insert_space_after_opening_paren_in_method_invocation" value="do not insert"/>
<setting id="org.eclipse.cdt.core.formatter.insert_space_before_closing_brace_in_array_initializer" value="do not insert"/>
<setting id="org.eclipse.cdt.core.formatter.brace_position_for_block" value="next_line"/>
<setting id="org.eclipse.cdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments" value="false"/>
<setting id="org.eclipse.cdt.core.formatter.insert_space_before_colon_in_conditional" value="insert"/>
<setting id="org.eclipse.cdt.core.formatter.insert_space_before_semicolon_in_for" value="do not insert"/>
<setting id="org.eclipse.cdt.core.formatter.insert_space_before_assignment_operator" value="insert"/>
<setting id="org.eclipse.cdt.core.formatter.brace_position_for_type_declaration" value="next_line"/>
<setting id="org.eclipse.cdt.core.formatter.insert_space_before_comma_in_expression_list" value="do not insert"/>
<setting id="org.eclipse.cdt.core.formatter.insert_space_before_opening_angle_bracket_in_template_arguments" value="do not insert"/>
<setting id="org.eclipse.cdt.core.formatter.insert_space_after_opening_angle_bracket_in_template_parameters" value="do not insert"/>
<setting id="org.eclipse.cdt.core.formatter.continuation_indentation" value="2"/>
<setting id="org.eclipse.cdt.core.formatter.insert_space_after_opening_paren_in_method_declaration" value="do not insert"/>
<setting id="org.eclipse.cdt.core.formatter.alignment_for_expression_list" value="0"/>
<setting id="org.eclipse.cdt.core.formatter.insert_space_before_comma_in_template_parameters" value="do not insert"/>
<setting id="org.eclipse.cdt.core.formatter.insert_space_after_binary_operator" value="insert"/>
<setting id="org.eclipse.cdt.core.formatter.insert_space_before_colon_in_default" value="do not insert"/>
<setting id="org.eclipse.cdt.core.formatter.alignment_for_conditional_expression" value="16"/>
<setting id="org.eclipse.cdt.core.formatter.insert_space_between_empty_parens_in_method_invocation" value="do not insert"/>
<setting id="org.eclipse.cdt.core.formatter.insert_space_before_comma_in_array_initializer" value="do not insert"/>
<setting id="org.eclipse.cdt.core.formatter.insert_space_before_closing_paren_in_if" value="do not insert"/>
<setting id="org.eclipse.cdt.core.formatter.format_guardian_clause_on_one_line" value="false"/>
<setting id="org.eclipse.cdt.core.formatter.insert_space_after_opening_paren_in_cast" value="do not insert"/>
<setting id="org.eclipse.cdt.core.formatter.indent_access_specifier_extra_spaces" value="0"/>
<setting id="org.eclipse.cdt.core.formatter.indent_access_specifier_compare_to_type_header" value="false"/>
<setting id="org.eclipse.cdt.core.formatter.insert_space_before_opening_brace_in_type_declaration" value="insert"/>
<setting id="org.eclipse.cdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters" value="insert"/>
<setting id="org.eclipse.cdt.core.formatter.insert_space_after_colon_in_labeled_statement" value="insert"/>
<setting id="org.eclipse.cdt.core.formatter.continuation_indentation_for_array_initializer" value="2"/>
<setting id="org.eclipse.cdt.core.formatter.insert_space_after_semicolon_in_for" value="insert"/>
<setting id="org.eclipse.cdt.core.formatter.insert_space_before_closing_paren_in_method_invocation" value="do not insert"/>
<setting id="org.eclipse.cdt.core.formatter.indent_body_declarations_compare_to_namespace_header" value="false"/>
<setting id="org.eclipse.cdt.core.formatter.insert_space_after_closing_brace_in_block" value="insert"/>
<setting id="org.eclipse.cdt.core.formatter.insert_space_after_assignment_operator" value="insert"/>
<setting id="org.eclipse.cdt.core.formatter.alignment_for_compact_if" value="16"/>
<setting id="org.eclipse.cdt.core.formatter.insert_space_before_opening_brace_in_array_initializer" value="insert"/>
<setting id="org.eclipse.cdt.core.formatter.alignment_for_assignment" value="16"/>
<setting id="org.eclipse.cdt.core.formatter.insert_new_line_at_end_of_file_if_missing" value="do not insert"/>
<setting id="org.eclipse.cdt.core.formatter.insert_space_after_comma_in_template_parameters" value="insert"/>
<setting id="org.eclipse.cdt.core.formatter.alignment_for_conditional_expression_chain" value="18"/>
<setting id="org.eclipse.cdt.core.formatter.insert_space_after_comma_in_expression_list" value="insert"/>
<setting id="org.eclipse.cdt.core.formatter.insert_space_before_opening_paren_in_exception_specification" value="insert"/>
<setting id="org.eclipse.cdt.core.formatter.insert_space_before_question_in_conditional" value="insert"/>
<setting id="org.eclipse.cdt.core.formatter.insert_space_before_binary_operator" value="insert"/>
<setting id="org.eclipse.cdt.core.formatter.insert_new_line_before_identifier_in_function_declaration" value="do not insert"/>
<setting id="org.eclipse.cdt.core.formatter.alignment_for_base_clause_in_type_declaration" value="18"/>
<setting id="org.eclipse.cdt.core.formatter.insert_space_before_comma_in_method_declaration_throws" value="do not insert"/>
<setting id="org.eclipse.cdt.core.formatter.indent_declaration_compare_to_template_header" value="false"/>
<setting id="org.eclipse.cdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments" value="do not insert"/>
<setting id="org.eclipse.cdt.core.formatter.insert_space_between_empty_parens_in_exception_specification" value="do not insert"/>
<setting id="org.eclipse.cdt.core.formatter.insert_space_after_unary_operator" value="do not insert"/>
<setting id="org.eclipse.cdt.core.formatter.insert_space_before_opening_paren_in_switch" value="insert"/>
<setting id="org.eclipse.cdt.core.formatter.insert_space_after_comma_in_method_declaration_throws" value="insert"/>
<setting id="org.eclipse.cdt.core.formatter.indent_statements_compare_to_body" value="true"/>
<setting id="org.eclipse.cdt.core.formatter.alignment_for_binary_expression" value="16"/>
<setting id="org.eclipse.cdt.core.formatter.indent_statements_compare_to_block" value="true"/>
<setting id="org.eclipse.cdt.core.formatter.alignment_for_throws_clause_in_method_declaration" value="18"/>
<setting id="org.eclipse.cdt.core.formatter.insert_new_line_before_catch_in_try_statement" value="insert"/>
<setting id="org.eclipse.cdt.core.formatter.insert_space_before_comma_in_template_arguments" value="do not insert"/>
<setting id="org.eclipse.cdt.core.formatter.insert_space_before_opening_paren_in_method_invocation" value="do not insert"/>
<setting id="org.eclipse.cdt.core.formatter.insert_space_after_closing_paren_in_cast" value="do not insert"/>
<setting id="org.eclipse.cdt.core.formatter.insert_space_before_closing_paren_in_catch" value="do not insert"/>
<setting id="org.eclipse.cdt.core.formatter.insert_space_before_opening_angle_bracket_in_template_parameters" value="do not insert"/>
<setting id="org.eclipse.cdt.core.formatter.tabulation.char" value="space"/>
<setting id="org.eclipse.cdt.core.formatter.insert_space_before_closing_angle_bracket_in_template_parameters" value="do not insert"/>
<setting id="org.eclipse.cdt.core.formatter.insert_new_line_before_colon_in_constructor_initializer_list" value="do not insert"/>
<setting id="org.eclipse.cdt.core.formatter.insert_space_after_opening_paren_in_while" value="do not insert"/>
<setting id="org.eclipse.cdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments" value="insert"/>
<setting id="org.eclipse.cdt.core.formatter.brace_position_for_block_in_case" value="next_line"/>
<setting id="org.eclipse.cdt.core.formatter.insert_space_after_postfix_operator" value="do not insert"/>
<setting id="org.eclipse.cdt.core.formatter.compact_else_if" value="true"/>
<setting id="org.eclipse.cdt.core.formatter.insert_space_after_colon_in_base_clause" value="insert"/>
<setting id="org.eclipse.cdt.core.formatter.insert_new_line_after_template_declaration" value="do not insert"/>
<setting id="org.eclipse.cdt.core.formatter.insert_space_after_opening_paren_in_catch" value="do not insert"/>
<setting id="org.eclipse.cdt.core.formatter.keep_then_statement_on_same_line" value="false"/>
<setting id="org.eclipse.cdt.core.formatter.brace_position_for_switch" value="next_line"/>
<setting id="org.eclipse.cdt.core.formatter.alignment_for_overloaded_left_shift_chain" value="16"/>
<setting id="org.eclipse.cdt.core.formatter.insert_space_after_opening_paren_in_switch" value="do not insert"/>
<setting id="org.eclipse.cdt.core.formatter.insert_space_before_opening_paren_in_if" value="insert"/>
<setting id="org.eclipse.cdt.core.formatter.indentation.size" value="8"/>
<setting id="org.eclipse.cdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer" value="do not insert"/>
<setting id="org.eclipse.cdt.core.formatter.keep_imple_if_on_one_line" value="false"/>
<setting id="org.eclipse.cdt.core.formatter.brace_position_for_namespace_declaration" value="next_line"/>
<setting id="org.eclipse.cdt.core.formatter.insert_space_after_colon_in_conditional" value="insert"/>
<setting id="org.eclipse.cdt.core.formatter.insert_space_before_comma_in_enum_declarations" value="do not insert"/>
<setting id="org.eclipse.cdt.core.formatter.insert_space_before_closing_angle_bracket_in_template_arguments" value="do not insert"/>
<setting id="org.eclipse.cdt.core.formatter.insert_space_after_prefix_operator" value="do not insert"/>
<setting id="org.eclipse.cdt.core.formatter.brace_position_for_array_initializer" value="end_of_line"/>
<setting id="org.eclipse.cdt.core.formatter.insert_space_before_colon_in_case" value="do not insert"/>
<setting id="org.eclipse.cdt.core.formatter.insert_space_before_opening_paren_in_catch" value="insert"/>
<setting id="org.eclipse.cdt.core.formatter.insert_space_before_opening_brace_in_namespace_declaration" value="insert"/>
<setting id="org.eclipse.cdt.core.formatter.insert_space_before_postfix_operator" value="do not insert"/>
<setting id="org.eclipse.cdt.core.formatter.insert_space_before_closing_bracket" value="do not insert"/>
<setting id="org.eclipse.cdt.core.formatter.insert_new_line_before_while_in_do_statement" value="do not insert"/>
<setting id="org.eclipse.cdt.core.formatter.insert_space_before_opening_paren_in_for" value="insert"/>
<setting id="org.eclipse.cdt.core.formatter.insert_space_after_closing_angle_bracket_in_template_parameters" value="insert"/>
<setting id="org.eclipse.cdt.core.formatter.insert_space_after_opening_angle_bracket_in_template_arguments" value="do not insert"/>
</profile>
</profiles>
This file serves as a guideline for future developments.
As the ideas here get implemented, we advise you add a /////// OK tag indicating the work is done and working.
1. Getters ///////////// OK
============
source return
vvv >>>
shptr ptr obj map
shptr & .get() * /
ptr / . * /
obj / / & /
map / / / & state: norm; error: const
2. Classes
===============
IDEA: Allow Vehicles, Frames, Captures, Features to live out of the node for enhanced reusability.
In the WOLF nodes, we can have like this:
class FrameBase
{
State* state_ptr;
}
class NodeConstrainer
{
virtual computeError()
}
class NodeFrameBase : public FrameBase, public NodeConstrainer
{
computeError() <-- in case we want to overload
}
3. Precomputing constant values ////////////// OK
===============================
PinHole::precomputeConstants() // call in in constructor /////////// OK
{
intrinsic_matrix_ = bla bla bla;
inverse_intrinsic_matrix_ = bla bla bla
}
Capture::precomputeGlobalPose() // call from Capture::precomputeConstants(), see below //////////// OK
{
global_pose_ = bla bla bla
inverse_global_pose_ = bla bla bla
}
Capture::precomputeConstants() ////////////////// OK
{
precomputeGlobalPose();
for (trans_sensor_iter = bla bla)
{
trans_sensor_iter->precomputeConstants();
}
}
TransSensor::precomputeConstants() = 0; /////////////// OK
TransPinHole::precomputeConstants() /////////////// OK
{
capture_own->globalPose()
capture_other->inverseGlobalPose()
computePoseRelative()
sensor_own->inverseIntrinsicMatrix()
sensor_other->intrinsicMatrix()
fundamental_ = bla bla
}
NodeConstrainer::precomputeConstants() ///////////////// OK
{
for (iter = bla bla bla)
{
*iter->precomputeConstants();
}
}
TOP::computeError() //////////////////// OK
{
precomputeConstants();
for (iter = bla bla bla)
{
*iter->compputeError();
}
}
CorrespondenceBase::precomputeConstants() //////////////// OK not overloaded.
{
// Leave it blank or simply do not overload it. Nobody will call it anyway.
}
This diff is collapsed.
PROJECT_NAME = "WOLF"
doc/images/AddKF.png

12.5 KiB

doc/images/KFWindow.png

30.7 KiB

doc/images/StateInheritances.png

13 KiB

doc/images/TrajectoryStructure.png

51.5 KiB

doc/images/red-wolf.png

7.53 KiB

// EDIT CAPS TEXTS
/*! \mainpage WOLF
\section Description
WOLF (Windowed Localization Frames) is a software library ...
\section Main Main Features
- Uses Eigen3.2. as an algebra engine
- Suited for Filtering and Optimization approaches
- Allows different state spaces configurations
- Minimizes read/write of state vectors and matrix to memory
\section Contents
- \link Installation Installation \endlink
- \link how_to How To \endlink
- \link Performance Performance \endlink
- \link faq FAQ \endlink
- \link todo To Do \endlink
- \link other OTHER STUFF FTW \endlink
.
\section Authors
Joan Solà (jsola (_at_) iri.upc.edu)
Andreu Corominas (acorominas (_at_) iri.upc.edu)
Faust Terrado (fterrado (_at_) iri.upc.edu)
Àngel Santamaria (asantamaria (_at_) iri.upc.edu)
Joan Vallvé (jvallve (_at_) iri.upc.edu)
\section License
TO BE DISCUSSED :
This package is licensed under a
<a href="http://www.gnu.org/licenses/lgpl.html" target=”_blank”>
LGPL 3.0 License</a>.
\section Disclaimer
This is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation, either version 3 of the License, or
at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
\section References References and External Documentation
... Nothing written here yet ...
*/
// HERE STARTS THE FUN (THE DIFFERENT PAGES)
// TITLE
// MINI PAGES MENU
// CONTENT (SECTIONS...)
// ADDING PAGES:
// - add the new page in the menus of each page
// - current page is bold "\b", not a \link!
/*! \page Installation Installation
\b Installation | \link how_to How To \endlink | \link Performance \endlink | \link faq FAQ \endlink | \link todo To Do \endlink | \link other OTHER STUFF FTW \endlink
To install the WOLF library, please follow the steps below:
\section Download
Checkout the source code from the IRI public repository
\code
cd <your_developing_folder>
svn checkout https://devel.iri.upc.edu/labrobotica/algorithms/wolf wolf
\endcode
\section Compilation
After downloading, change directory to wolf/build and execute cmake,
\code
cd build
cmake ..
\endcode
compile the shared library (wolf.so) and the example programs,
\code
make
\endcode
<!--
The <em>cmake</em> only need to be executed once (make will automatically call
<em>cmake</em> if you modify one of the <em>CMakeList.txt</em> files).
-->
Optionally, if you want to generate this documentation in your local machine (uses doxygen default style type),
\code
make doc
\endcode <!--OTHER-->
<!--
- To generate this documentation with IRI-DOC style type
\code
cd doc
svn checkout https://devel.iri.upc.edu/labrobotica/tools/iri_doc
cd ../build; rm -rf *; cmake ..; make; make doc
\endcode
-->
Please note that the files in the <em>build</em> directory are genetated by <em>cmake</em>
and <em>make</em> and can be safely removed.
After doing so you will need to call cmake manually again.
\section Installing_subsec Installing
In order to be able to use the library, it is necessary to copy it into the system.
To do that, execute, from the build directory
\code
sudo make install
\endcode
as root and the shared libraries will be copied to <em>/usr/local/lib/iridrivers</em> directory
and the header files will be copied to <em>/usr/local/include/iridrivers</em> dierctory. At
this point, the library may be used by any user.
To remove the library from the system, execute
\code
sudo make uninstall
\endcode
as root, and all the associated files will be removed from the system.
OTHER
\section Configuration
The default build mode is DEBUG. That is, objects and executables
include debug information.
The RELEASE build mode optimizes for speed. To build in this mode
execute
\code
cmake .. -DCMAKE_BUILD_TYPE=RELEASE
\endcode
The release mode will be kept until next time cmake is executed.
*/
/*! \page how_to How to use this library
\link Installation \endlink | \b How \b To | \link Performance \endlink | \link faq FAQ \endlink | \link todo To Do \endlink | \link other OTHER STUFF FTW \endlink
You can use only the functions provided by the library after \link Installation install this library \endlink.
If you need to use this library in your code, you'll have to add these lines into your CMakeLists.txt file.
- first it is necessary to locate if required libraries have been installed or not using the following command (TO DO)
\code
FIND_PACKAGE(wolf REQUIRED)
\endcode
- In the case that the packages are present, it is necessary to add the header files directory to
the include directory path by using
\code
INCLUDE_DIRECTORIES(${wolf_INCLUDE_DIR})
\endcode
- Finally, it is also necessary to link with the desired libraries by using the following command
\code
TARGET_LINK_LIBRARIES(<executable name> ${wolf_LIBRARY})
\endcode
.
<!--
All these steps are automatically done when the new project is created following the instructions
in <A href="http://wikiri.upc.es/index.php/Create_a_new_development_project" target=”_blank”>here</a>
-->
From the programming point of view the following example illustrates how to use wolf:
\code
#include "state_pvq.h"
int main()
{
VectorXd storage(20);
unsigned int index = 0, bsize = 4;
//set storage vector
storage << 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19;
VectorXd vec_pvq(StatePVQ::SIZE_);
vec_pvq << 20, 21, 22, 23, 24, 25, 26, 27, 28, 29;
StatePVQ pvq(storage, index + bsize, vec_pvq);
cout << "storage : " << storage.transpose() << endl;
cout << "pvq state: " << pvq.x().transpose() << endl;
cout << "pvq pos : " << pvq.p().transpose() << endl;
cout << "pvq vel : " << pvq.v().transpose() << endl;
cout << "pvq quat : " << pvq.q().coeffs().transpose() << endl;
VectorXd vec_pvq2(StatePVQ::SIZE_);
vec_pvq2 << 30, 31, 32, 33, 34, 35, 36, 37, 38, 39;
pvq.x(vec_pvq2);
cout << "storage : " << storage.transpose() << endl;
cout << "pvq state: " << pvq.x().transpose() << endl;
return 0;
}
\endcode
For further code examples, please see the files at src/examples where there are some "main()" instances that make use of the library in different useful ways.
*/
/*! \page Performance Performance
\link Installation \endlink | \link how_to How To \endlink | \b Performance | \link faq FAQ \endlink | \link todo To Do \endlink | \link other OTHER STUFF FTW \endlink
The following plot shows the processing time spent to compute ...
<!-- \image html "images/xxx.png" -->
*/
/*! \page faq Frequently Asked Questions
\link Installation \endlink | \link how_to How To \endlink | \link Performance \endlink | \b FAQ | \link todo To Do \endlink | \link other OTHER STUFF FTW \endlink
Do I need some extra libraries to compile WOLF ?
- Yes, please take a look at the \link Installation \endlink page.
*/
// THIS IS SHOWN BEFORE THE TO DO AUTOMATIC PAGE
/*! \page todo To Do
\link Installation \endlink | \link how_to How To \endlink | \link Performance \endlink | \link faq FAQ \endlink| \b To \b Do | \link other OTHER STUFF FTW \endlink
- some to do
- another to do
*/
/*! \page other OTHER STUFF FTW
\link Installation \endlink | \link how_to How To \endlink | \link Performance \endlink | \link faq FAQ \endlink | \link todo To Do \endlink | \b OTHER \b STUFF \b FTW
HERE IS YOUR CONTENT FOR THE WIN
*/
#Start WOLF build
MESSAGE("Starting WOLF CMakeLists ...")
CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
#find dependencies.
FIND_PACKAGE(Ceres QUIET) #Ceres is not required
IF(Ceres_FOUND)
MESSAGE("Ceres Library FOUND: ceres_wrapper will be built.")
ENDIF(Ceres_FOUND)
#include directories
INCLUDE_DIRECTORIES(.)
IF(Ceres_FOUND)
INCLUDE_DIRECTORIES(${CERES_INCLUDE_DIRS})
ENDIF(Ceres_FOUND)
#headers
SET(HDRS
capture_gps.h
capture.h
capture_image.h
correspondence_base.h
correspondence_global.h
correspondence_gps_doppler.h
correspondence_gps_pseudo_range.h
correspondence_relative.h
correspondence_slam_landmark.h
epipolar_constraint.h
feature_base.h
frame.h
gps_doppler.h
gps_pseudo_range.h
image_point.h
node_constrainer.h
node.h
node_linked.h
node_terminus.h
pin_hole.h
quaternion_tools.h
raw_base.h
sensor_base.h
state_base.h
state_error.h
state_error_imu.h
state_error_pose.h
state_error_pqv.h
state_imu.h
state_pose.h
state_pq.h
state_pqv.h
state_root_base.h
time_stamp.h
trans_pin_hole.h
trans_sensor.h
vehicle_base.h
wolf.h
wolf_tools.h)
#sources
SET(SRCS
state_base.cpp
# state_error.cpp
# state_error_imu.cpp
# state_error_pose.cpp
# state_error_pqv.cpp
state_imu.cpp
state_pose.cpp
state_pq.cpp
state_pqv.cpp
state_root_base.cpp
time_stamp.cpp)
#optional HDRS and SRCS
IF (Ceres_FOUND)
SET(SRCS ${SRCS} ceres_wrapper/ceres_wrapper_numeric.cpp)
SET(HDRS ${HDRS} ceres_wrapper/ceres_wrapper_numeric.h)
ENDIF(Ceres_FOUND)
# create the shared library
ADD_LIBRARY(${PROJECT_NAME} SHARED ${SRCS})
#install library
INSTALL(TARGETS ${PROJECT_NAME}
RUNTIME DESTINATION bin
LIBRARY DESTINATION lib/iri-algorithms
ARCHIVE DESTINATION lib/iri-algorithms)
#install headers
INSTALL(FILES ${HDRS}
DESTINATION include/iri-algorithms)
INSTALL(FILES ../Findwolf.cmake DESTINATION ${CMAKE_ROOT}/Modules/)
#Build examples & tests
MESSAGE("Building examples and tests.")
ADD_SUBDIRECTORY(examples)
IF (Ceres_FOUND)
ADD_SUBDIRECTORY(ceres_wrapper/examples)
ENDIF(Ceres_FOUND)
/**
* \file capture.h
*
* Created on: 12/08/2014
* \author: jsola
*/
#ifndef CAPTURE_H_
#define CAPTURE_H_
#include "node_constrainer.h"
#include <map>
#include <utility>
#include <memory>
// Forward declarations for node templates
class Frame;
class FeatureBase;
// Forward declarations for member pointers
class SensorBase;
class RawBase;
class TransSensor;
/** \brief Base class for raw data captures from sensors
*
* Raw data captured by sensors, and links to the sensors parameters, are collected in this class.
*
* The idea is to have an object Sensor for each physical sensor, several objects FeatureManager to process
* the captured data, and one Capture object for each actual raw data captured by the sensor. In the case of trajectories,
* a number of captures are active inside a sliding window of key-frames. In this context, usually each key-frame
* has at least one sensor capture, but it is allowed to have more than one (from different sensors
* fired at the same time-stamp of the Frame).
*
* One object Capture has:
* - Raw data,
* - A pointer to the Sensor that captured the data
* - A pointer to the Frame owning it (one level up in the Wolf tree).
* - A std::list of features (points, lines, GPS pseudo-ranges, or whatsoever), the result of interpreting the raw data
* (one level down in the Wolf tree).
*
* See RawBase for a rationale on raw data.
*
* See SensorBase for a rationale on sensor devices.
*
* See Frame for a rationale on frames and key-frames.
*
* See FeatureBase for a rationale on features.
*
*/
class Capture : public NodeConstrainer<Frame, FeatureBase>
{
protected:
RawShPtr raw_sh_ptr_; ///< Pointer to raw data
SensorPtr sensor_ptr_; ///< Pointer to sensor
StatePose global_pose_; ///< Global sensor pose, the composition of the frame pose and the sensor pose
StatePose inverse_global_pose_; ///< inverse global sensor pose
private:
TransSensorMap trans_sensor_map_;
protected:
/**
* \brief Constructor
* \param _frm_ptr a shared pointer to the Frame up node
* \param _sen_ptr a shared pointer to the sensor that captured the data
* \param _loc the location in the Wolf tree (TOP, MID or BOTTOM, it defaults to MID)
*/
Capture(const FrameShPtr& _frm_ptr, const SensorShPtr& _sen_ptr, const NodeLocation _loc = MID);
virtual ~Capture();
public:
void linkToFrame(const FrameShPtr& _frm_ptr);
const FramePtr framePtr() const;
const Frame& frame() const;
void addFeature(const FeatureShPtr& _f_ptr);
const FeatureList& featureList() const;
const RawShPtr& rawShPtr() const;
const RawPtr rawPtr() const;
void setRaw(RawShPtr & _raw_sh_ptr);
SensorPtr sensorPtr() ;
SensorBase& sensor() ;
const SensorPtr sensorPtr() const;
const SensorBase& sensor() const;
void precomputeConstants();
void precomputeGlobalPose();
const StatePose & globalPose() const;
const StatePose & inverseGlobalPose() const;
bool existsTransSensor(unsigned int _capture_other_id) const;
std::pair<TransSensorIter,bool> addTransSensor(unsigned int _capture_other_id, const TransSensorShPtr& _trans_senspr_sh_ptr);
/**
* \brief Get the TransSensor pointer corresponding to an ID key.
* @param _capture_other_id the TransSensor identifier
* @return the TransSensor pointer. Return NULL if TransSensor ID is not found.
*
* Get the TransSensor pointer corresponding to an ID key.
*/
const TransSensorPtr transSensorPtr(unsigned int _capture_other_id) const;
/**
* @brief Erases elements according to the provided key.
* @param _capture_other_id Key of element to be erased.
* @return The number of elements erased.
*
* This function erases all the elements located by the given key from
* a %map.
* Note that this function only erases the element, and that if
* the element is itself a pointer, the pointed-to memory is not touched
* in any way. Managing the pointer is the user's responsibility.
*/
unsigned int removeTransSensor(unsigned int _capture_other_id);
virtual void printSelf(unsigned int _ntabs = 0, std::ostream& _ost = std::cout) const;
};
////////////////////////////////
// IMPLEMENTATION
////////////////////////////////
#include "trans_sensor.h"
#include "sensor_base.h"
#include "wolf_tools.h"
Capture::Capture(const FrameShPtr& _frm_ptr, const SensorShPtr& _sen_ptr, const NodeLocation _loc) :
NodeConstrainer(_loc, "CAPTURE", _frm_ptr), //
sensor_ptr_(_sen_ptr.get())
{
//
}
Capture::~Capture()
{
//
}
inline void Capture::linkToFrame(const FrameShPtr& _frm_ptr)
{
linkToUpNode(_frm_ptr);
}
inline const FramePtr Capture::framePtr() const
{
return upNodePtr();
}
inline const Frame& Capture::frame() const
{
return *framePtr();
}
inline void Capture::addFeature(const FeatureShPtr& _f_ptr)
{
addDownNode(_f_ptr);
}
const inline FeatureList& Capture::featureList() const
{
return downNodeList();
}
inline const RawShPtr& Capture::rawShPtr() const
{
return raw_sh_ptr_;
}
inline const RawPtr Capture::rawPtr() const
{
return raw_sh_ptr_.get();
}
inline void Capture::setRaw(RawShPtr & _raw_sh_ptr)
{
raw_sh_ptr_ = _raw_sh_ptr;
}
inline SensorPtr Capture::sensorPtr()
{
return sensor_ptr_;
}
inline SensorBase& Capture::sensor()
{
return *sensor_ptr_;
}
inline const SensorPtr Capture::sensorPtr() const
{
return sensor_ptr_;
}
inline const SensorBase& Capture::sensor() const
{
return *sensor_ptr_;
}
inline void Capture::precomputeConstants()
{
precomputeGlobalPose();
for (auto const & ptr : trans_sensor_map_)
ptr.second->precomputeConstants();
}
inline void Capture::precomputeGlobalPose()
{
Wolf::composeFrames(framePtr()->state(), sensor_ptr_->pose(), global_pose_ );
global_pose_.inverse(inverse_global_pose_);
}
inline const StatePose& Capture::globalPose() const
{
return global_pose_;
}
inline const StatePose& Capture::inverseGlobalPose() const
{
return inverse_global_pose_;
}
inline bool Capture::existsTransSensor(unsigned int _capture_other_id) const
{
return trans_sensor_map_.count(_capture_other_id) != 0;
}
inline std::pair<TransSensorIter,bool> Capture::addTransSensor(unsigned int _capture_other_id, const TransSensorShPtr& _trans_senspr_sh_ptr)
{
auto ret = trans_sensor_map_.insert(TransSensorMap::value_type(_capture_other_id, _trans_senspr_sh_ptr));
return ret;
}
inline const TransSensorPtr Capture::transSensorPtr(unsigned int _capture_other_id) const
{
// NOTE: We allow a search by capture ID because the total number of trans-sensors in a Capture is really small
// and a smarter, quicker, random access is not justified.
auto iter = trans_sensor_map_.find(_capture_other_id);
if (iter->first == _capture_other_id)
// if (iter != trans_sensor_map_.end()) // alternate test, they work similarly
return iter->second.get(); // this is a regular pointer to the TransSensor.
else
{
return NULL; // Return a NULL pointer if the TransSensor ID is not found.
}
}
inline unsigned int Capture::removeTransSensor(unsigned int _capture_other_id)
{
return trans_sensor_map_.erase(_capture_other_id);
}
void Capture::printSelf(unsigned int _ntabs, std::ostream& _ost) const
{
NodeConstrainer::printSelf(_ntabs, _ost);
printNTabs(_ntabs);
_ost << "\tSensor pose : ( " << sensor_ptr_->pose().x().transpose() << " )" << std::endl;
printNTabs(_ntabs);
_ost << "\tSensor intrinsic : ( " << sensor_ptr_->intrinsic().transpose() << " )" << std::endl;
printNTabs(_ntabs);
_ost << "\tTransSensors ==> [ ";
for (auto const & ptr : trans_sensor_map_)
{
_ost << ptr.first << " "; // print the capture ID key of the TransSensor
}
_ost << "]" << std::endl;
}
#endif /* CAPTURE_H_ */
/**
* \file capture_gps.h
*
* Created on: 17/08/2014
* \author: jsola
*/
#ifndef CAPTURE_GPS_H_
#define CAPTURE_GPS_H_
#include "capture.h"
class CaptureGPS : public Capture
{
public:
CaptureGPS();
virtual ~CaptureGPS();
};
////////////////////////////////
// IMPLEMENTATION
////////////////////////////////
inline CaptureGPS::CaptureGPS()
{
// TODO Auto-generated constructor stub
}
inline CaptureGPS::~CaptureGPS()
{
//
}
#endif /* CAPTURE_GPS_H_ */
/**
* \file capture_image.h
*
* Created on: 15/08/2014
* \author: jsola
*/
#ifndef CAPTURE_IMAGE_H_
#define CAPTURE_IMAGE_H_
// Include base class
#include "capture.h"
/**
* \brief Image capture, generally from a projective, pin-hole camera.
*/
class CaptureImage : public Capture
{
public:
CaptureImage(const FrameShPtr& _frm_ptr, const SensorShPtr& _sen_ptr, NodeLocation _loc = MID);
virtual ~CaptureImage();
};
////////////////////////////////
// IMPLEMENTATION
////////////////////////////////
CaptureImage::CaptureImage(const FrameShPtr& _frm_ptr, const SensorShPtr& _sen_ptr, NodeLocation _loc) :
Capture(_frm_ptr, _sen_ptr, _loc)
{
//
}
CaptureImage::~CaptureImage()
{
//
}
#endif /* CAPTURE_IMAGE_H_ */
/**
* \file capture_laser_2D.h
*
* Created on: 06/10/2014
* \author: acorominas
*/
#ifndef CAPTURE_LASER_2D_H_
#define CAPTURE_LASER_2D_H_
#include "capture.h"
class CaptureLaser2D : public Capture
{
public:
/** \brief Constructor
*
* Constructor
*
**/
CaptureLaser2D(const FrameShPtr& _frm_ptr, const SensorShPtr& _sen_ptr, const NodeLocation _loc = MID);
/** \brief Destructor
*
* Destructor
*
**/
virtual ~CaptureLaser2D();
/** \brief Computes error
*
* Computes error
* TODO: Check if this is the appropiate interface. There ara 3 more interfaces at NodeConstrainer to be overloaded.
*
**/
virtual void computeError();
};
////////////////////////////////
// IMPLEMENTATION
////////////////////////////////
inline CaptureLaser2D::CaptureLaser2D(const FrameShPtr& _frm_ptr, const SensorShPtr& _sen_ptr, const NodeLocation _loc) :
Capture(_frm_ptr, _sen_ptr, _loc)
{
//
}
inline CaptureLaser2D::~CaptureLaser2D()
{
//
}
inline virtual void computeError()
{
//TODO
}
#endif /* CAPTURE_LASER_2D_H_ */
ADD_SUBDIRECTORY(examples)
\ No newline at end of file
#include "ceres_wrapper_numeric.h"
CeresWrapper::CeresWrapper()
{
}
CeresWrapper::~CeresWrapper()
{
}
// template <typename T> bool operator()(const T* const x, T* residual) const
// {
// residual[0] = T(10.0) - x[0];
// return true;
// }
//
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment