alphaville / optimization-engine

Nonconvex embedded optimization: code generation for fast real-time optimization + ROS support
https://alphaville.github.io/optimization-engine/
Other
499 stars 53 forks source link

JSON syntax error #205

Closed Subhankhan41 closed 4 years ago

Subhankhan41 commented 4 years ago

Hello, I have run the example_open1.m and getting the following errors:

Warning: Unsuccessful read:  The specified amount of data was not returned within the Timeout period.
'udp' unable to read any data. For more information on possible reasons, see UDP Read Warnings. 
Error using jsondecode
JSON syntax error: expected value but found end of text.

Error in OpEnOptimizer/consume (line 63)
            out = jsondecode(json_response);

Could you please let me know how can I resolve this problem and run the examples correctly? Thanks

alphaville commented 4 years ago

Hi @Subhankhan41. Did you get that error using the MATLAB interface? Can you give some details about the problem you're trying to solve, your operating system, MATLAB version etc? I just ran example_open1.m and it works fine on my system, so I need some more information to be able to reproduce the error or understand what might be causing it.

Subhankhan41 commented 4 years ago

Hello @alphaville I'm using Ubuntu 20.04 and MATLAB 2018b. I've tried to run it multiple times but still having the similar error.My impression is the following might be an issue: --- stderr thread 'main' panicked at 'Unable to find libclang: "couldn\'t find any valid shared libraries matching: [\'libclang.so\', \'libclang-.so\', \'libclang.so.\'], set the LIBCLANG_PATH environment variable to a path where one of these files can be found (invalid: [])"', /home/subhan/.cargo/registry/src/github.com-1ecc6299db9ec823/bindgen-0.49.4/src/lib.rs:1710:31 note: run with RUST_BACKTRACE=1 environment variable to display a backtrace

alphaville commented 4 years ago

It seems it is related to the installation of clang/libclang. OpEn requires two main dependencies: Rust and clang. You may find more information here.

Subhankhan41 commented 4 years ago

Yes it was due to clang. Thanks a lot. works perfect.

alphaville commented 4 years ago

Perfect, I'm glad to hear!