ROS Toolbox warning with MATLAB Function block.

I get the following warning when trying to run any simulink model containing MATLAB function block:
Warning: An error occurred while evaluating "loc_createToolchain": The 'FileName' property of a coder.make.ToolchainInfoRegistry object must be set to a valid
MAT file: 'C:\Program Files\Matlab\R2018b\toolbox\robotics\robotsimulink\robotslros\toolchain\catkin_toolchain_gmake_win64_v1.0.mat' does not exist.
This custom registration is not loaded.
The warning is thrown when running the model for the first time in any MATLAB instance.
Rerunning the same model or any other model with MATLAB Function block does not cause the warning. It will only retrigger if exiting and reopening MATLAB.

 Accepted Answer

The issue is because of a 'catkin_toolchain_gmake_win64_v1.0.mat' file missing from the folder.
Here are the possible causes of that MAT file not being in the folder "C:\Program Files\Matlab\R2018b\toolbox\robotics\robotsimulink\robotslros\toolchain\" :
1. Removed during installation/uninstallation or manual modification.
2. The MAT files are flagged and quarantined by the anti-virus software.
Please verify that the anti-virus software allows MAT-file to be installed.
To recreate the MAT file follow the steps below:
Run following commands in MATLAB command window:
>> cd ('C:\Program Files\Matlab\R2018b\toolbox\robotics\robotsimulink\robotslros\toolchain\');
>> tc = catkin_toolchain; % create toolchain object
>> tc = tc(1); % get the platform specific member of toolchain
>> save('catkin_toolchain_gmake_win64_v1.0.mat', tc); % save object as MAT file in the same folder
Then restart MATLAB.

More Answers (0)

Categories

Products

Release

R2018b

Tags

No tags entered yet.

Community Treasure Hunt

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

Start Hunting!