Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Examples do not compile #8

Open
Eheran1 opened this issue Oct 6, 2023 · 2 comments
Open

Examples do not compile #8

Eheran1 opened this issue Oct 6, 2023 · 2 comments

Comments

@Eheran1
Copy link

Eheran1 commented Oct 6, 2023

Using "kalman_minimal" example I get tons of error. I tried to hot-fix the issue (array -> matrix etc.) but simply failed.

kalman_minimal\kalman_minimal.ino: In function 'void setup()':
kalman_minimal\kalman_minimal.ino:54:22: error: no match for 'operator=' (operand types are 'BLA::Matrix<2, 2, Symmetric<2, float> >' and '<brace-enclosed initializer list>')
            0.0, n2*n2};
                      ^
In file included from BasicLinearAlgebra/BasicLinearAlgebra.h:7:0,
                 from Kalman/Kalman.h:34,
                 from kalman_minimal\kalman_minimal.ino:12:
BasicLinearAlgebra/ElementStorage.h:50:13: note: candidate: BLA::Matrix<Rows, Cols, DType>& BLA::Matrix<Rows, Cols, DType>::operator=(const BLA::Matrix<Rows, Cols, DType>&) [with int Rows = 2; int Cols = 2; DType = Symmetric<2, float>]
     Matrix &operator=(const Matrix &mat)
             ^~~~~~~~
BasicLinearAlgebra/ElementStorage.h:50:13: note:   no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'const BLA::Matrix<2, 2, Symmetric<2, float> >&'
kalman_minimal\kalman_minimal.ino:57:22: error: no match for 'operator=' (operand types are 'BLA::Matrix<2, 2, Symmetric<2, float> >' and '<brace-enclosed initializer list>')
            0.0, m2*m2};
                      ^
In file included from BasicLinearAlgebra/BasicLinearAlgebra.h:7:0,
                 from Kalman/Kalman.h:34,
                 from kalman_minimal\kalman_minimal.ino:12:
BasicLinearAlgebra/ElementStorage.h:50:13: note: candidate: BLA::Matrix<Rows, Cols, DType>& BLA::Matrix<Rows, Cols, DType>::operator=(const BLA::Matrix<Rows, Cols, DType>&) [with int Rows = 2; int Cols = 2; DType = Symmetric<2, float>]
     Matrix &operator=(const Matrix &mat)
             ^~~~~~~~
BasicLinearAlgebra/ElementStorage.h:50:13: note:   no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'const BLA::Matrix<2, 2, Symmetric<2, float> >&'
In file included from kalman_minimal\kalman_minimal.ino:12:0:
Kalman/Kalman.h: In instantiation of 'KALMAN<Nstate, Nobs, Ncom, MemF>::KALMAN() [with int Nstate = 2; int Nobs = 2; int Ncom = 0; MemF = BLA::Matrix<2, 2, float>]':
kalman_minimal\kalman_minimal.ino:31:21:   required from here
Kalman/Kalman.h:253:3: error: no matching function for call to 'BLA::Matrix<2, 2, Symmetric<2, float> >::Fill(double)'
   this->P.Fill(0.0);
   ^~~~
In file included from Kalman/Kalman.h:34:0,
                 from kalman_minimal\kalman_minimal.ino:12:
BasicLinearAlgebra/BasicLinearAlgebra.h:78:10: note: candidate: void BLA::MatrixBase<DerivedType, rows, cols, DType>::Fill(const DType&) [with DerivedType = BLA::Matrix<2, 2, Symmetric<2, float> >; int rows = 2; int cols = 2; d_type = Symmetric<2, float>; BLA::MatrixBase<DerivedType, rows, cols, DType>::DType = Symmetric<2, float>]
     void Fill(const DType &val) { *this = val; }
          ^~~~
BasicLinearAlgebra/BasicLinearAlgebra.h:78:10: note:   no known conversion for argument 1 from 'double' to 'const DType& {aka const Symmetric<2, float>&}'
In file included from kalman_minimal\kalman_minimal.ino:12:0:
Kalman/Kalman.h: In instantiation of 'void KALMAN<Nstate, Nobs, Ncom, MemF>::_update(BLA::Matrix<Outputs>, BLA::Matrix<Nstate>) [with int Nstate = 2; int Nobs = 2; int Ncom = 0; MemF = BLA::Matrix<2, 2, float>]':
Kalman/Kalman.h:240:10:   required from 'void KALMAN<Nstate, Nobs, Ncom, MemF>::update(BLA::Matrix<Outputs>) [with int Nstate = 2; int Nobs = 2; int Ncom = 0; MemF = BLA::Matrix<2, 2, float>]'
kalman_minimal\kalman_minimal.ino:75:15:   required from here
[...many more errors...]
@juanfrapm
Copy link

Try using other versions of the library BasicLinearAlgebra. I was trying the last one and i got error. Version 3.2 should work!

@cosismo
Copy link

cosismo commented Oct 25, 2023

Try using other versions of the library BasicLinearAlgebra. I was trying the last one and i got error. Version 3.2 should work!

It works for me, changing BasicLinearAlgebra to v 3.2

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants