I am trying to execute ros2genmsg
command in matlab, by providing a folderPath
as stated in the official documentation https://uk.mathworks.com/help/ros/ref/ros2genmsg.html in this link. Although I have installed cmake
version 3.27.7
as stated in the terminal, I keep getting the following error: Unable to find CMake in your system. Please install CMake version 3.15.5or higher and rerun the command
. I reruned the command but I keep getting the error. Whta can I do about it?
I am using mac and matlab 2022_b version.
What I finally found out is that I had to download CMake manually from the web and then include the path of the installation file to my matlab file like this :
oldPath = getenv('PATH');
newPath = strcat(oldPath, pathsep, '/Applications/CMake.app/Contents/bin'); % on Mac
setenv('PATH', newPath);
% Then try rosgenmsg