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

Matlab "IMUKittiExampleGPS" example result in an error #1602

Closed
etamarlu opened this issue Aug 10, 2023 · 3 comments
Closed

Matlab "IMUKittiExampleGPS" example result in an error #1602

etamarlu opened this issue Aug 10, 2023 · 3 comments

Comments

@etamarlu
Copy link
Contributor

etamarlu commented Aug 10, 2023

Description

Running the "IMUKittiExampleGPS" example result in the following error:

Error using gtsam_wrapper
Exception from gtsam:
Attempting to retrieve value with key "v3", type stored in Values is class gtsam::GenericValue<class Eigen::Matrix<double,-1,1,0,-1,1>
> but requested type was class Eigen::Matrix<double,3,1,0,3,1>


Error in gtsam.ISAM2/update (line 237)
        varargout{1} = gtsam_wrapper(1765, this, varargin{:});

Error in IMUKittiExampleGPS (line 124)
      isam.update(newFactors, newValues);

Steps to reproduce

  1. download toolbox from https://github.com/jlblancoc/factor-graphs-course
  2. run the "./gtsam_examples/IMUKittiExampleGPS" example

Environment

Matlab 2023a, windows 10

Additional information

@etamarlu etamarlu changed the title Matlab example result in an error Matlab "IMUKittiExampleGPS" example result in an error Aug 10, 2023
@ProfFan
Copy link
Collaborator

ProfFan commented Aug 27, 2023

You need to retrieve the value with a dynamic matrix type if what you have is a dynamic matrix, not a fixed sized version

@etamarlu
Copy link
Contributor Author

You need to retrieve the value with a dynamic matrix type if what you have is a dynamic matrix, not a fixed sized version

Thank you for your response!

I don't fully understand how to retrieve the value with a dynamic matrix, is it a gtsam thing or a Matlab thing? I've worked with Matlab many times but haven't encountered it so far, do you have any reference to Matlab's documentation?

Moreover, the same example works in Linux

Thank you,
Etamar

@ProfFan
Copy link
Collaborator

ProfFan commented Aug 28, 2023

Windows is a way less tested platform than Linux, and the problem is none of the current maintainers use Windows... So you are on your own. This is a GTSAM (or C++) thing because the type is resolved by the GTWRAP glue code.

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

2 participants