rosgenmsg error in line333 MATLAB2020b

I copied the packages used in ROS to Windows, and wanted to use rosgenmsg to create custom defined messages. The commands:
>> folderpath='D:\matlab2020b\S_Ch\msgs\control_msgs';
>> rosgenmsg(folderpath)
But it has errors:
error in rosgenmsg (line 333)
No packages with '.msg' files found under D:\matlab2020b\S_Ch\msgs\control_msgs. Each message package directory must
contain a directory named 'msg' that then contains '.msg' files.
Howerer, there is a folder named ‘msg’ in it which contains some ‘.msg’ files.

댓글 수: 1

Walter Roberson
Walter Roberson 2020년 12월 29일
Your .msg files appear to be inside a MSG directory inside of control_msgs_msg . The .msg files need to be directly in msg directory.

댓글을 달려면 로그인하십시오.

답변 (1개)

Cam Salzberger
Cam Salzberger 2021년 1월 4일

0 개 추천

Hello Holden,
You are providing the "package" folder to rosgenmsg, when instead it requires the parent folder of that. This is because there are commonly multiple message packages, each with their own package folder, inside a single location. In this case, you should be providing the path to the "msgs" folder to rosgenmsg.
See here for more details on the expected folder structure.
-Cam

댓글 수: 3

Jeen Ann Abraham
Jeen Ann Abraham 2021년 9월 23일
Same error. but not working. checked directory as well
/home/abraham/catkin_ws/src/custom_msg/A/msg which contains file with .msg extension file
Cam Salzberger
Cam Salzberger 2021년 9월 24일
Jeen, what file path are you providing to "rosgenmsg"?
Momtaz Abadir
Momtaz Abadir 2022년 9월 24일
Agree, it is folderpath='D:\matlab2020b\S_Ch\msgs';

댓글을 달려면 로그인하십시오.

카테고리

도움말 센터File Exchange에서 ROS Toolbox에 대해 자세히 알아보기

제품

질문:

2020년 12월 29일

댓글:

2022년 9월 24일

Community Treasure Hunt

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

Start Hunting!

Translated by