ethz-adrl / control-toolbox

The Control Toolbox - An Open-Source C++ Library for Robotics, Optimal and Model Predictive Control
BSD 2-Clause "Simplified" License
1.45k stars 312 forks source link

TermTaskSpaceCG segfaults when compiled with -DCMAKE_BUILD_TYPE=Debug #31

Open markusgft opened 5 years ago

markusgft commented 5 years ago

It works fine with -DCMAKE_BUILD_TYPE=Relwithdebinfo and Release.

markusgft commented 5 years ago

something like this would fail, for state-dim 12. See line 420 onwards Eigen::Matrix<CGScalar, 12, 1> test = x.head(STATE_DIM);

FixBaseIKTest: /usr/include/eigen3/Eigen/src/Core/PlainObjectBase.h:258: void Eigen::PlainObjectBase<Eigen::Matrix<CppAD::AD<CppAD::cg::CG<double> >, 12, 1, 0, 12, 1> >::resize(Index, Index) [Derived = Eigen::Matrix<CppAD::AD<CppAD::cg::CG<double> >, 12, 1, 0, 12, 1>]: Assertion `(!(RowsAtCompileTime!=Dynamic) || (rows==RowsAtCompileTime)) && (!(ColsAtCompileTime!=Dynamic) || (cols==ColsAtCompileTime)) && (!(RowsAtCompileTime==Dynamic && MaxRowsAtCompileTime!=Dynamic) || (rows<=MaxRowsAtCompileTime)) && (!(ColsAtCompileTime==Dynamic && MaxColsAtCompileTime!=Dynamic) || (cols<=MaxColsAtCompileTime)) && rows>=0 && cols>=0 && "Invalid sizes when resizing a matrix or array."' failed.
Aborted (core dumped)