ros2genmsg not recognizing folder?

8 visualizaciones (últimos 30 días)
Patrick
Patrick el 18 de Jun. de 2025
Respondida: TED MOSBY el 24 de Jun. de 2025
I have the current folder structure here
where msg containts all the .msg files (as seen in px4_msgs github). I'm trying to add the PX4 messages to my matlab to incorporate it into a SitL loop for a quadrotor, but I'm receiving the following error:
But the msg folder clearly contains all the correct .msg files, so I'm not sure why this is having this error. Is there another step I need to add here?
  3 comentarios
Walter Roberson
Walter Roberson el 19 de Jun. de 2025
I would double check that the msg directory contains *.msg files
TED MOSBY
TED MOSBY el 19 de Jun. de 2025
@Walter Roberson this is the same directory as the github repo mentioned by patrick

Iniciar sesión para comentar.

Respuestas (1)

TED MOSBY
TED MOSBY el 24 de Jun. de 2025
Hi,
You can try the following workarounds:
  1. Double check your path actually contains .msg files and the folder containing those files should be named "msg" only so you can check for any whitespaces, etc.
  2. You can try putting the actual folder path in the "ros2genmsg" command.
  3. You can try going level 1 or 2 up in the folderpath, so instead of "...work/ros2_ws/src/px4_msgs" you can try "...work/ros2_ws/src" or "...work/ros2_ws/src/ros2_ws"
  4. If the above doesn't work then you can try a known bug fix as below, although the error message suggests something else but with the limited information provided, these are the only ways to debug the issue.
Here is also a list of other MATLAB answers that you can refer if your issue persists futher: https://www.mathworks.com/support/search.html?c%5B%5D=support&q=ros2genmsg&page=1
Hope this helps! Feel free to reply to this answer for further queries.

Categorías

Más información sobre Custom Message Support en Help Center y File Exchange.

Etiquetas

Productos


Versión

R2024b

Community Treasure Hunt

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

Start Hunting!

Translated by