Commit d2842f60 authored by Guilhem Saurel's avatar Guilhem Saurel
Browse files

[CMake] clean: keep minimal required instructions

parent 87f12d32
# Copyright 2014-2018, Andrea Del Prete, LAAS/CNRS
# Thomas Flayols, LAAS/CNRS
# Olivier Stasse, LAAS/CNRS
# Florent Forget, LAAS/CNRS
# Paul Dandignac, LAAS/CNRS
# Copyright 2014-2020
# Andrea Del Prete, LAAS-CNRS
# Thomas Flayols, LAAS-CNRS
# Olivier Stasse, LAAS-CNRS
# Florent Forget, LAAS-CNRS
# Paul Dandignac, LAAS-CNRS
# Noëlie Ramuzat, LAAS-CNRS
# Guilhem Saurel, LAAS-CNRS
#
CMAKE_MINIMUM_REQUIRED(VERSION 3.1)
SET(PROJECT_NAMESPACE stack-of-tasks)
# Project properties
SET(PROJECT_ORG stack-of-tasks)
SET(PROJECT_NAME sot-torque-control)
SET(PROJECT_DESCRIPTION "Collection of dynamic-graph entities aimed at implementing torque control on different robots.")
SET(PROJECT_URL "https://github.com/${PROJECT_NAMESPACE}/${PROJECT_NAME}")
SET(PROJECT_URL "https://github.com/${PROJECT_ORG}/${PROJECT_NAME}")
# Project options
OPTION(BUILD_PYTHON_INTERFACE "Build the python bindings" ON)
OPTION(INSTALL_PYTHON_INTERFACE_ONLY "Install *ONLY* the python binding" OFF)
OPTION(INSTALL_PYTHON_INTERFACE_ONLY "Install *ONLY* the python bindings" OFF)
OPTION(SUFFIX_SO_VERSION "Suffix library name with its version" ON)
OPTION(INITIALIZE_WITH_NAN "Initialize Eigen entries with NaN" ON)
SET(CUSTOM_HEADER_DIR "sot/torque_control")
SET(DOXYGEN_USE_MATHJAX YES)
SET(CXX_DISABLE_WERROR True)
# Project configuration
IF(NOT INSTALL_PYTHON_INTERFACE_ONLY)
SET(PROJECT_USE_CMAKE_EXPORT TRUE)
ENDIF(NOT INSTALL_PYTHON_INTERFACE_ONLY)
SET(CUSTOM_HEADER_DIR "sot/torque_control")
SET(CXX_DISABLE_WERROR TRUE)
SET(DOXYGEN_USE_MATHJAX YES)
# JRL-cmakemodule setup
INCLUDE(cmake/base.cmake)
INCLUDE(cmake/boost.cmake)
INCLUDE(cmake/python.cmake)
# Project definition
COMPUTE_PROJECT_ARGS(PROJECT_ARGS LANGUAGES CXX)
PROJECT(${PROJECT_NAME} ${PROJECT_ARGS})
......@@ -35,166 +44,82 @@ IF(INITIALIZE_WITH_NAN)
ADD_DEFINITIONS(-DEIGEN_INITIALIZE_MATRICES_BY_NAN)
ENDIF(INITIALIZE_WITH_NAN)
PKG_CONFIG_APPEND_LIBS("sot-torque-control")
SET(BOOST_COMPONENTS thread filesystem program_options unit_test_framework system regex)
# Project dependencies
ADD_PROJECT_DEPENDENCY(sot-core REQUIRED PKG_CONFIG_REQUIRES sot-core)
ADD_PROJECT_DEPENDENCY(tsid REQUIRED PKG_CONFIG_REQUIRES tsid)
ADD_PROJECT_DEPENDENCY(ddp-actuator-solver REQUIRED PKG_CONFIG_REQUIRES ddp-actuator-solver)
ADD_REQUIRED_DEPENDENCY("parametric-curves")
ADD_REQUIRED_DEPENDENCY("simple_humanoid_description")
SET(BOOST_COMPONENTS filesystem system thread program_options
unit_test_framework regex)
IF(BUILD_PYTHON_INTERFACE)
FINDPYTHON()
STRING(REGEX REPLACE "-" "_" PYTHON_DIR ${CUSTOM_HEADER_DIR})
ADD_PROJECT_DEPENDENCY(dynamic-graph-python REQUIRED
PKG_CONFIG_REQUIRES dynamic-graph-python)
SET(BOOST_COMPONENTS ${BOOST_COMPONENTS} python)
ADD_PROJECT_DEPENDENCY(dynamic-graph-python 3.0.0 REQUIRED PKG_CONFIG_REQUIRES "dynamic-graph-python >= 3.0.0")
SET(PYTHON_LIBRARY_DIR dynamic_graph/sot/torque_control)
SET(PYTHON_INSTALL_DIR ${PYTHON_SITELIB}/${PYTHON_LIBRARY_DIR})
INCLUDE_DIRECTORIES(SYSTEM ${PYTHON_INCLUDE_DIR})
ENDIF(BUILD_PYTHON_INTERFACE)
SEARCH_FOR_BOOST()
ADD_PROJECT_DEPENDENCY(Eigen3 REQUIRED PKG_CONFIG_REQUIRES eigen3)
ADD_PROJECT_DEPENDENCY(dynamic-graph 3.8.0 REQUIRED PKG_CONFIG_REQUIRES "dynamic-graph >= 3.8.0")
ADD_PROJECT_DEPENDENCY(sot-core 4.8.0 REQUIRED PKG_CONFIG_REQUIRES "sot-core >= 4.8.0")
ADD_PROJECT_DEPENDENCY(pinocchio 2.3.1 REQUIRED PKG_CONFIG_REQUIRES "pinocchio >= 2.3.1")
ADD_REQUIRED_DEPENDENCY("tsid")
ADD_REQUIRED_DEPENDENCY("parametric-curves")
ADD_REQUIRED_DEPENDENCY("simple_humanoid_description")
ADD_OPTIONAL_DEPENDENCY("ddp-actuator-solver")
SET(SOTTORQUECONTROL_LIB_NAME ${PROJECT_NAME})
SET(LIBRARY_NAME ${SOTTORQUECONTROL_LIB_NAME})
SET(${LIBRARY_NAME}_HEADERS
include/sot/torque_control/joint-torque-controller.hh
include/sot/torque_control/base-estimator.hh
include/sot/torque_control/numerical-difference.hh
include/sot/torque_control/motor-model.hh
include/sot/torque_control/joint-trajectory-generator.hh
include/sot/torque_control/se3-trajectory-generator.hh
include/sot/torque_control/free-flyer-locator.hh
include/sot/torque_control/inverse-dynamics-balance-controller.hh
include/sot/torque_control/position-controller.hh
include/sot/torque_control/control-manager.hh
include/sot/torque_control/current-controller.hh
include/sot/torque_control/commands-helper.hh
include/sot/torque_control/device-torque-ctrl.hh
include/sot/torque_control/trace-player.hh
include/sot/torque_control/torque-offset-estimator.hh
include/sot/torque_control/imu_offset_compensation.hh
include/sot/torque_control/admittance-controller.hh
include/sot/torque_control/utils/trajectory-generators.hh
include/sot/torque_control/utils/lin-estimator.hh
include/sot/torque_control/utils/poly-estimator.hh
include/sot/torque_control/utils/quad-estimator.hh
include/sot/torque_control/utils/Stdafx.hh
include/sot/torque_control/utils/vector-conversions.hh
# Main Library
SET(${PROJECT_NAME}_HEADERS
include/${CUSTOM_HEADER_DIR}/joint-torque-controller.hh
include/${CUSTOM_HEADER_DIR}/base-estimator.hh
include/${CUSTOM_HEADER_DIR}/numerical-difference.hh
include/${CUSTOM_HEADER_DIR}/motor-model.hh
include/${CUSTOM_HEADER_DIR}/joint-trajectory-generator.hh
include/${CUSTOM_HEADER_DIR}/se3-trajectory-generator.hh
include/${CUSTOM_HEADER_DIR}/free-flyer-locator.hh
include/${CUSTOM_HEADER_DIR}/inverse-dynamics-balance-controller.hh
include/${CUSTOM_HEADER_DIR}/position-controller.hh
include/${CUSTOM_HEADER_DIR}/control-manager.hh
include/${CUSTOM_HEADER_DIR}/current-controller.hh
include/${CUSTOM_HEADER_DIR}/commands-helper.hh
include/${CUSTOM_HEADER_DIR}/device-torque-ctrl.hh
include/${CUSTOM_HEADER_DIR}/trace-player.hh
include/${CUSTOM_HEADER_DIR}/torque-offset-estimator.hh
include/${CUSTOM_HEADER_DIR}/imu_offset_compensation.hh
include/${CUSTOM_HEADER_DIR}/admittance-controller.hh
include/${CUSTOM_HEADER_DIR}/utils/trajectory-generators.hh
include/${CUSTOM_HEADER_DIR}/utils/lin-estimator.hh
include/${CUSTOM_HEADER_DIR}/utils/poly-estimator.hh
include/${CUSTOM_HEADER_DIR}/utils/quad-estimator.hh
include/${CUSTOM_HEADER_DIR}/utils/Stdafx.hh
include/${CUSTOM_HEADER_DIR}/utils/vector-conversions.hh
)
SET(${LIBRARY_NAME}_SOURCES ${${LIBRARY_NAME}_HEADERS}
src/trajectory-generators.cpp
src/lin-estimator.cpp
src/poly-estimator.cpp
src/quad-estimator.cpp
src/motor-model.cpp
)
ADD_LIBRARY(${LIBRARY_NAME} SHARED ${${LIBRARY_NAME}_SOURCES})
SET_TARGET_PROPERTIES(${LIBRARY_NAME}
PROPERTIES
SOVERSION ${PROJECT_VERSION}
INSTALL_RPATH ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR})
TARGET_LINK_LIBRARIES(${LIBRARY_NAME} dynamic-graph::dynamic-graph)
TARGET_LINK_LIBRARIES(${LIBRARY_NAME} sot-core::sot-core)
PKG_CONFIG_USE_DEPENDENCY(${LIBRARY_NAME} pinocchio)
PKG_CONFIG_USE_DEPENDENCY(${LIBRARY_NAME} tsid)
PKG_CONFIG_USE_DEPENDENCY(${LIBRARY_NAME} parametric-curves)
IF(BUILD_PYTHON_INTERFACE)
ADD_SUBDIRECTORY(python/${PYTHON_LIBRARY_DIR})
ENDIF(BUILD_PYTHON_INTERFACE)
SET(${PROJECT_NAME}_SOURCES
src/trajectory-generators.cpp
src/lin-estimator.cpp
src/poly-estimator.cpp
src/quad-estimator.cpp
src/motor-model.cpp
)
IF(UNIX)
TARGET_LINK_LIBRARIES(${LIBRARY_NAME} ${CMAKE_DL_LIBS})
ENDIF(UNIX)
IF(UNIX AND NOT APPLE)
TARGET_LINK_LIBRARIES(${LIBRARY_NAME} pthread)
ENDIF(UNIX AND NOT APPLE)
ADD_LIBRARY(${PROJECT_NAME} SHARED
${${PROJECT_NAME}_SOURCES} ${${PROJECT_NAME}_HEADERS})
TARGET_INCLUDE_DIRECTORIES(${PROJECT_NAME} PUBLIC $<INSTALL_INTERFACE:include>)
TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${Boost_LIBRARIES}
tsid::tsid sot-core::sot-core ddp-actuator-solver::ddp-actuator-solver)
TARGET_LINK_LIBRARIES(${LIBRARY_NAME} ${Boost_LIBRARIES})
IF(SUFFIX_SO_VERSION)
SET_TARGET_PROPERTIES(${PROJECT_NAME} PROPERTIES SOVERSION ${PROJECT_VERSION})
ENDIF(SUFFIX_SO_VERSION)
IF (NOT INSTALL_PYTHON_INTERFACE_ONLY)
INSTALL(TARGETS ${LIBRARY_NAME}
EXPORT ${TARGETS_EXPORT_NAME}
DESTINATION ${CMAKE_INSTALL_LIBDIR})
IF(NOT INSTALL_PYTHON_INTERFACE_ONLY)
INSTALL(TARGETS ${PROJECT_NAME} EXPORT ${TARGETS_EXPORT_NAME} DESTINATION lib)
ENDIF(NOT INSTALL_PYTHON_INTERFACE_ONLY)
IF(BUILD_PYTHON_INTERFACE)
INSTALL(FILES python/dynamic_graph/sot/torque_control/__init__.py
python/dynamic_graph/sot/torque_control/main.py
python/dynamic_graph/sot/torque_control/create_entities_utils.py
python/dynamic_graph/sot/torque_control/main_sim.py
DESTINATION ${PYTHON_SITELIB}/dynamic_graph/sot/torque_control)
INSTALL(FILES
python/dynamic_graph/sot/torque_control/identification/__init__.py
python/dynamic_graph/sot/torque_control/identification/identification_utils.py
DESTINATION ${PYTHON_SITELIB}/dynamic_graph/sot/torque_control/identification)
INSTALL(FILES python/dynamic_graph/sot/torque_control/utils/__init__.py
python/dynamic_graph/sot/torque_control/utils/plot_utils.py
python/dynamic_graph/sot/torque_control/utils/sot_utils.py
python/dynamic_graph/sot/torque_control/utils/filter_utils.py
DESTINATION ${PYTHON_SITELIB}/dynamic_graph/sot/torque_control/utils)
INSTALL(FILES python/dynamic_graph/sot/torque_control/tests/__init__.py
python/dynamic_graph/sot/torque_control/tests/test_control_manager.py
python/dynamic_graph/sot/torque_control/tests/test_balance_ctrl_openhrp.py
python/dynamic_graph/sot/torque_control/tests/test_velocity_filters.py
DESTINATION ${PYTHON_SITELIB}/dynamic_graph/sot/torque_control/tests)
ENDIF(BUILD_PYTHON_INTERFACE)
ADD_SUBDIRECTORY(src)
ADD_SUBDIRECTORY(unitTesting)
# *****************************
# PYTHON interface *
# *****************************
IF(BUILD_PYTHON_INTERFACE)
IF(TALOS_DATA_FOUND)
FOREACH(py_filename test_torque_offset_estimator)
CONFIGURE_FILE(
${PROJECT_SOURCE_DIR}/python/dynamic_graph/sot/torque_control/tests/${py_filename}.py.in
${PROJECT_BINARY_DIR}/python/dynamic_graph/sot/torque_control/tests/${py_filename}.py
)
INSTALL(FILES
${PROJECT_BINARY_DIR}/python/dynamic_graph/sot/torque_control/tests/${py_filename}.py
DESTINATION
${PYTHON_SITELIB}/dynamic_graph/sot/torque_control/tests)
ENDFOREACH(py_filename)
ENDIF(TALOS_DATA_FOUND)
IF(SIMPLE_HUMANOID_DESCRIPTION_FOUND)
FOREACH(py_filename robot_data_test)
CONFIGURE_FILE(${PROJECT_SOURCE_DIR}/python/dynamic_graph/sot/torque_control/tests/${py_filename}.py.in
${PROJECT_BINARY_DIR}/python/dynamic_graph/sot/torque_control/tests/${py_filename}.py
)
INSTALL(FILES ${PROJECT_BINARY_DIR}/python/dynamic_graph/sot/torque_control/tests/${py_filename}.py
DESTINATION
${PYTHON_SITELIB}/dynamic_graph/sot/torque_control/tests)
ENDFOREACH(py_filename)
ENDIF(SIMPLE_HUMANOID_DESCRIPTION_FOUND)
ADD_SUBDIRECTORY(python)
ENDIF(BUILD_PYTHON_INTERFACE)
ADD_SUBDIRECTORY(tests)
PKG_CONFIG_APPEND_LIBS(${PROJECT_NAME})
IF(NOT INSTALL_PYTHON_INTERFACE_ONLY)
ADD_SUBDIRECTORY(include/${CUSTOM_HEADER_DIR})
INSTALL(FILES package.xml DESTINATION share/${PROJECT_NAME})
ENDIF(NOT INSTALL_PYTHON_INTERFACE_ONLY)
ADD_SUBDIRECTORY(src)
ADD_SUBDIRECTORY(unitTesting)
Subproject commit f5e018896d0b1746a03f07ba02a5199e17eaee67
Subproject commit 321eb1ccf1d94570eb564f3659b13ef3ef82239e
......@@ -6,10 +6,9 @@
# get the python script install path
IF(BUILD_PYTHON_INTERFACE)
INCLUDE(../cmake/sphinx.cmake)
SPHINX_SETUP()
SPHINX_FINALIZE()
INSTALL (FILES
INSTALL(FILES
pictures/feature.png
pictures/task.png
DESTINATION ${_PKG_CONFIG_DOXYGENDOCDIR}/pictures)
......
SET(${LIBRARY_NAME}_HEADERS
joint-torque-controller.hh
base-estimator.hh
numerical-difference.hh
motor-model.hh
joint-trajectory-generator.hh
se3-trajectory-generator.hh
free-flyer-locator.hh
inverse-dynamics-balance-controller.hh
position-controller.hh
control-manager.hh
current-controller.hh
commands-helper.hh
device-torque-ctrl.hh
trace-player.hh
torque-offset-estimator.hh
imu_offset_compensation.hh
admittance-controller.hh
)
SET(${LIBRARY_NAME}_HEADERS_UTILS
utils/trajectory-generators.hh
utils/lin-estimator.hh
utils/poly-estimator.hh
utils/quad-estimator.hh
utils/Stdafx.hh
utils/vector-conversions.hh
)
INSTALL(FILES ${${LIBRARY_NAME}_HEADERS} DESTINATION include/${CUSTOM_HEADER_DIR})
INSTALL(FILES ${${LIBRARY_NAME}_HEADERS_UTILS} DESTINATION include/${CUSTOM_HEADER_DIR}/utils)
......@@ -23,8 +23,8 @@
#include <ddp-actuator-solver/ddpsolver.hh>
#include <ddp-actuator-solver/examples/dctemp.hh>
#include <ddp-actuator-solver/examples/costtemp.hh>
#include <ddp-actuator-solver/temperature_control/dctemp.hh>
#include <ddp-actuator-solver/temperature_control/costtemp.hh>
namespace dynamicgraph {
namespace sot {
......
......@@ -3,7 +3,7 @@
*
* LAAS-CNRS
*
* Noelie RAMUZAT
* Noelie RAMUZAT
* This file is part of sot-torque-control.
* See license file.
*/
......@@ -14,14 +14,14 @@
/* --- API ------------------------------------------------------------- */
/* --------------------------------------------------------------------- */
#if defined (WIN32)
# if defined (sot_ddp_pyrene_actuator_EXPORTS)
# define SOTDDPPYRENEACTUATORSOLVER_EXPORT __declspec(dllexport)
# else
# define SOTDDPPYRENEACTUATORSOLVER_EXPORT __declspec(dllimport)
# endif
#if defined(WIN32)
#if defined(sot_ddp_pyrene_actuator_EXPORTS)
#define SOTDDPPYRENEACTUATORSOLVER_EXPORT __declspec(dllexport)
#else
# define SOTDDPPYRENEACTUATORSOLVER_EXPORT
#define SOTDDPPYRENEACTUATORSOLVER_EXPORT __declspec(dllimport)
#endif
#else
#define SOTDDPPYRENEACTUATORSOLVER_EXPORT
#endif
/* --------------------------------------------------------------------- */
......@@ -37,77 +37,70 @@
#include <ddp-actuator-solver/ddpsolver.hh>
#include <ddp-actuator-solver/examples/pyreneCostFunction.hh>
#include <ddp-actuator-solver/examples/pyreneActuator.hh>
#include <ddp-actuator-solver/pyrene_actuator/pyreneCostFunction.hh>
#include <ddp-actuator-solver/pyrene_actuator/pyreneActuator.hh>
namespace dynamicgraph {
namespace sot {
namespace torque_control {
class SOTDDPPYRENEACTUATORSOLVER_EXPORT DdpPyreneActuatorSolver
: public :: dynamicgraph::Entity
{
DYNAMIC_GRAPH_ENTITY_DECL();
public:
EIGEN_MAKE_ALIGNED_OPERATOR_NEW
/** Constructor */
DdpPyreneActuatorSolver(const std::string &name);
/* --- SIGNALS --- */
DECLARE_SIGNAL_IN(pos_des, dynamicgraph::Vector);
DECLARE_SIGNAL_IN(pos_joint_measure, dynamicgraph::Vector);
DECLARE_SIGNAL_IN(dx_joint_measure, dynamicgraph::Vector);
DECLARE_SIGNAL_IN(tau_des, dynamicgraph::Vector);
DECLARE_SIGNAL_OUT(tau, dynamicgraph::Vector);
/* --- ENTITY INHERITANCE --- */
virtual void display(std::ostream &os) const;
protected:
dynamicgraph::Vector m_previous_tau;
double m_dt;
bool m_initSucceeded;
DDPSolver<double, 2, 1>::stateVec_t m_zeroState;
DDPSolver<double, 2, 1>::commandVec_t m_u;
unsigned int m_T;
double m_stopCrit;
unsigned int m_iterMax;
pyreneActuator m_model;
CostFunctionPyreneActuator m_cost;
DDPSolver<double, 2, 1> m_solver;
/** Initialize the DDP.
* @param timestep Control period (in seconds).
* @param T Size of the preview window (in nb of timestep).
* @param nbItMax Maximum number of iterations.
* @param stopCriteria The value of the stopping criteria.
*/
void param_init(const double &timestep,
const int &T,
const int &nbItMax,
const double &stopCriteria);
// /* --- SETTER LIM --- */
void setTorqueLimit(const double& tau);
void setJointLimit(const double& upperLim, const double& lowerLim);
void setJointVelLimit(const double& upperLim, const double& lowerLim);
// /* --- SETTER LOAD --- */
void setLoadParam(const double& mass, const double& coordX, const double& coordY);
void setLoadMass(const double& mass);
void removeLoad();
// /* --- SETTER GAINS --- */
void setCostGainState(const dynamicgraph::Vector& Q);
void setCostGainStateConstraint(const dynamicgraph::Vector& W);
void setCostGainCommand(const dynamicgraph::Vector& R);
void setCostGainTorqueConstraint(const dynamicgraph::Vector& P);
class SOTDDPPYRENEACTUATORSOLVER_EXPORT DdpPyreneActuatorSolver : public ::dynamicgraph::Entity {
DYNAMIC_GRAPH_ENTITY_DECL();
public:
EIGEN_MAKE_ALIGNED_OPERATOR_NEW
/** Constructor */
DdpPyreneActuatorSolver(const std::string& name);
/* --- SIGNALS --- */
DECLARE_SIGNAL_IN(pos_des, dynamicgraph::Vector);
DECLARE_SIGNAL_IN(pos_joint_measure, dynamicgraph::Vector);
DECLARE_SIGNAL_IN(dx_joint_measure, dynamicgraph::Vector);
DECLARE_SIGNAL_IN(tau_des, dynamicgraph::Vector);
DECLARE_SIGNAL_OUT(tau, dynamicgraph::Vector);
/* --- ENTITY INHERITANCE --- */
virtual void display(std::ostream& os) const;
protected:
dynamicgraph::Vector m_previous_tau;
double m_dt;
bool m_initSucceeded;
DDPSolver<double, 2, 1>::stateVec_t m_zeroState;
DDPSolver<double, 2, 1>::commandVec_t m_u;
unsigned int m_T;
double m_stopCrit;
unsigned int m_iterMax;
pyreneActuator m_model;
CostFunctionPyreneActuator m_cost;
DDPSolver<double, 2, 1> m_solver;
/** Initialize the DDP.
* @param timestep Control period (in seconds).
* @param T Size of the preview window (in nb of timestep).
* @param nbItMax Maximum number of iterations.
* @param stopCriteria The value of the stopping criteria.
*/
void param_init(const double& timestep, const int& T, const int& nbItMax, const double& stopCriteria);
// /* --- SETTER LIM --- */
void setTorqueLimit(const double& tau);
void setJointLimit(const double& upperLim, const double& lowerLim);
void setJointVelLimit(const double& upperLim, const double& lowerLim);
// /* --- SETTER LOAD --- */
void setLoadParam(const double& mass, const double& coordX, const double& coordY);
void setLoadMass(const double& mass);
void removeLoad();
// /* --- SETTER GAINS --- */
void setCostGainState(const dynamicgraph::Vector& Q);
void setCostGainStateConstraint(const dynamicgraph::Vector& W);
void setCostGainCommand(const dynamicgraph::Vector& R);
void setCostGainTorqueConstraint(const dynamicgraph::Vector& P);
};
} // namespace torque_control
} // namespace sot
} // namespace dynamicgraph
#endif // _SOT_SIMPLE_DDP_ACTUATOR_SOLVER_H
} // namespace torque_control
} // namespace sot
} // namespace dynamicgraph
#endif // _SOT_SIMPLE_DDP_ACTUATOR_SOLVER_H
INSTALL(FILES
SET(${PROJECT_NAME}_PYTHON_FILES
__init__.py
main.py
create_entities_utils.py
main_sim.py
DESTINATION ${PYTHON_INSTALL_DIR})
)
INSTALL(FILES
identification/__init__.py
identification/identification_utils.py
DESTINATION ${PYTHON_INSTALL_DIR}/identification)
SET(${PROJECT_NAME}_PYTHON_IDENTIFICATION
__init__.py
identification_utils.py
)
SET(${PROJECT_NAME}_PYTHON_UTILS
__init__.py
plot_utils.py
sot_utils.py
filter_utils.py
)
SET(${PROJECT_NAME}_PYTHON_TESTS
__init__.py
test_control_manager.py
test_balance_ctrl_openhrp.py
test_velocity_filters.py
)
FOREACH(file ${${PROJECT_NAME}_PYTHON_FILES})
PYTHON_INSTALL_ON_SITE("dynamic_graph/${PYTHON_DIR}" ${file})
ENDFOREACH(file ${${PROJECT_NAME}_PYTHON_FILES})
FOREACH(file ${${PROJECT_NAME}_PYTHON_IDENTIFICATION})
PYTHON_INSTALL_ON_SITE("dynamic_graph/${PYTHON_DIR}/identification" ${file})
ENDFOREACH(file ${${PROJECT_NAME}_PYTHON_IDENTIFICATION})
INSTALL(FILES
utils/__init__.py
utils/plot_utils.py
utils/sot_utils.py
utils/filter_utils.py
DESTINATION ${PYTHON_INSTALL_DIR}/utils)
FOREACH(file ${${PROJECT_NAME}_PYTHON_UTILS})
PYTHON_INSTALL_ON_SITE("dynamic_graph/${PYTHON_DIR}/utils"${file})
ENDFOREACH(file ${${PROJECT_NAME}_PYTHON_UTILS})
INSTALL(FILES
tests/__init__.py
tests/test_control_manager.py
tests/test_balance_ctrl_openhrp.py
tests/test_velocity_filters.py
DESTINATION ${PYTHON_INSTALL_DIR}/tests)
FOREACH(file ${${PROJECT_NAME}_PYTHON_TESTS})
PYTHON_INSTALL_ON_SITE("dynamic_graph/${PYTHON_DIR}/tests" ${file})
ENDFOREACH(file ${${PROJECT_NAME}_PYTHON_TESTS})
SET(${PROJECT_NAME}_PYTHON_CONFIGURABLE_FILES)
......@@ -43,9 +59,9 @@ ENDIF(SIMPLE_HUMANOID_DESCRIPTION_FOUND)
FOREACH(py_filename ${${PROJECT_NAME}_PYTHON_CONFIGURABLE_FILES})
CONFIGURE_FILE(
tests/${py_filename}.py.in
tests/${py_filename}.py
"dynamic_graph/${PYTHON_DIR}/tests/${py_filename}.py.in"
"dynamic_graph/${PYTHON_DIR}/tests/${py_filename}.py"
)
INSTALL(FILES tests/${py_filename}.py DESTINATION ${PYTHON_INSTALL_DIR}/tests)
PYTHON_INSTALL_ON_SITE("dynamic_graph/${PYTHON_DIR}/tests" ${py_filename}.py)
ENDFOREACH(py_filename ${${PROJECT_NAME}_PYTHON_CONFIGURABLE_FILES})
# Copyright 2014, Andrea Del Prete, LAAS/CNRS
# Copyright 2014, 2020, Andrea Del Prete, Guilhem Saurel, LAAS-CNRS
#
# Verbosity level
IF(NOT (\"${CMAKE_VERBOSITY_LEVEL}\" STREQUAL \"\"))
ADD_DEFINITIONS(-DVP_DEBUG_MODE=${CMAKE_VERBOSITY_LEVEL} -DVP_DEBUG)
ENDIF(NOT (\"${CMAKE_VERBOSITY_LEVEL}\" STREQUAL \"\"))
IF(UNIX)
ADD_DEFINITIONS(-pthread)
ENDIF(UNIX)
SET(${LIBRARY_NAME}_SOURCES
trajectory-generators.cpp
lin-estimator.cpp
poly-estimator.cpp
quad-estimator.cpp
motor-model.cpp
)
ADD_LIBRARY(${LIBRARY_NAME} SHARED ${${LIBRARY_NAME}_SOURCES})
SET_TARGET_PROPERTIES(${LIBRARY_NAME}
PROPERTIES
SOVERSION ${PROJECT_VERSION}
INSTALL_RPATH ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR})
TARGET_LINK_LIBRARIES(${LIBRARY_NAME}
dynamic-graph::dynamic-graph
sot-core::sot-core
pinocchio::pinocchio
${Boost_LIBRARIES})
PKG_CONFIG_USE_DEPENDENCY(${LIBRARY_NAME} tsid)
PKG_CONFIG_USE_DEPENDENCY(${LIBRARY_NAME} parametric-curves)