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

Package CasADi MATLAB bindings #719

Closed
traversaro opened this issue May 11, 2021 · 5 comments · Fixed by ami-iit/casadi-matlab-bindings#1 or #747
Closed

Package CasADi MATLAB bindings #719

traversaro opened this issue May 11, 2021 · 5 comments · Fixed by ami-iit/casadi-matlab-bindings#1 or #747

Comments

@traversaro
Copy link
Member

Since robotology/whole-body-controllers#104, the whole-body-controllers package of the superbuild depends on the CasADi MATLAB bindings. While at the moment users install CasADi manually as documented in https://github.com/CarlottaSartore/whole-body-controllers/blob/6c3d28fec228d23323ca3c7d07f2342666e69d7e/library/simulink-library/MomentumVelocityControl/README.md#hammer-dependencies , this is an additional manual step that complicates deployment. Ideally, we should ensure that the CasADi MATLAB bindings are compiled if both ROBOTOLOGY_ENABLE_DYNAMICS_FULL_DEPS and ROBOTOLOGY_USES_MATLAB options are enabled.

@traversaro
Copy link
Member Author

The tricky aspect here is that to compile the MATLAB bindings from source, casadi requires a forked version of SWIG, and specifically a different fork w.r.t. to the one used by YARP and iDynTree MATLAB bindings. To solve this, we should build a repo casadi-matlab-bindings that already containes the generated MATLAB SWIG bindings, so the users then will just need a compiler to build them. Furthermore, we need to ensure that the iDynTree SWIG bindings and the CasADi MATLAB bindings to not interfere with each other.

@traversaro
Copy link
Member Author

As per robotology/idyntree#865, this issue quickly became relevant. While testing robotology/wb-toolbox#209 that modified WB-Toolbox to add support for osqp (and so it links osqp in the WB-Toolbox shared library plugin), @CarlottaSartore experienced this MATLAB crash in a controller that was using Casadi binaries downloaded from https://web.casadi.org/ and WB-Toolbox compiled binaries via the robotology-superbuild:

--------------------------------------------------------------------------------
          Segmentation violation detected at 2021-05-19 11:16:45 +0200
--------------------------------------------------------------------------------
Configuration:
  Crash Decoding           : Disabled - No sandbox or build area path
  Crash Mode               : continue (default)
  Default Encoding         : UTF-8
  Deployed                 : false
  Desktop Environment      : ubuntu:GNOME
  GNU C Library            : 2.27 stable
  Graphics Driver          : Intel Open Source Technology Center Mesa DRI Intel(R) UHD Graphics 630 (CFL GT2) Version 3.0 Mesa 20.0.8
  Graphics card 1          : Not Started 0x10de ( 0x10de ) 0x1f91 Version 0.0.0.0 (0-0-0)
  Graphics card 2          : 0x8086 ( 0x8086 ) 0x3e9b Version 0.0.0.0 (0-0-0)
  Java Version             : Java 1.8.0_202-b08 with Oracle Corporation Java HotSpot(TM) 64-Bit Server VM mixed mode
  MATLAB Architecture      : glnxa64
  MATLAB Entitlement ID    : 6829974
  MATLAB Root              : /usr/local/MATLAB/R2020b
  MATLAB Version           : 9.9.0.1570001 (R2020b) Update 4
  OpenGL                   : hardware
  Operating System         : Ubuntu 18.04.5 LTS
  Process ID               : 17444
  Processor ID             : x86 Family 6 Model 158 Stepping 10, GenuineIntel
  Session Key              : f0bb530d-e2d8-4db5-8908-ea9c8a9b2a8d
  Static TLS mitigation    : Enabled: Full
  Window System            : The X.Org Foundation (12008000), display :0
Fault Count: 1

Abnormal termination:
Segmentation violation
Current Thread: 'MCR 0 interpret' id 139795162932992
Register State (from fault):
  RAX = 00007f220bc46ab0  RBX = 00007f22036f0db0
  RCX = 00007f220bc46ab0  RDX = 000000000000000a
  RSP = 00007f2499065d40  RBP = 00007f220bc4bcf0
  RSI = 3fb999999999999a  RDI = 0000000000000001
   R8 = 0000000000000018   R9 = 00007f22021d7180
  R10 = 3eb0c6f7a0b5ed8d  R11 = 00007f21fd603330
  R12 = 0000000000000000  R13 = 00007f2499066010
  R14 = 0000000000000000  R15 = 00007f220bc46ab0
  RIP = 00007f21fd603373  EFL = 0000000000010206
   CS = 0033   FS = 0000   GS = 0000
