Robotics System Toolbox custom message stops working R2016b

4 ビュー (過去 30 日間)
Alexander
Alexander 2017 年 5 月 26 日
コメント済み: Alexander 2017 年 8 月 8 日
After following all instructions downloading the plug in and creating custom messages from package I was able to succesfully use ROS custom messages - until I tried running the exact same code a few weeks later "Cannot find a MATLAB message class for type pkg/custom". Running the
rosgenmsg(folderpath)
command again doesn't even work: Undefined function or variable 'rosgenmsg'. It's as if the plugin is gone. This has happened twice already and the only solution is to re-download the plugin and redo the custom message from package. Any help in figuring out why this keeps happening would be appreciated.

採用された回答

Archita P
Archita P 2017 年 5 月 31 日
It might be the case that the package name in the package.xml file does not match the folder name.
Unfortunately, the code makes the assumption that the two always match and that causes the behavior you are seeing. Try renaming the folder so that the two names match.
Also, you can try to install the following add-on,
>> roboticsAddons
Then select the 'ROS Custom Messages' add on to install.
The default folder for this add-on is the following -
C:\ProgramData\MATLAB\SupportPackages\R2016b\toolbox\robotics\supportpackages\roscustommsg\
Add this to the MATLAB path -
>>addpath(genpath('C:\ProgramData\MATLAB\SupportPackages\R2016b\toolbox\robotics\supportpackages\roscustommsg\'))
Restart MATLAB and see if it works.
  1 件のコメント
Alexander
Alexander 2017 年 8 月 8 日
adding and saving the path 'C:\ProgramData\MATLAB\SupportPackages\R2016b\toolbox\robotics\supportpackages\roscustommsg\' worked. thanks

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeCustom Message Support についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by