Create custom ROS msg - Keep getting 'Warning: Unable to save path to file ~/../pathdef.m'
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
I keep getting the error
if true
Warning: Unable to save path to file '/usr/local/MATLAB/R2018a/toolbox/local/pathdef.m'. You can save your path to a
different location by calling SAVEPATH with an input argument that specifies the full path. For MATLAB to use that path
in future sessions, save the path to 'pathdef.m' in your MATLAB startup folder.
> In savepath (line 176)
I have two custom msgs in my ROS package which I want to use in Matlab now (R2018a, academic use).
My whole code looks like this:
if true
>> folderpath = '/home/simulator/catkin_ws/src';
>> rosgenmsg(folderpath)
Checking subfolder "error_mpc" for custom messages.
Building custom message files for the following packages:
error_mpc
Generating MATLAB classes for message packages in /home/simulator/catkin_ws/src/matlab_gen/jar.
Loading file error_mpc-0.1.0.jar.
Generating MATLAB code for error_mpc/Display message type.
Generating MATLAB code for error_mpc/Error message type.
To use the custom messages, follow these steps:
1. Edit javaclasspath.txt, add the following file locations as new lines, and save the file:
/home/simulator/catkin_ws/src/matlab_gen/jar/error_mpc-0.1.0.jar
2. Add the custom message folder to the MATLAB path by executing:
addpath('/home/simulator/catkin_ws/src/matlab_gen/msggen')
savepath
3. Restart MATLAB and verify that you can use the custom messages.
Type "rosmsg list" and ensure that the output contains the generated
custom message types.
>> addpath('/home/simulator/catkin_ws/src/matlab_gen/msggen')
>> savepath
Warning: Unable to save path to file '/usr/local/MATLAB/R2018a/toolbox/local/pathdef.m'. You can save your path to a
different location by calling SAVEPATH with an input argument that specifies the full path. For MATLAB to use that path
in future sessions, save the path to 'pathdef.m' in your MATLAB startup folder.
> In savepath (line 176)
end
How can I write the link to pathdef.m? Or is there a workaround?
Thanks a lot for your help
0 commentaires
Réponses (0)
Voir également
Catégories
En savoir plus sur Custom Message Support dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!