Matlab R2022b and R2023a installation did not contain CMake

I tried to create custom messages under R2022b and R2023a using the ros2genmsg command from the ROS Toolbox and received the following error:
Error using ros.internal.utilities.getCMakeBinaryPath
Unable to find CMake in your system. Please install CMake version 3.15.5 or higher and rerun the command.
I looked in the mentioned function ros.internal.utilities.getCMakeBinaryPath
There I saw that it searches at a certain folder for the CMake executable. But in my installation folder this directory does not exist.
aPath = fullfile(matlabroot,'bin',computer('arch'),'cmake','bin','cmake')
Although, there is a fallback solution, that does not work on Windows due to the command which.
[status, result] = system('which cmake')
I solved the problem by installing CMake manually and creating a symbolic link via the Windows command prompt with
mklink /D "C:\Program Files\MATLAB\<VERSION>\bin\win64\cmake" "C:\Program Files\CMake"
But I would like to know why my installed Matlab does not contain CMake and how I can possibly fix it.

3 Comments

Datapoint:
cmake exists at the noted location on my Mac in R2023a, even though all I have installed is
MATLAB Version 9.14 (R2023a)
Simulink Version 10.7 (R2023a)
Communications Toolbox Version 8.0 (R2023a)
Computer Vision Toolbox Version 10.4 (R2023a)
Control System Toolbox Version 10.13 (R2023a)
Curve Fitting Toolbox Version 3.9 (R2023a)
DSP System Toolbox Version 9.16 (R2023a)
Deep Learning Toolbox Version 14.6 (R2023a)
Fuzzy Logic Toolbox Version 3.1 (R2023a)
Global Optimization Toolbox Version 4.8.1 (R2023a)
Image Processing Toolbox Version 11.7 (R2023a)
Optimization Toolbox Version 9.5 (R2023a)
Signal Processing Toolbox Version 9.2 (R2023a)
Simscape Version 5.5 (R2023a)
Simscape Electrical Version 7.9 (R2023a)
Statistics and Machine Learning Toolbox Version 12.5 (R2023a)
Symbolic Math Toolbox Version 9.3 (R2023a)
System Identification Toolbox Version 10.1 (R2023a)
Wavelet Toolbox Version 6.3 (R2023a)
May i know which version of Windows that you are using ? Also, please provide the output of the ver command in MATLAB. Please reach out to us using the MAthworks Technical Support Team for further help on this.
The ver command outputs
-----------------------------------------------------------------------------------------------------
MATLAB Version: 9.13.0.2193358 (R2022b) Update 5
MATLAB License Number: ******
Operating System: Microsoft Windows 10 Home Version 10.0 (Build 19045)
Java Version: Java 1.8.0_202-b08 with Oracle Corporation Java HotSpot(TM) 64-Bit Server VM mixed mode
-----------------------------------------------------------------------------------------------------
MATLAB Version 9.13 (R2022b)
ROS Toolbox Version 1.6 (R2022b)
The more detailed information about my Windows version from the settings is
Edition Windows 10 Home
Version 22H2
Build 19045.2965

Sign in to comment.

 Accepted Answer

Can you please install MATLAB Coder and try the rosgenmsg and ros2genmsg workflows ?

1 Comment

After the installation of MATLAB Coder both workflows work.
I tested them with the corresponding examples.
Thanks for the support.

Sign in to comment.

More Answers (0)

Categories

Products

Release

R2022b

Asked:

on 25 May 2023

Commented:

on 30 May 2023

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!