-
Notifications
You must be signed in to change notification settings - Fork 10
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 Wrapper Function 'matlab_wrap' Not Working For GPMP2 #136
Comments
Yes the CMake function has changed considerably. You should read the docstrings in the CMake file and see what needs to be updated. Should be pretty straightforward. |
I believe there is another argument added, which was done to support multiple .i files in Matlab. This is pretty much a GPMP issue, but this issue can help us figure out various kinks. |
|
Thank you very much for this response, I'll try it out. |
I am going to keep playing around with this so I can ultimately make a PR on the GPMP2 repository so it can work in harmony with the wrap code as is. |
So I tried building with the CMakeLists.txt as you suggested and I was given the following error:
So then I tried running the command: Any idea what arguments I am missing here? |
I think the arguments are ok, just the cmake variable should be if(NOT GTSAM_TOOLBOX_INSTALL_PATH)
set(GTSAM_TOOLBOX_INSTALL_PATH "${CMAKE_INSTALL_PREFIX}/gtsam_toolbox")
endif()
set(WRAP_MEX_BUILD_STATIC_MODULE ${GTSAM_MEX_BUILD_STATIC_MODULE})
set(WRAP_BUILD_MEX_BINARY_FLAGS ${GTSAM_BUILD_MEX_BINARY_FLAGS})
set(WRAP_TOOLBOX_INSTALL_PATH ${GTSAM_TOOLBOX_INSTALL_PATH})
set(WRAP_CUSTOM_MATLAB_PATH ${GTSAM_CUSTOM_MATLAB_PATH})
set(WRAP_BUILD_TYPE_POSTFIXES ${GTSAM_BUILD_TYPE_POSTFIXES}) Perhaps you can add something similar in gpmp2: if(NOT GPMP2_TOOLBOX_INSTALL_PATH)
set(GPMP2_TOOLBOX_INSTALL_PATH "${CMAKE_INSTALL_PREFIX}/gpmp2_toolbox")
endif()
set(WRAP_TOOLBOX_INSTALL_PATH ${GTSAM_TOOLBOX_INSTALL_PATH}) By the way just for future debugging tips, if you look at |
Noting this comment, I have successfully been able to use the current wrapper library with GPMP2 to wrap it into the MATLAB environment. However before we close this issue, I just want to make sure that the MATLAB segmentation fault I am experiencing (outlined in gtrll/gpmp2#54) is not due to the wrapper, but on the GPMP2 side of things. If either of you could check out the steps I outline in gtrll/gpmp2#54 and the code I had posted in |
I have been able to successfully wrap and rebuild GPMP2 with this current wrapper version. I am going to close this issue, as the segmentation faults were a result of a change in the gpmp2.h file between different versions, as noted in gtrll/gpmp2#54. |
Amazing stuff! @gchenfc is the man and soon @mattking-smith will be our resident Matlab wrapper expert. 😄 |
Description
I am trying to use the wrap repository to generate the MATLAB interface to the GPMP2 repository, but I am running into an error when trying to run the
matlab_wrap()
function. I have been able to create this MATLAB interface with the help of @gchenfc (which I currently have working on a development computer), but that was some time ago and I am worried possibly there may have been changes to the wrapper implementation.Steps to reproduce error
Specifically, in lines 66-74 of the GPMP2 CMakeLists.txt has:
So I changed these lines in the CMakeLists.txt file to the following:
However, after making this change, calling
sudo cmake -DGPMP2_BUILD_MATLAB_TOOLBOX:=ON ..
in the command prompt results in the error during the cmake generation:Outstanding Question
Am I using the
matlab_wrap()
function incorrectly? On my computer with the work GPMP2 + GTSAM + Matlab toolbox, my CMakeLists.txt file appears as the way I modified the CMakeLists.txt.Has there been a modification to the way I am suppose to use
matlab_wrap()
?Any thoughts on this @gchenfc?
Environment
Linux OS: Ubuntu 20.04
MATLAB version: 2021a
Standard GPMP2 + MATLAB Toolbox build.
The text was updated successfully, but these errors were encountered: