udacity / CarND-Extended-Kalman-Filter-Project

Self-Driving Car Nanodegree Program Starter Code for the Extended Kalman Filter Project
MIT License
334 stars 1.56k forks source link

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

Closed tingfengqi closed 6 years ago

tingfengqi commented 6 years ago

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.

tingfengqi commented 6 years ago

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

mvirgo commented 6 years ago

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

StephenZhang945 commented 5 years ago

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

agneevguin commented 5 years ago

Does anyone have a solution to this?

jeongwhanchoi commented 5 years ago

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

SeokLeeUS commented 5 years ago

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

SeokLeeUS commented 5 years ago

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.

nimasarli commented 5 years ago

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.