Compilation error
Opened this issue · 2 comments
rs1990 commented
Hello,
I keep getting this error whenever i try to compile it. any help?
kalman.hpp:13:9: warning: #pragma once in main file [enabled by default]
#pragma once
^
kalman-test.cpp: In function ‘int main(int, char**)’:
kalman-test.cpp:43:32: error: no matching function for call to ‘KalmanFilter::KalmanFilter(Eigen::MatrixXd&, Eigen::MatrixXd&, Eigen::MatrixXd&, Eigen::MatrixXd&, Eigen::MatrixXd&)’
KalmanFilter kf(A, C, Q, R, P);
^
kalman-test.cpp:43:32: note: candidates are:
In file included from kalman-test.cpp:12:0:
kalman.hpp:39:3: note: KalmanFilter::KalmanFilter()
KalmanFilter();
^
kalman.hpp:39:3: note: candidate expects 0 arguments, 5 provided
kalman.hpp:27:3: note: KalmanFilter::KalmanFilter(double, const MatrixXd&, const MatrixXd&, const MatrixXd&, const MatrixXd&, const MatrixXd&)
KalmanFilter(
^
kalman.hpp:27:3: note: candidate expects 6 arguments, 5 provided
kalman.hpp:15:7: note: KalmanFilter::KalmanFilter(const KalmanFilter&)
class KalmanFilter {
^
kalman.hpp:15:7: note: candidate expects 1 argument, 5 provided
kalman.hpp:15:7: note: KalmanFilter::KalmanFilter(KalmanFilter&&)
kalman.hpp:15:7: note: candidate expects 1 argument, 5 provided
kalman-test.cpp:61:13: error: no matching function for call to ‘KalmanFilter::init(Eigen::VectorXd&)’
kf.init(x0);
^
kalman-test.cpp:61:13: note: candidates are:
In file included from kalman-test.cpp:12:0:
kalman.hpp:44:8: note: void KalmanFilter::init()
void init();
^
kalman.hpp:44:8: note: candidate expects 0 arguments, 1 provided
kalman.hpp:49:8: note: void KalmanFilter::init(double, const VectorXd&)
void init(double t0, const Eigen::VectorXd& x0);
^
kalman.hpp:49:8: note: candidate expects 2 arguments, 1 provided
ramitix commented
Change KalmanFilter kf(A, C, Q, R, P);
to KalmanFilter kf(dt,A, C, Q, R, P);
and kf.init(x0);
to kf.init(dt,x0);
bryantaoli commented
Change
KalmanFilter kf(A, C, Q, R, P);
toKalmanFilter kf(dt,A, C, Q, R, P);
andkf.init(x0);
tokf.init(dt,x0);
kf.init(x0);
to kf.init(dt,x0);
may be kf.init(x0);
to kf.init(t,x0);
and move it to double t=0