Custom ROS msg type does not get added to rosmsg list even after MATLAB restart
8 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
An Nguyen
il 19 Mar 2019
Commentato: An Nguyen
il 19 Mar 2019
I'm following this guide to create a custom ROS message type (https://www.mathworks.com/help/robotics/ug/ros-custom-message-support.html).
This is the structure of my msg
path_planning_msgs FOLDER
--- path_planning_msgs FOLDER
--- package.xml (copied from guide, replace w <name>path_planning_msgs</name>
--- Path.msg
Contents of package.xml
<package>
<name>path_planning_msgs</name>
<version>1.1.01</version>
<build_depend>message_generation</build_depend>
<build_depend>geometry_msgs</build_depend>
<build_depend>std_msgs</build_depend>
</package>
Contents of Path.msg
Header header
path_planning_msgs/VehicleState[] states
Then I executed these commands and everything seemed to work (I'm on Ubuntu 16.04 LTS)

Then I edited javaclasspath.txt to add the line

Then I ran the addpath and savepath

Then I closed MATLAB to restart it.
Then I checked rosmsg list but the path_planning_msgs/Path type is nowhere to be found.

Thank you in advance.
0 Commenti
Risposta accettata
Sebastian Castro
il 19 Mar 2019
Modificato: Sebastian Castro
il 19 Mar 2019
Hi An,
Pretty sure the ROS package requires your .msg file to be inside a subfolder called msg.
So your folder structure should be as follows:
path_planning_msgs FOLDER
--- package.xml
--- msg FOLDER
--- Path.msg
Try that and let us know if it works!
- Sebastian
6 Commenti
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Custom Message Support in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!