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

Merge tag 'v4.5.0'

Release of version 4.5.0.
parents 7bab8a8f 3831320e
Pipeline #4227 failed with stage
in 4 minutes and 18 seconds
......@@ -53,7 +53,10 @@ else()
add_definitions(-DCLP_FOUND)
endif()
INCLUDE_DIRECTORIES(${qpOASES_INCLUDE_DIRS})
IF(CLP_FOUND)
ADD_DEFINITIONS(-DCLP_FOUND)
INCLUDE_DIRECTORIES(SYSTEM "${CLP_INCLUDE_DIR}")
ENDIF()
ADD_SUBDIRECTORY (include/${CUSTOM_HEADER_DIR})
......
#ifndef HPP_CENTROIDAL_DYNAMICS_STDAFX_HH
#define HPP_CENTROIDAL_DYNAMICS_STDAFX_HH
/*
Copyright (c) 2010-2013 Tommaso Urli
......@@ -30,3 +33,5 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include <map>
#include <ctime>
#include <sstream>
#endif
......@@ -3,8 +3,8 @@
* Author: Andrea Del Prete
*/
#ifndef CENTROIDAL_DYNAMICS_LIB_STATIC_EQUILIBRIUM_H
#define CENTROIDAL_DYNAMICS_LIB_STATIC_EQUILIBRIUM_H
#ifndef HPP_CENTROIDAL_DYNAMICS_CENTROIDAL_DYNAMICS_HH
#define HPP_CENTROIDAL_DYNAMICS_CENTROIDAL_DYNAMICS_HH
#include <Eigen/Dense>
#include <hpp/centroidal-dynamics/local_config.hh>
......
......@@ -3,8 +3,8 @@
* Author: Andrea Del Prete
*/
#ifndef _CENTROIDAL_DYNAMICS_LIB_CONFIG_HH
#define _CENTROIDAL_DYNAMICS_LIB_CONFIG_HH
#ifndef HPP_CENTROIDAL_DYNAMICS_LOCAL_CONFIG_HH
#define HPP_CENTROIDAL_DYNAMICS_LOCAL_CONFIG_HH
// Package version (header).
# define CENTROIDAL_DYNAMICS_VERSION "UNKNOWN"
......@@ -54,4 +54,4 @@
# define CENTROIDAL_DYNAMICS_LOCAL CENTROIDAL_DYNAMICS_DLLLOCAL
# endif // CENTROIDAL_DYNAMICS_STATIC
#endif //_CENTROIDAL_DYNAMICS_LIB_CONFIG_HH
#endif // HPP_CENTROIDAL_DYNAMICS_LOCAL_CONFIG_HH
......@@ -3,8 +3,8 @@
* Author: Andrea Del Prete
*/
#ifndef __centroidal_dynamics_lib_logger_H__
#define __centroidal_dynamics_lib_logger_H__
#ifndef HPP_CENTROIDAL_DYNAMICS_LOGGER_HH
#define HPP_CENTROIDAL_DYNAMICS_LOGGER_HH
/* --------------------------------------------------------------------- */
/* --- INCLUDE --------------------------------------------------------- */
......@@ -185,4 +185,4 @@ namespace centroidal_dynamics
} // namespace centroidal_dynamics
#endif // #ifndef __sot_torque_control_trajectory_generators_H__
#endif // HPP_CENTROIDAL_DYNAMICS_LOGGER_HH
......@@ -3,8 +3,8 @@
* Author: Andrea Del Prete
*/
#ifndef CENTROIDAL_DYNAMICS_LIB_SOLVER_LP_ABSTRACT_HH
#define CENTROIDAL_DYNAMICS_LIB_SOLVER_LP_ABSTRACT_HH
#ifndef HPP_CENTROIDAL_DYNAMICS_SOLVER_LP_ABSTRACT_HH
#define HPP_CENTROIDAL_DYNAMICS_SOLVER_LP_ABSTRACT_HH
#include <Eigen/Dense>
#include <hpp/centroidal-dynamics/local_config.hh>
......@@ -149,4 +149,4 @@ public:
} // end namespace centroidal_dynamics
#endif //CENTROIDAL_DYNAMICS_LIB_SOLVER_LP_ABSTRACT_HH
#endif // HPP_CENTROIDAL_DYNAMICS_SOLVER_LP_ABSTRACT_HH
......@@ -3,8 +3,8 @@
* Author: Andrea Del Prete
*/
#ifndef CENTROIDAL_DYNAMICS_LIB_SOLVER_QPOASES_HH
#define CENTROIDAL_DYNAMICS_LIB_SOLVER_QPOASES_HH
#ifndef HPP_CENTROIDAL_DYNAMICS_SOLVER_LP_QPOASES_HH
#define HPP_CENTROIDAL_DYNAMICS_SOLVER_LP_QPOASES_HH
#include <hpp/centroidal-dynamics/local_config.hh>
#include <hpp/centroidal-dynamics/util.hh>
......@@ -49,4 +49,4 @@ public:
} // end namespace centroidal_dynamics
#endif //CENTROIDAL_DYNAMICS_LIB_SOLVER_QPOASES_HH
#endif // HPP_CENTROIDAL_DYNAMICS_SOLVER_LP_QPOASES_HH
......@@ -24,9 +24,8 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#ifndef WBR_STOPWATCH_H
#define WBR_STOPWATCH_H
#ifndef HPP_CENTROIDAL_DYNAMICS_STOP_WATCH_HH
#define HPP_CENTROIDAL_DYNAMICS_STOP_WATCH_HH
#include "hpp/centroidal-dynamics/Stdafx.hh"
......
......@@ -2,8 +2,8 @@
* Copyright 2015, LAAS-CNRS
* Author: Andrea Del Prete
*/
#ifndef _CENTROIDAL_DYNAMICS_LIB_UTIL_HH
#define _CENTROIDAL_DYNAMICS_LIB_UTIL_HH
#ifndef HPP_CENTROIDAL_DYNAMICS_UTIL_HH
#define HPP_CENTROIDAL_DYNAMICS_UTIL_HH
#include <iostream>
#include <fstream>
......@@ -174,25 +174,20 @@ namespace centroidal_dynamics
* @return nchoosek by k long matrix where each row is a unique k-size
* the first one, with all zeros.
*/
template < typename DerivedV, typename DerivedU>
void nchoosek(
const Eigen::MatrixBase<DerivedV> & V,
const int k,
Eigen::PlainObjectBase<DerivedU> & U)
{
using namespace Eigen;
if(V.size() == 0)
{
U.resize(0,k);
return;
}
assert((V.cols() == 1 || V.rows() == 1) && "V must be a vector");
U.resize(nchoosek((int)(V.size()),k),k);
int running_i = 0;
int running_j = 0;
Matrix<typename DerivedU::Scalar,1,Dynamic> running(1,k);
doCombs(running, running_i, running_j, U, V,0,k);
}
} //namespace centroidal_dynamics
#endif //_CENTROIDAL_DYNAMICS_LIB_UTIL_HH
template <typename DerivedV, typename DerivedU>
void nchoosek(const Eigen::MatrixBase<DerivedV>& V, const int k, Eigen::PlainObjectBase<DerivedU>& U) {
using namespace Eigen;
if (V.size() == 0) {
U.resize(0, k);
return;
}
assert((V.cols() == 1 || V.rows() == 1) && "V must be a vector");
U.resize(nchoosek((int)(V.size()), k), k);
int running_i = 0;
int running_j = 0;
Matrix<typename DerivedU::Scalar, 1, Dynamic> running(1, k);
doCombs(running, running_i, running_j, U, V, 0, k);
}
} // namespace centroidal_dynamics
#endif // HPP_CENTROIDAL_DYNAMICS_UTIL_HH
......@@ -20,7 +20,7 @@ SET(${LIBRARY_NAME}_SOURCES
ADD_LIBRARY(${LIBRARY_NAME} SHARED ${${LIBRARY_NAME}_SOURCES})
TARGET_LINK_LIBRARIES(${LIBRARY_NAME} ${CDD_LIBRARIES} ${qpOASES_LIBRARY})
TARGET_INCLUDE_DIRECTORIES(${LIBRARY_NAME} PUBLIC ${CDD_INCLUDE_DIRS})
TARGET_INCLUDE_DIRECTORIES(${LIBRARY_NAME} SYSTEM PUBLIC ${CDD_INCLUDE_DIRS})
PKG_CONFIG_USE_DEPENDENCY(${LIBRARY_NAME} eigen3)
if(CLP_FOUND)
......
......@@ -3,9 +3,7 @@
* Author: Andrea Del Prete
*/
#ifndef _CENTROIDAL_DYNAMICS_LIB_CONFIG_HH
#define _CENTROIDAL_DYNAMICS_LIB_CONFIG_HH
#include <ctime>
#include <hpp/centroidal-dynamics/util.hh>
#include <ctime>
......@@ -208,6 +206,4 @@ value_type nchoosek(const int n, const int k)
}
}
} //namespace centroidal_dynamics
#endif //_CENTROIDAL_DYNAMICS_LIB_CONFIG_HH
} // namespace centroidal_dynamics
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment