ROS - rosgenmsg: "The folder path, gradle-1.8, is invalid or the folder does not exist." R2018a - Linux

5 views (last 30 days)
Guillermo Rolle
Guillermo Rolle on 27 Sep 2021
Answered: Cam Salzberger on 29 Sep 2021
Hi, I'm using Matlab R2018a on Linux (Manjaro) to connect to ROS. On my system I have installed ros-noetic. I had issues when suscribing to a topic with message type "control_msgs/JointControllerState" due to the md5 being different. From what I read that happens because of Matlab using an older version of ROS. I then came up with the ROS-Tooolbox for Custom Messages: https://la.mathworks.com/matlabcentral/fileexchange/49810-ros-toolbox-interface-for-ros-custom-messages
I then copied the control_msgs package from /opt/ros/noetic/share to /home/guillermo/matlab_custom_msgs in order to generate the new version of the messages.
When running in the command window I get the error:
>> rosgenmsg('/home/guillermo/matlab_custom_msgs')
The folder path, gradle-1.8, is invalid or the folder does not exist.
I don't know what's causing it, nor if it's the right way to handle the original issue. I also tried, just to check,
>> rosgenmsg('/opt/ros/noetic/share')
but I get the same error, no matter what path I input.
Thanks in advance.
EDIT:
This is the structure of the '/home/guillermo/matlab_custom_msgs' path:
matlab_custom_msgs/
└── control_msgs
   ├── action
   ├── cmake
   ├── msg
   ├── package.xml
   └── srv

Answers (1)

Cam Salzberger
Cam Salzberger on 29 Sep 2021
Edit: Moving this to an answer instead of comment.
Hello Guillermo,
In R2020a and prior releases, there are different instructions for updating the built-in messages to use a different ROS version's defintiions. Have you tried the instructions here?
For R2020b+, the custom message support package is no longer required, and built-in messages can be updated in the same way that you create any custom messages. It also is using ROS Melodic, which is probably closer if not matching the Noetic message definitions. If upgrading is a possibility, I would strongly suggest it.
-Cam

Community Treasure Hunt

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

Start Hunting!