The task seems simple:
Generate ROS Custom Message for a ROS Package and copy it to other machines, so that my students don't have to go through with generating the custom message by their own. Before R2020b it was no problem. We generated the message definitions by the separate toolbox and could exchange the created folder with it's message definitions. Since R2020b has build in support for generating ROS custom messages I can't even move the generated folder on the same PC.
What System is used: Ubuntu 20.04, Matlab R2020b
I generate my message type by starting Matlab with:
(LD_PRELOAD is needed, because cmake is not working with std-libs provided by the Matlab version.)
Using rosgenmsg(...) is working and I can use:
addpath(...);clear classes;rehash toolboxcache;
rosmessage('...') is giving me my custom message object.
Restarting Matlab and using addpath again still works for getting my object.
Now I simply rename the generated "matlab_msg_gen_ros1" folder into "matlab_msg_gen_ros1_"
After restarting Matlab and using addpath(...);clear classes;rehash toolboxcache; with the modified path, the message type is not recognized by Matlab anymore.
(Now, even renaming the folder back into the old name and using the old path for addpath ... is not working anymore. Only if I redo the rosgenmsg procedure, it is working again)
Is there a way to exchange / move the generated message definition, or is there another way to export and import (share) custom message definitions?