I am attempting to use MATLAB to read from a bagfile and that works fine for most topics, except for any regarding /mavros/. I have installed the Robotics System Toolbox Interface for ROS Custom Messages and attempted to use the rosgenmsg function with the mavros_msgs folder located at /opt/ros/kinetic/share/mavros_msgs. These are all default locations when installing ROS kinetic.
When running rosgenmsg('/opt/ros/kinetic/share/mavros_msgs') I get returned an error saying that this location is not a real ROS pkg complaining that there might not be a package.xml even though there is.
I get the following error:
Checking subfolder "cmake" for custom messages.
Warning: The folder /opt/ros/kinetic/share/mavros_msgs/cmake does not contain a valid ROS
package, because the 'package.xml' file is missing. Create the 'package.xml' file in this
> In robotics.ros.custommsg.internal.CustomMessageJAR/buildFolders (line 93)
In rosgenmsg (line 42)
No message packages were found in folder /opt/ros/kinetic/share/mavros_msgs. Check to
make sure the path to your folder is correct.