Stack Trace (from fault):
[  0] 0x00007f21fd603373 /home/csartore/iit_ws/robotology-superbuild/build/install/lib/libosqp.so+00025459 validate_data+00000067
[  1] 0x00007f21fd60561f /home/csartore/iit_ws/robotology-superbuild/build/install/lib/libosqp.so+00034335 osqp_setup+00000031
[  2] 0x00007f21d4d460ef /home/csartore/personal_ws/Casadi/casadi_install/libcasadi_conic_osqp.so+00057583 _ZNK6casadi13OsqpInterface8init_memEPv+00001087
[  3] 0x00007f21df4e9333 /home/csartore/personal_ws/Casadi/casadi_install/libcasadi.so+03969843 _ZNK6casadi13ProtoFunction8checkoutEv+00000291
[  4] 0x00007f21df4e95e6 /home/csartore/personal_ws/Casadi/casadi_install/libcasadi.so+03970534 _ZN6casadi13ProtoFunction8finalizeEv+00000022
[  5] 0x00007f21df500298 /home/csartore/personal_ws/Casadi/casadi_install/libcasadi.so+04063896 _ZN6casadi16FunctionInternal8finalizeEv+00003176
[  6] 0x00007f21df4e5e04 /home/csartore/personal_ws/Casadi/casadi_install/libcasadi.so+03956228 _ZN6casadi13ProtoFunction9constructERKSt3mapISsNS_11GenericTypeESt4lessISsESaISt4pairIKSsS2_EEE+00000148
[  7] 0x00007f21df490cb4 /home/csartore/personal_ws/Casadi/casadi_install/libcasadi.so+03607732 _ZN6casadi8Function6createEPNS_16FunctionInternalERKSt3mapISsNS_11GenericTypeESt4lessISsESaISt4pairIKSsS4_EEE+00000036
[  8] 0x00007f21df6076a6 /home/csartore/personal_ws/Casadi/casadi_install/libcasadi.so+05142182 _ZN6casadi5conicERKSsS1_RKSt3mapISsNS_8SparsityESt4lessISsESaISt4pairIS0_S3_EEERKS2_ISsNS_11GenericTypeES5_SaIS6_IS0_SC_EEE+00000182
[  9] 0x00007f21df610418 /home/csartore/personal_ws/Casadi/casadi_install/libcasadi.so+05178392
[ 10] 0x00007f21df61388f /home/csartore/personal_ws/Casadi/casadi_install/libcasadi.so+05191823
[ 11] 0x00007f21df608b49 /home/csartore/personal_ws/Casadi/casadi_install/libcasadi.so+05147465 _ZN6casadi5qpsolERKSsS1_RKSt3mapISsNS_2MXESt4lessISsESaISt4pairIS0_S3_EEERKS2_ISsNS_11GenericTypeES5_SaIS6_IS0_SC_EEE+00000009
[ 12] 0x00007f21df72095d /home/csartore/personal_ws/Casadi/casadi_install/libcasadi.so+06293853 _ZN6casadi8OptiNode5solveEb+00001789
[ 13] 0x00007f21df6f499a /home/csartore/personal_ws/Casadi/casadi_install/libcasadi.so+06113690 _ZN6casadi4Opti5solveEv+00000042
[ 14] 0x00007f21dfc354fa /home/csartore/personal_ws/Casadi/casadi_install/casadiMEX.mexa64+01725690 _Z16_wrap_Opti_solveiPP11mxArray_tagiS1_+00000106
[ 15] 0x00007f21dfcbea12 /home/csartore/personal_ws/Casadi/casadi_install/casadiMEX.mexa64+02288146 mexFunction+00002466
[ 16] 0x00007f248c5eb79f     /usr/local/MATLAB/R2020b/bin/glnxa64/libmex.so+00837535
[ 17] 0x00007f248c5eb8a5     /usr/local/MATLAB/R2020b/bin/glnxa64/libmex.so+00837797
[ 18] 0x00007f248c5ebc77     /usr/local/MATLAB/R2020b/bin/glnxa64/libmex.so+00838775
[ 19] 0x00007f248c5ec804     /usr/local/MATLAB/R2020b/bin/glnxa64/libmex.so+00841732
[ 20] 0x00007f248c5dabdc     /usr/local/MATLAB/R2020b/bin/glnxa64/libmex.so+00768988
[ 21] 0x00007f248cc62720 /usr/local/MATLAB/R2020b/bin/glnxa64/libmwm_dispatcher.so+01160992 _ZN8Mfh_file20dispatch_file_commonEMS_FviPP11mxArray_tagiS2_EiS2_iS2_+00000208
[ 22] 0x00007f248cc63e4c /usr/local/MATLAB/R2020b/bin/glnxa64/libmwm_dispatcher.so+01166924
[ 23] 0x00007f248cc64311 /usr/local/MATLAB/R2020b/bin/glnxa64/libmwm_dispatcher.so+01168145 _ZN8Mfh_file8dispatchEiPSt10unique_ptrI11mxArray_tagN6matrix6detail17mxDestroy_deleterEEiPPS1_+00000033
[ 24] 0x00007f24851f09e4 /usr/local/MATLAB/R2020b/bin/glnxa64/libmwm_lxe.so+10959332
[ 25] 0x00007f24851f4792 /usr/local/MATLAB/R2020b/bin/glnxa64/libmwm_lxe.so+10975122
[ 26] 0x00007f2485316b3d /usr/local/MATLAB/R2020b/bin/glnxa64/libmwm_lxe.so+12163901
[ 27] 0x00007f2485317f8f /usr/local/MATLAB/R2020b/bin/glnxa64/libmwm_lxe.so+12169103
[ 28] 0x00007f248529df0d /usr/local/MATLAB/R2020b/bin/glnxa64/libmwm_lxe.so+11669261
[ 29] 0x00007f248529f930 /usr/local/MATLAB/R2020b/bin/glnxa64/libmwm_lxe.so+11675952
[ 30] 0x00007f2484dcf2d4 /usr/local/MATLAB/R2020b/bin/glnxa64/libmwm_lxe.so+06628052
[ 31] 0x00007f2484dd1314 /usr/local/MATLAB/R2020b/bin/glnxa64/libmwm_lxe.so+06636308
[ 32] 0x00007f2484dce3f1 /usr/local/MATLAB/R2020b/bin/glnxa64/libmwm_lxe.so+06624241
[ 33] 0x00007f2484dc6405 /usr/local/MATLAB/R2020b/bin/glnxa64/libmwm_lxe.so+06591493
[ 34] 0x00007f2484dc68f1 /usr/local/MATLAB/R2020b/bin/glnxa64/libmwm_lxe.so+06592753
[ 35] 0x00007f2484dcdc6a /usr/local/MATLAB/R2020b/bin/glnxa64/libmwm_lxe.so+06622314
[ 36] 0x00007f2484dcdd66 /usr/local/MATLAB/R2020b/bin/glnxa64/libmwm_lxe.so+06622566
[ 37] 0x00007f2484ef55c6 /usr/local/MATLAB/R2020b/bin/glnxa64/libmwm_lxe.so+07833030
[ 38] 0x00007f2484ef7f05 /usr/local/MATLAB/R2020b/bin/glnxa64/libmwm_lxe.so+07843589
[ 39] 0x00007f248510cfa1 /usr/local/MATLAB/R2020b/bin/glnxa64/libmwm_lxe.so+10026913
[ 40] 0x00007f24851e0c28 /usr/local/MATLAB/R2020b/bin/glnxa64/libmwm_lxe.so+10894376
[ 41] 0x00007f24851e140a /usr/local/MATLAB/R2020b/bin/glnxa64/libmwm_lxe.so+10896394
[ 42] 0x00007f248cc62720 /usr/local/MATLAB/R2020b/bin/glnxa64/libmwm_dispatcher.so+01160992 _ZN8Mfh_file20dispatch_file_commonEMS_FviPP11mxArray_tagiS2_EiS2_iS2_+00000208
[ 43] 0x00007f248cc64b7a /usr/local/MATLAB/R2020b/bin/glnxa64/libmwm_dispatcher.so+01170298 _ZN8Mfh_file8dispatchEiPP11mxArray_tagiS2_+00000314
[ 44] 0x00007f24761d656d /usr/local/MATLAB/R2020b/bin/glnxa64/libmwmcos_impl.so+05162349
[ 45] 0x00007f247613edbf /usr/local/MATLAB/R2020b/bin/glnxa64/libmwmcos_impl.so+04541887
[ 46] 0x00007f247613f23c /usr/local/MATLAB/R2020b/bin/glnxa64/libmwmcos_impl.so+04543036
[ 47] 0x00007f2476147759 /usr/local/MATLAB/R2020b/bin/glnxa64/libmwmcos_impl.so+04577113
[ 48] 0x00007f247613d314 /usr/local/MATLAB/R2020b/bin/glnxa64/libmwmcos_impl.so+04535060
[ 49] 0x00007f247613d374 /usr/local/MATLAB/R2020b/bin/glnxa64/libmwmcos_impl.so+04535156
[ 50] 0x00007f24761e8742 /usr/local/MATLAB/R2020b/bin/glnxa64/libmwmcos_impl.so+05236546
[ 51] 0x00007f249a26cb4c  /usr/local/MATLAB/R2020b/bin/glnxa64/libmwmcos.so+00318284 _Z18omDirectCallMethodRKN4mcos15COSInternedBaseINS_8internal13IdEmptyPolicyEEES5_S5_iPP11mxArray_tagiPPKS6_+00000076
[ 52] 0x00007f248438072c /usr/local/MATLAB/R2020b/bin/glnxa64/libmwlxeindexing.so+01201964
[ 53] 0x00007f248442e1b4 /usr/local/MATLAB/R2020b/bin/glnxa64/libmwlxeindexing.so+01913268
[ 54] 0x00007f2484398a06 /usr/local/MATLAB/R2020b/bin/glnxa64/libmwlxeindexing.so+01300998
[ 55] 0x00007f2484398a06 /usr/local/MATLAB/R2020b/bin/glnxa64/libmwlxeindexing.so+01300998
[ 56] 0x00007f24843bc1a6 /usr/local/MATLAB/R2020b/bin/glnxa64/libmwlxeindexing.so+01446310
[ 57] 0x00007f248436bf04 /usr/local/MATLAB/R2020b/bin/glnxa64/libmwlxeindexing.so+01117956 _ZN9MathWorks3lxe9at_rparenEPvNS_2ts4TypeEPKvS1_S1_+00000436
[ 58] 0x00007f248529df0d /usr/local/MATLAB/R2020b/bin/glnxa64/libmwm_lxe.so+11669261
[ 59] 0x00007f248529e030 /usr/local/MATLAB/R2020b/bin/glnxa64/libmwm_lxe.so+11669552
[ 60] 0x00007f2484f09e59 /usr/local/MATLAB/R2020b/bin/glnxa64/libmwm_lxe.so+07917145
[ 61] 0x00007f2484ef4af8 /usr/local/MATLAB/R2020b/bin/glnxa64/libmwm_lxe.so+07830264
[ 62] 0x00007f2484ef7f05 /usr/local/MATLAB/R2020b/bin/glnxa64/libmwm_lxe.so+07843589
[ 63] 0x00007f248510cfa1 /usr/local/MATLAB/R2020b/bin/glnxa64/libmwm_lxe.so+10026913
[ 64] 0x00007f24850be093 /usr/local/MATLAB/R2020b/bin/glnxa64/libmwm_lxe.so+09703571
[ 65] 0x00007f24850c16cf /usr/local/MATLAB/R2020b/bin/glnxa64/libmwm_lxe.so+09717455
[ 66] 0x00007f24850c3d12 /usr/local/MATLAB/R2020b/bin/glnxa64/libmwm_lxe.so+09727250
[ 67] 0x00007f24850ac850 /usr/local/MATLAB/R2020b/bin/glnxa64/libmwm_lxe.so+09631824
[ 68] 0x00007f24850ac995 /usr/local/MATLAB/R2020b/bin/glnxa64/libmwm_lxe.so+09632149
[ 69] 0x00007f248c2d420f /usr/local/MATLAB/R2020b/bin/glnxa64/libmwbuiltin.so+00061967 _ZNK9MathWorks7builtin10BuiltinFcn6invokeEiPP11mxArray_tagiS4_+00000079
[ 70] 0x00007f248cbff903 /usr/local/MATLAB/R2020b/bin/glnxa64/libmwm_dispatcher.so+00755971
[ 71] 0x00007f248cbe206a /usr/local/MATLAB/R2020b/bin/glnxa64/libmwm_dispatcher.so+00634986 _ZN18Mfh_MATLAB_fn_impl8dispatchEiPP11mxArray_tagiS2_+00000266
[ 72] 0x00007f247629185c /usr/local/MATLAB/R2020b/bin/glnxa64/libmwmcos_impl.so+05929052
[ 73] 0x00007f248cc5c13c /usr/local/MATLAB/R2020b/bin/glnxa64/libmwm_dispatcher.so+01134908 _Z21mdBuiltinAsBuiltinFcniPP11mxArray_tagiS1_+00000284
[ 74] 0x00007f248c2d420f /usr/local/MATLAB/R2020b/bin/glnxa64/libmwbuiltin.so+00061967 _ZNK9MathWorks7builtin10BuiltinFcn6invokeEiPP11mxArray_tagiS4_+00000079
[ 75] 0x00007f248cbff903 /usr/local/MATLAB/R2020b/bin/glnxa64/libmwm_dispatcher.so+00755971
[ 76] 0x00007f248cbe27cc /usr/local/MATLAB/R2020b/bin/glnxa64/libmwm_dispatcher.so+00636876
[ 77] 0x00007f248cbe2aa1 /usr/local/MATLAB/R2020b/bin/glnxa64/libmwm_dispatcher.so+00637601 _ZN18Mfh_MATLAB_fn_impl8dispatchEiPSt10unique_ptrI11mxArray_tagN6matrix6detail17mxDestroy_deleterEEiPPS1_+00000033
[ 78] 0x00007f24851f09e4 /usr/local/MATLAB/R2020b/bin/glnxa64/libmwm_lxe.so+10959332
[ 79] 0x00007f24851f4792 /usr/local/MATLAB/R2020b/bin/glnxa64/libmwm_lxe.so+10975122
[ 80] 0x00007f2485316b3d /usr/local/MATLAB/R2020b/bin/glnxa64/libmwm_lxe.so+12163901
[ 81] 0x00007f2485317f8f /usr/local/MATLAB/R2020b/bin/glnxa64/libmwm_lxe.so+12169103
[ 82] 0x00007f248529df0d /usr/local/MATLAB/R2020b/bin/glnxa64/libmwm_lxe.so+11669261
[ 83] 0x00007f248529f930 /usr/local/MATLAB/R2020b/bin/glnxa64/libmwm_lxe.so+11675952
[ 84] 0x00007f2484f09e59 /usr/local/MATLAB/R2020b/bin/glnxa64/libmwm_lxe.so+07917145
[ 85] 0x00007f2484ef4af8 /usr/local/MATLAB/R2020b/bin/glnxa64/libmwm_lxe.so+07830264
[ 86] 0x00007f2484ef7f05 /usr/local/MATLAB/R2020b/bin/glnxa64/libmwm_lxe.so+07843589
[ 87] 0x00007f248510cfa1 /usr/local/MATLAB/R2020b/bin/glnxa64/libmwm_lxe.so+10026913
[ 88] 0x00007f24851e10c7 /usr/local/MATLAB/R2020b/bin/glnxa64/libmwm_lxe.so+10895559
[ 89] 0x00007f24851e1425 /usr/local/MATLAB/R2020b/bin/glnxa64/libmwm_lxe.so+10896421
[ 90] 0x00007f248cc62720 /usr/local/MATLAB/R2020b/bin/glnxa64/libmwm_dispatcher.so+01160992 _ZN8Mfh_file20dispatch_file_commonEMS_FviPP11mxArray_tagiS2_EiS2_iS2_+00000208
[ 91] 0x00007f248cc6445a /usr/local/MATLAB/R2020b/bin/glnxa64/libmwm_dispatcher.so+01168474 _ZN8Mfh_file19dispatch_with_reuseEiPP11mxArray_tagiS2_+00000314
[ 92] 0x00007f24761adaaa /usr/local/MATLAB/R2020b/bin/glnxa64/libmwmcos_impl.so+04995754
[ 93] 0x00007f24762ae0d8 /usr/local/MATLAB/R2020b/bin/glnxa64/libmwmcos_impl.so+06045912
[ 94] 0x00007f24762a82ad /usr/local/MATLAB/R2020b/bin/glnxa64/libmwmcos_impl.so+06021805
[ 95] 0x00007f248cbe235a /usr/local/MATLAB/R2020b/bin/glnxa64/libmwm_dispatcher.so+00635738 _ZN18Mfh_MATLAB_fn_impl19dispatch_with_reuseEiPP11mxArray_tagiS2_+00000266
[ 96] 0x00007f24843a4af3 /usr/local/MATLAB/R2020b/bin/glnxa64/libmwlxeindexing.so+01350387
[ 97] 0x00007f2484398456 /usr/local/MATLAB/R2020b/bin/glnxa64/libmwlxeindexing.so+01299542
[ 98] 0x00007f24843ce7ad /usr/local/MATLAB/R2020b/bin/glnxa64/libmwlxeindexing.so+01521581
[ 99] 0x00007f24843ce306 /usr/local/MATLAB/R2020b/bin/glnxa64/libmwlxeindexing.so+01520390
[100] 0x00007f24843b2714 /usr/local/MATLAB/R2020b/bin/glnxa64/libmwlxeindexing.so+01406740 _ZN9MathWorks3lxe7at_rdotEPvNS_2ts4TypeEPKvS1_+00000292
[101] 0x00007f24852a6583 /usr/local/MATLAB/R2020b/bin/glnxa64/libmwm_lxe.so+11703683
[102] 0x00007f24852a66f7 /usr/local/MATLAB/R2020b/bin/glnxa64/libmwm_lxe.so+11704055
[103] 0x00007f2484dcf445 /usr/local/MATLAB/R2020b/bin/glnxa64/libmwm_lxe.so+06628421
[104] 0x00007f2484dd1314 /usr/local/MATLAB/R2020b/bin/glnxa64/libmwm_lxe.so+06636308
[105] 0x00007f2484dce3f1 /usr/local/MATLAB/R2020b/bin/glnxa64/libmwm_lxe.so+06624241
[106] 0x00007f2484dc6405 /usr/local/MATLAB/R2020b/bin/glnxa64/libmwm_lxe.so+06591493
[107] 0x00007f2484dc68f1 /usr/local/MATLAB/R2020b/bin/glnxa64/libmwm_lxe.so+06592753
[108] 0x00007f2484dcdc6a /usr/local/MATLAB/R2020b/bin/glnxa64/libmwm_lxe.so+06622314
[109] 0x00007f2484dcdd66 /usr/local/MATLAB/R2020b/bin/glnxa64/libmwm_lxe.so+06622566
[110] 0x00007f2484ef55c6 /usr/local/MATLAB/R2020b/bin/glnxa64/libmwm_lxe.so+07833030
[111] 0x00007f2484ef7f05 /usr/local/MATLAB/R2020b/bin/glnxa64/libmwm_lxe.so+07843589
[112] 0x00007f248510cfa1 /usr/local/MATLAB/R2020b/bin/glnxa64/libmwm_lxe.so+10026913
[113] 0x00007f24851e0c28 /usr/local/MATLAB/R2020b/bin/glnxa64/libmwm_lxe.so+10894376
[114] 0x00007f24851e140a /usr/local/MATLAB/R2020b/bin/glnxa64/libmwm_lxe.so+10896394
[115] 0x00007f248cc62720 /usr/local/MATLAB/R2020b/bin/glnxa64/libmwm_dispatcher.so+01160992 _ZN8Mfh_file20dispatch_file_commonEMS_FviPP11mxArray_tagiS2_EiS2_iS2_+00000208
[116] 0x00007f248cc64b7a /usr/local/MATLAB/R2020b/bin/glnxa64/libmwm_dispatcher.so+01170298 _ZN8Mfh_file8dispatchEiPP11mxArray_tagiS2_+00000314
[117] 0x00007f24761d656d /usr/local/MATLAB/R2020b/bin/glnxa64/libmwmcos_impl.so+05162349
[118] 0x00007f24761d6d3a /usr/local/MATLAB/R2020b/bin/glnxa64/libmwmcos_impl.so+05164346
[119] 0x00007f22382765ad /usr/local/MATLAB/R2020b/bin/glnxa64/simulink_plugins/systemblock/../../../../bin/glnxa64/libmwsystemobject_mcos.so+01082797
[120] 0x00007f2238252f4d /usr/local/MATLAB/R2020b/bin/glnxa64/simulink_plugins/systemblock/../../../../bin/glnxa64/libmwsystemobject_mcos.so+00937805 _ZN6somcos12callStepImplERiPN4mcos8COSValueEiPKS2_+00000845
[121] 0x00007f22384a3523 /usr/local/MATLAB/R2020b/bin/glnxa64/simulink_plugins/systemblock/../../../../bin/glnxa64/libmwmatlabsystemblock.so+01352995 _ZN12SysBlockBase17MSysObjDispatcher22invokeSysObjMethodImplENS0_14ImplMethodTypeERiPN4mcos8COSValueEiPKS4_+00001075
[122] 0x00007f22384a3c19 /usr/local/MATLAB/R2020b/bin/glnxa64/simulink_plugins/systemblock/../../../../bin/glnxa64/libmwmatlabsystemblock.so+01354777 _ZN12SysBlockBase17MSysObjDispatcher18invokeSysObjMethodENS0_14ImplMethodTypeERiPN4mcos8COSValueEiPKS4_+00000089
[123] 0x00007f22384ab8f5 /usr/local/MATLAB/R2020b/bin/glnxa64/simulink_plugins/systemblock/../../../../bin/glnxa64/libmwmatlabsystemblock.so+01386741 _ZN12SysBlockBase17MSysObjDispatcher11callOutputsEP11SLExecBlock+00001909
[124] 0x00007f2238467034 /usr/local/MATLAB/R2020b/bin/glnxa64/simulink_plugins/systemblock/../../../../bin/glnxa64/libmwmatlabsystemblock.so+01105972
[125] 0x00007f225a7d8cd5 /usr/local/MATLAB/R2020b/bin/glnxa64/builtins/sl_main/../../../../bin/glnxa64/libmwsl_engine_classes.so+02493653
[126] 0x00007f225b4e1d58 /usr/local/MATLAB/R2020b/bin/glnxa64/builtins/sl_main/../../../../bin/glnxa64/libmwsl_lang_blocks.so+09801048
[127] 0x00007f225a7d9e05 /usr/local/MATLAB/R2020b/bin/glnxa64/builtins/sl_main/../../../../bin/glnxa64/libmwsl_engine_classes.so+02498053

