Comments (3)
in /uav_dynamics/inno_vtol_dynamics/src/dynamics/vtolDynamicsSim.cpp:701
void InnoVtolDynamicsSim::calculatePolynomialUsingTable(const Eigen::MatrixXd& table,
double airSpeedMod,
Eigen::VectorXd& polynomialCoeffs) const{
size_t prevRowIdx = findRow(table, airSpeedMod);
if(prevRowIdx + 2 <= table.rows()){
size_t nextRowIdx = prevRowIdx + 1;
Eigen::MatrixXd prevRow = table.row(prevRowIdx);
Eigen::MatrixXd nextRow = table.row(nextRowIdx);
double t = (airSpeedMod - prevRow(0, 0)) / (nextRow(0, 0) - prevRow(0, 0));
for(size_t idx = 0; idx < 7; idx++){
polynomialCoeffs[idx] = lerp(prevRow(0, idx + 1), nextRow(0, idx + 1), t); // This line
}
}else{
for(size_t idx = 0; idx < 7; idx++){
polynomialCoeffs[idx] = 0;
}
}
}
nextRow(0, idx + 1)
couldn't be calculated because in function
EIGEN_DEVICE_FUNC
EIGEN_STRONG_INLINE Scalar& coeffRef(Index row, Index col)
{
eigen_internal_assert(row >= 0 && row < rows()
&& col >= 0 && col < cols()); // This assertion fails
return internal::evaluator<Derived>(derived()).coeffRef(row,col);
}
Both col
and cols()
returns** 6 when armed in debug mode. Release and RelWithDebInfo doesn't evaluate assertions. Thus they never crash.
from innopolis_vtol_dynamics.
#define EIGEN_NO_DEBUG
before
#include "vtolDynamicsSim.hpp"
in vtolDynamicsSim.cpp
solved the problem
from innopolis_vtol_dynamics.
@hdbalyozsht Hi. Thanks for the issue. I tried it with DEBUG build type and I got the same error.
I modified tests a little bit and reproduce the problem in test workflow.
Then I fixed it in the next commit, so now it should be ok.
#define EIGEN_NO_DEBUG
is not the solution. The actual problem was related to the fact that CDPolynomial
matrix has the size (8, 6) less than other similar matrices (8, 8). calculatePolynomialUsingTable was hardcoded to handle only the (8, 8) size case. Now it is more robust.
I made fixes here: #12
from innopolis_vtol_dynamics.
Related Issues (7)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from innopolis_vtol_dynamics.