Generate custom ROS messages in Matlab R2021a running on MacOS 11.4 with CMake 3.20.5. Error: Could not find CMake in your system
4 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Sriharsha Bhat
il 1 Lug 2021
Modificato: Sriharsha Bhat
il 5 Lug 2021
Hello,
I have been trying to import custom ROS messages into Matlab R2021a using the rosgenmsg command as follows:
rosgenmsg(folderpath)
and I get the following error message:
Identifying message files in folder '/Users/Documents/MATLAB/custom_ros_msgs/packages'..Done.
Validating message files in folder '/Users/Documents/MATLAB/custom_ros_msgs/packages'..Done.
[0/2] Generating MATLAB interfaces for custom message packages... 0%
Error using ros.internal.utilities.getCMakeBinaryPath (line 19)
Could not find CMake in your system. Please install CMake version 3.15.5 or higher and rerun the command.
Error in ros.internal.CatkinBuilder.getCMakePath (line 82)
[aPath, aVersion] = ros.internal.utilities.getCMakeBinaryPath(ros.internal.CatkinBuilder.CMAKEMINVERSION);
Error in ros.internal.ROSProjectBuilder (line 390)
h.CMakePath = h.getCMakePath();
Error in ros.internal.CatkinBuilder (line 24)
h@ros.internal.ROSProjectBuilder(varargin{:});
Error in rosgenmsg (line 223)
builder = ros.internal.CatkinBuilder(genDir, pkgInfos{iPkg});
I have CMake installed, and when I checked for my CMake version and location in Terminal, and I get the following output:
cmake --version
- cmake version 3.20.5
which cmake
/Applications/CMake.app/Contents/bin/cmake
It looks to me that Matlab is not able to find the CMake path.
How could I update the CMake path in Matlab, or point it to CMake?
Any help getting this to work will be much appreciated!
I have the following setup:
Matlab Version: R2021a
OS: MacOS 11.4
CMake version: CMake 3.20.5
I have previously used rosgenmsg with Matlab R2018a, and the workflow was different in that version.
0 Commenti
Risposta accettata
Josh Chen
il 1 Lug 2021
Hello Sriharsha,
This seems to be an issue with MATLAB custom LD_LIBRARY_PATH. To confirm this, could you please try running the following command in MATLAB Command Window:
>> !cmake --version
If this also returns information about CMake not found, then we are sure LD_LIBRARY_PATH is the root cause. In that case, please refer to this discussion to set the LD_PRELOAD, note that you may need to replace the path to libstdc++.so.6 and libcurl.so by the actual path on Mac.
Our team is aware of this issue already and is actively working on addressing this in an upcoming update.
Hope this helps!
Josh
1 Commento
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Custom Message Support in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!