Program State:
Most Recent Simulink Activity:
playSimulationAction : OK in editor 1 at Wed May 19 11:16:13 2021
        
Most Recent Tool Interaction:
Editor 1: tools idle, GLUE2::PanZoomTool is most recently active tool since Wed May 19 11:16:11 2021
        

This error was detected while a MEX-file was running. If the MEX-file
is not an official MathWorks function, please examine its source code
for errors. Please consult the External Interfaces Guide for information
on debugging MEX-files.

The issue is probably due to the fact that osqp in robotology-superbuild is 0.6.2 and the one used in official casadi binaries is 0.5.0, and they are not ABI compatible.

@traversaro
Copy link
Member Author

Fortunately thanks to @GiulioRomualdi efforts the casadi version in the robotology-superbuild is compatible with the latest osqp (see casadi/casadi#2671), so indeed fixing this issue should permit to use in the same controllers the CasADi MATLAB bindings and the WB-Toolbox binaries.

@traversaro
Copy link
Member Author

Fixing this should also permit to package https://github.com/robotology/urdf2casadi-matlab as part of the robotology-superbuild (and also get conda packages for it).

@traversaro
Copy link
Member Author

To ensure that the generated conda binary packages work as expected when a qp solver is used, we also need to remember to fix this: conda-forge/casadi-feedstock#51 .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment