-
Notifications
You must be signed in to change notification settings - Fork 795
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
[WIP] New MATLAB wrapper #407
Comments
I have updated the |
I have finished the wrapping for matlab and briefly tested on MATLAB (loading and simple function works), could anyone help me test it by:
And report the issues you have? Many thanks! |
I am getting errors like this when running the examples:
So we probably need to do some name mangling here. |
Same goes for the file name resolution. Really need some help from someone with better MATLAB experience... |
I'll take a look at this later today. |
@varunagrawal Thank you in advance :) I need a list of problems so I can tweak the generation code... |
Another rather serious issue is that the current generator will generate identical signature for overloaded function, which is illegal in MATLAB: function varargout = RzRyRx(varargin)
% RZRYRX usage: RzRyRx(double x, double y, double z) : returns gtsam::Rot3
% Doxygen can be found at http://research.cc.gatech.edu/borg/sites/edu.borg/html/index.html
varargout{1} = gtsam_wrapper(263, varargin{:});
end
function varargout = RzRyRx(varargin)
% RZRYRX usage: RzRyRx(Vector xyz) : returns gtsam::Rot3
% Doxygen can be found at http://research.cc.gatech.edu/borg/sites/edu.borg/html/index.html
varargout{1} = gtsam_wrapper(264, varargin{:});
end |
Now most of the API is working, but construction of a simple factor crashes MATLAB: import gtsam.*
graph = NonlinearFactorGraph;
%% Add prior
priorNoise = noiseModel.Diagonal.Sigmas([0.3; 0.3; 0.1]);
graph.add(PriorFactorPose2(1, Pose2(0, 0, 0), priorNoise)); % Crashes here I'll keep investigating what is happening, but any help is welcome... |
I'm puzzled because many of these issues were not present for the c++ based wrap, and I thought we generated nearly identical c++ wrapper files. So, what's up with that? Let's talk in our meeting. |
@dellaert Sure, it's a lot of delicate name mangling differences.... |
Now the crash is fixed and the examples mostly work. |
Since 4.0.3 is out, we now need testers for the new MATLAB wrapper, since the generated code currently does not exactly match what is generated by the old C++ wrapper. |
It would be nice if this call came with instructions and a concrete ask :-) When fixed, also announce on internal slack? |
@dellaert Sure. |
@ProfFan I checked the issue with |
Nvm I encountered it again. I can fix it after I get the CI up and running again. |
The |
Also, FYI I fixed all the Matlab tests so the tests now run and they pass. |
This issue has been resolved 🎉 |
We need to finish this before 4.1.
gtsam_unstable
is broken even in develop)This
declarations are broken because the concrete type is dropped during parsingThe text was updated successfully, but these errors were encountered: