-
Notifications
You must be signed in to change notification settings - Fork 767
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
Possible Wrapper Issue with MATLAB Toolbox #950
Comments
@varunagrawal Could you take a look at this? |
Added high-priority tag because I am trying to make a write-up/documentation for corporate sponsors on a sponsor-shared GitHub repository. I need to have reproducible steps for company to follow on their own computers. |
Why Varun? Who is using the Matlab toolbox regularly? That will be better than distracting Varun at this time. @mattking-smith , do you have no ideas on how to fix this? You are now our Matlab go-to guy :-) |
I do not have immediate fixes to the issue, as I have not looked deeply enough into the issue at this point. My suspicion is the way the MEX binding is being generated via the wrapper, but I have not looked or worked on the wrapper code so far. I do not have much experience with using Python to wrap libraries into MATLAB, (as is done currently in the wrap library) as I've only integrated C and C++ code into MATLAB and Simulink via traditional MEXing and writing S-functions. I can turn my attention to fixing this issue, but it will take me some time to catch up to speed on the wrap library and python interface for GTSAM to MATLAB. However, I will continue to probe the matter to try and figure out why the MEX file cannot find these function definitions. |
This (my question) is a stupid question, but is it possible we're just looking at a MATLAB path issue,? To me,
looks like a generic message from MATLAB saying "I don't know where / what that is" and would be exactly the same as
I haven't built the MATLAB wrapper in quite a while, but when I have built it in the past, and there was an issue at MATLAB (i.e., not when building the wrapper), it would look like a linkage issue, and I would see something like:
That is just an old error message I happened to have saved somewhere, but it was typical of a problem with the wrapper: MATLAB would complain about the MEX file and maaaaybe offer a hint at where the issue originates (in my personal experience, it's always a problem with serialization / deserialization, because boost serialization exists to cause me suffering). I haven't built the wrap in forever, though, so I don't know if this is relevant 😬 |
Thankfully I have compiled and integrated GTSAM + MATLAB toolbox as early as last April on another computer. Perhaps the wrapper library has had a major update in that time?
This comment got me thinking that I should compare my currently built and working GTSAM + MATLAB computer with the computer that is not currently working. When looking, I did find a major dependency and the source of the error being generated on my end. On the computer that is not working with GTSAM + MATLAB when running the I am unsure currently why the standard GTSAM + MATLAB toolbox instructions would not construct and define these class definitions as it has done in the past, but I would again think this would hint at possible wrapping issues during the build process. |
To follow up on this problem, I zipped up and sent the +gtsam folder from the working GTSAM + MATLAB computer to the computer which lacked all of the proper class defining .m files. Unzipping the .m files into this +gtsam folder resulting in MATLAB being able to find the GTSAM + Wrapper function calls, but I am finding this error now:
The |
@mattking-smith PR #953 should address this. Can you please take a look at it? |
Description
I recently installed a fresh 20.04 Ubuntu OS on a new computer to test GTSAM + MATLAB toolbox. After following available documentation it appeared that I successfully wrapped GTSAM into the MATLAB environment, noting that the MATLAB toolbox folder was created in the correct file path destination and there was a MATLAB MEX file in the appropriate location. However, I am unable to run any GTSAM code in MATLAB (including the basic unit tests) due to the wrapper being unable to find the functions. The errors I am currently experiencing are not listed under the MATLAB wrapper documentation.
Steps to reproduce
A successfully flagged MATLAB toolbox enabled cmake appears as:
Noting that MATLAB root and MEX binary paths have been located.
3. Run the command
make install
4. Follow the step given in the MATLAB Wrapper documentation.
5. In the MATLAB environment attempt the following:
Expected behavior
Expected to see the following messages in the command window of the MATLAB environment:
Observed behavior
The output of the MATLAB command window:
Environment
MATLAB version: 2021a
Linux OS: Ubuntu 20.04
Standard GTSAM + MATLAB Toolbox build.
Additional information
The text was updated successfully, but these errors were encountered: