udacity/CarND-Extended-Kalman-Filter-Project

Assertion `aLhs.rows() == aRhs.rows() && aLhs.cols() == aRhs.cols()' failed.

tingfengqi opened this issue · 8 comments

I try to run this project in Qt Creator,then run term2_sim.x86_64,there is a error lead to unexpectedly finished of the program.
Error show:
Starting /home/xiefeng/Udacity/CarND-Extended-Kalman-Filter-Project-master/build/ExtendedKF...
Listening to port 4567
Connected!!!
EKF:
ExtendedKF: /home/xiefeng/Udacity/CarND-Extended-Kalman-Filter-Project-master/src/Eigen/src/Core/CwiseBinaryOp.h:132: Eigen::CwiseBinaryOp<BinaryOp, Lhs, Rhs>::CwiseBinaryOp(const Lhs&, const Rhs&, const BinaryOp&) [with BinaryOp = Eigen::internal::scalar_difference_op; Lhs = const Eigen::Matrix<double, -1, 1>; Rhs = const Eigen::GeneralProduct<Eigen::Matrix<double, -1, -1>, Eigen::Matrix<double, -1, 1>, 4>]: Assertion `aLhs.rows() == aRhs.rows() && aLhs.cols() == aRhs.cols()' failed.
The program has unexpectedly finished.

I have solved this problem, you can close it.
thanks very much!!!

Thanks for updating us on this, and glad to hear you got it solved :)

could you tell me how did you solved this issue? my project have same issue.

Does anyone have a solution to this?

I wanna know this solution. My project has the same issue.

Hi, I am also facing the same issue. Do you know how to resolve?

I resolved. It's due to dimension mismatch. In order to troubleshoot, suspect where matrix calculation (especially, where the matrix multiplication happens), then use 'cout' to print the matrix size to know how the size of each matrix would look like.

Somewhere you are not initializing a dynamic matrix/vector. I had the same error and found the culprit using gdb. I created a vectoxd but did not initialize it, then passed it by reference to a function. Even though, I was initializing it later in the function, I got this error. Once I initialized it (vectorxd myVector = blahblah), the error went away.