MattiaMontanari / openGJK

Fast and reliable implementation of the Gilbert-Johnson-Keerthi (GJK) algorithm for C, C#, Go, Matlab and Python
https://www.mattiamontanari.com/opengjk/
GNU General Public License v3.0
135 stars 37 forks source link

Cannot make it work for Matlab under Ubunto20 #31

Closed Amir-Zargar closed 1 year ago

Amir-Zargar commented 1 year ago

After developing our Matlab codes using OpenGJK under windows, we would like to use our Matlab codes which call OpenGJK under ROS-Ubuntu20 (Linux). I had to recreate Mex file (Matlab under Linux needs .mexa64). I then used it for the given example, but I got this error: Invalid MEX-file - Gateway function is missing.

I used different gcc compiler (8 to 10) as well as -r2017 and -r2018 version within Matlab mex command to generate mex file, but I am getting always the same error.

Could you please help to have a valid mexa64 file of OpenGJK? If this works for you, could you please let us know what is the setting and options of Matlab mex command?

Thank you

MattiaMontanari commented 1 year ago

I pushed a trivial change that shuold get you a step further. However I don't know what version you're running. If you had the latest version you would not be able to compile on Win either.

Feel free to post the new error or, even better, contribute to this repo with any changes to had to make to get it to work on Win. I don't have a matlab license anymore and unfortunately I cannot guarantee my fix will work.