Custom ROS messages in Matlab - AD-EYE/AD-EYE_Core GitHub Wiki
Install the add-on ROS Toolbox interface for ROS Custom Messages in Matlab. That add-on enables the creation of custom ROS messages in Matlab.
The package containing the messages needs to be created with the same folder name as the name present in package.xml. See adeye_msgs as an example.
The package.xml file must contain:
<buildtool_depend>catkin</buildtool_depend>
<build_depend>message_generation</build_depend>
<run_depend>message_runtime</run_depend>
With eventually, based on the message dependencies:
<build_depend>std_msgs</build_depend>
<build_depend>geometry_msgs</build_depend>
Use the commands rosgenmsg('path_to_msg_package') where path_to_msg_package is the path to the folder one level above the message package (C:\Users\adeye\AD-EYE_Core\AD-EYE\ROS_Packages\src in our case).
Then add the generated folder to the Matlab path:
addpath('C:\Users\adeye\AD-EYE_Core\AD-EYE\ROS_Packages\src\matlab_gen\msggen')
savepath
Add the jar files to the java path:
cd(prefdir)
edit('javaclasspath.txt')
And add the path to the jar file representing the message (C:\Users\adeye\AD-EYE_Core\AD-EYE\ROS_Packages\src\matlab_gen\jar\adeye_msgs-0.0.1.jar for adeye_msgs)