Skip to content
Snippets Groups Projects
Commit 80e024d8 authored by jcarpent's avatar jcarpent
Browse files

Init repo

parent 4618c7e1
No related branches found
No related tags found
No related merge requests found
Xcode/
build*/
#
# Copyright (c) 2017 CNRS
#
# This file is part of PinInvDyn
# pinocchio 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.
# pinocchio 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
# General Lesser Public License for more details. You should have
# received a copy of the GNU Lesser General Public License along with
# pinocchio If not, see
# <http://www.gnu.org/licenses/>.
CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
INCLUDE(cmake/base.cmake)
INCLUDE(cmake/boost.cmake)
INCLUDE(cmake/eigen.cmake)
INCLUDE(cmake/python.cmake)
INCLUDE(cmake2/ide.cmake)
SET(PROJECT_NAME PinInvDyn)
SET(PROJECT_DESCRIPTION "Efficient Inverse Dynamics for Multi-body Systems")
SET(PROJECT_URL "http://github.com/stack-of-tasks/pinocchio")
OPTION(INSTALL_DOCUMENTATION "Generate and install the documentation" FALSE)
SET(DOXYGEN_USE_MATHJAX YES)
IF(APPLE)
SET(CMAKE_MACOSX_RPATH TRUE)
SET(CMAKE_SKIP_BUILD_RPATH FALSE)
SET(CMAKE_BUILD_WITH_INSTALL_RPATH TRUE)
SET(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib")
list(FIND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES "${CMAKE_INSTALL_PREFIX}/lib" isSystemDir)
if("${isSystemDir}" STREQUAL "-1")
set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib")
endif("${isSystemDir}" STREQUAL "-1")
ENDIF(APPLE)
# Disable -Werror on Unix for now.
SET(CXX_DISABLE_WERROR True)
SET(CMAKE_VERBOSE_MAKEFILE True)
SETUP_PROJECT()
IF(WIN32)
SET(LINK copy_if_different)
ELSE(WIN32)
SET(LINK create_symlink)
ENDIF(WIN32)
# --- OPTIONS ----------------------------------------
OPTION (BUILD_PYTHON_INTERFACE "Build the python binding" OFF)
OPTION (BUILD_UNIT_TESTS "Build the unitary tests" ON)
# ----------------------------------------------------
# --- DEPENDANCIES -----------------------------------
# ----------------------------------------------------
ADD_REQUIRED_DEPENDENCY("eigen3 >= 3.0.5")
ADD_REQUIRED_DEPENDENCY("pinocchio >= 1.2.0")
SET(BOOST_COMPONENTS unit_test_framework serialization)
IF(BUILD_PYTHON_INTERFACE)
ADD_COMPILE_DEPENDENCY("eigenpy >= 1.3.1")
SET(BOOST_COMPONENTS ${BOOST_COMPONENTS} python)
FINDPYTHON(2.7 EXACT REQUIRED)
INCLUDE_DIRECTORIES(${PYTHON_INCLUDE_DIRS})
ENDIF(BUILD_PYTHON_INTERFACE)
SEARCH_FOR_BOOST()
# Path to boost headers
INCLUDE_DIRECTORIES(${Boost_INCLUDE_DIRS})
# ----------------------------------------------------
# --- INCLUDE ----------------------------------------
# ----------------------------------------------------
SET(${PROJECT_NAME}_MATH_HEADERS
include/pininvdyn/math/fwd.hpp
)
SET(${PROJECT_NAME}_TASKS_HEADERS
include/pininvdyn/tasks/fwd.hpp
include/pininvdyn/tasks/task-base.hpp
)
SET(${PROJECT_NAME}_SOLVERS_HEADERS
include/pininvdyn/solvers/fwd.hpp
)
SET(HEADERS
${${PROJECT_NAME}_MATH_HEADERS}
${${PROJECT_NAME}_TASKS_HEADERS}
${${PROJECT_NAME}_SOLVERS_HEADERS}
)
LIST(REMOVE_DUPLICATES HEADERS)
SET(HEADERS_FULL_PATH "")
FOREACH(header ${HEADERS})
LIST(APPEND HEADERS_FULL_PATH "${CMAKE_SOURCE_DIR}/${header}")
GET_FILENAME_COMPONENT(headerName ${header} NAME)
GET_FILENAME_COMPONENT(headerPath ${header} PATH)
INSTALL(FILES ${${PROJECT_NAME}_SOURCE_DIR}/${header}
DESTINATION ${CMAKE_INSTALL_PREFIX}/${headerPath}
PERMISSIONS OWNER_READ GROUP_READ WORLD_READ OWNER_WRITE)
ENDFOREACH(header ${HEADERS})
# --- MAIN LIBRARY -------------------------------------------------------------
ADD_SUBDIRECTORY(src)
# --- BINDINGS ----------------------------------------------------------------
#ADD_SUBDIRECTORY(bindings)
# --- UNIT TESTS ---------------------------------------------------------------
#ADD_SUBDIRECTORY(unittest)
# --- PACKAGING ----------------------------------------------------------------
PKG_CONFIG_APPEND_LIBS(${PROJECT_NAME})
PKG_CONFIG_APPEND_BOOST_LIBS(serialization)
SETUP_PROJECT_FINALIZE()
# Copyright (C) 2008-2016 LAAS-CNRS, JRL AIST-CNRS.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU 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 General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
MACRO(ADD_GROUP GROUP_NAME FILENAMES)
FOREACH(filename ${${FILENAMES}})
GET_FILENAME_COMPONENT(filenamePath ${filename} PATH)
IF(NOT (filenamePath STREQUAL ""))
STRING(REGEX REPLACE "${CMAKE_SOURCE_DIR}/include" "" filenamePath ${filenamePath})
STRING(REGEX REPLACE "${CMAKE_SOURCE_DIR}" "" filenamePath ${filenamePath})
STRING(REGEX REPLACE "/" "\\\\" filenamePath ${filenamePath})
SOURCE_GROUP("${GROUP_NAME}\\${filenamePath}" FILES ${filename})
ELSE()
SOURCE_GROUP("${GROUP_NAME}" FILES ${filename})
ENDIF()
ENDFOREACH()
ENDMACRO(ADD_GROUP)
MACRO(ADD_HEADER_GROUP FILENAMES)
ADD_GROUP("Header Files" ${FILENAMES})
ENDMACRO(ADD_HEADER_GROUP FILENAMES)
MACRO(ADD_SOURCE_GROUP FILENAMES)
ADD_GROUP("Source Files" ${FILENAMES})
ENDMACRO(ADD_SOURCE_GROUP FILENAMES)
//
// Copyright (c) 2017 CNRS
//
// This file is part of PinInvDyn
// pinocchio 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.
// pinocchio 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
// General Lesser Public License for more details. You should have
// received a copy of the GNU Lesser General Public License along with
// pinocchio If not, see
// <http://www.gnu.org/licenses/>.
//
#ifndef __invdyn_math_fwd_hpp__
#define __invdyn_math_fwd_hpp__
namespace pininvdyn
{
namespace math
{
}
}
#endif // ifndef __invdyn_math_fwd_hpp__
//
// Copyright (c) 2017 CNRS
//
// This file is part of PinInvDyn
// pinocchio 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.
// pinocchio 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
// General Lesser Public License for more details. You should have
// received a copy of the GNU Lesser General Public License along with
// pinocchio If not, see
// <http://www.gnu.org/licenses/>.
//
#ifndef __invdyn_solvers_fwd_hpp__
#define __invdyn_solvers_fwd_hpp__
namespace pininvdyn
{
namespace solvers
{
}
}
#endif // ifndef __invdyn_solvers_fwd_hpp__
//
// Copyright (c) 2017 CNRS
//
// This file is part of PinInvDyn
// pinocchio 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.
// pinocchio 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
// General Lesser Public License for more details. You should have
// received a copy of the GNU Lesser General Public License along with
// pinocchio If not, see
// <http://www.gnu.org/licenses/>.
//
#ifndef __invdyn_tasks_fwd_hpp__
#define __invdyn_tasks_fwd_hpp__
namespace pininvdyn
{
namespace tasks
{
}
}
#endif // ifndef __invdyn_tasks_fwd_hpp__
//
// Copyright (c) 2017 CNRS
//
// This file is part of PinInvDyn
// pinocchio 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.
// pinocchio 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
// General Lesser Public License for more details. You should have
// received a copy of the GNU Lesser General Public License along with
// pinocchio If not, see
// <http://www.gnu.org/licenses/>.
//
#ifndef __invdyn_tasks_task_base_hpp__
#define __invdyn_tasks_task_base_hpp__
namespace pininvdyn
{
namespace tasks
{
///
/// \brief Base template of a Task.
/// Each class is defined according to a constant model of a robot.
///
class TaskBase
{
public:
typedef double Scalar;
typedef se3::Model Model;
TaskBase(const Model & model)
: m_model(model)
{}
///
/// \brief Return the dimension of the task.
/// \info should be overloaded in the child class.
virtual int dim() const = 0;
virtual int nq() const = 0;
virtual int nv() const = 0;
///
/// \brief Accessor to model.
///
/// \returns a const reference on the model.
///
const Model & model() const { return m_model; };
protected:
///
/// \brief Reference on the robot model.
///
const Model & m_model;
};
}
}
#endif // ifndef __invdyn_tasks_task_base_hpp__
\ No newline at end of file
#
# Copyright (c) 2017 CNRS
#
# This file is part of PinInvDyn
# pinocchio 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.
# pinocchio 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
# General Lesser Public License for more details. You should have
# received a copy of the GNU Lesser General Public License along with
# pinocchio If not, see
# <http://www.gnu.org/licenses/>.
# --- MAIN LIBRARY --- #
SET(LIBRARY_NAME ${PROJECT_NAME})
SET(${LIBRARY_NAME}_MATH_SOURCES
)
SET(${LIBRARY_NAME}_TASKS_SOURCES
tasks/task-base.cpp
)
SET(${LIBRARY_NAME}_SOLVERS_SOURCES
solvers/solver-base.cpp
)
SET(${LIBRARY_NAME}_SOURCES
${${LIBRARY_NAME}_MATH_SOURCES}
${${LIBRARY_NAME}_TASKS_SOURCES}
${${LIBRARY_NAME}_SOLVERS_SOURCES}
)
ADD_LIBRARY(${LIBRARY_NAME} SHARED ${HEADERS_FULL_PATH} ${${LIBRARY_NAME}_SOURCES})
SET_TARGET_PROPERTIES(${LIBRARY_NAME} PROPERTIES LINKER_LANGUAGE CXX)
ADD_HEADER_GROUP(HEADERS_FULL_PATH)
ADD_SOURCE_GROUP(${LIBRARY_NAME}_SOURCES)
PKG_CONFIG_USE_DEPENDENCY(${LIBRARY_NAME} eigen3)
PKG_CONFIG_USE_DEPENDENCY(${LIBRARY_NAME} pinocchio)
INSTALL(TARGETS ${PROJECT_NAME} DESTINATION lib)
//
// Copyright (c) 2017 CNRS
//
// This file is part of PinInvDyn
// pinocchio 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.
// pinocchio 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
// General Lesser Public License for more details. You should have
// received a copy of the GNU Lesser General Public License along with
// pinocchio If not, see
// <http://www.gnu.org/licenses/>.
//
namespace pininvdyn
{
namespace solvers
{
}
}
//
// Copyright (c) 2017 CNRS
//
// This file is part of PinInvDyn
// pinocchio 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.
// pinocchio 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
// General Lesser Public License for more details. You should have
// received a copy of the GNU Lesser General Public License along with
// pinocchio If not, see
// <http://www.gnu.org/licenses/>.
//
#include <Eigen/Dense>
#include <pinocchio/multibody/model.hpp>
namespace pininvdyn
{
namespace tasks
{
}
}
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