フィルターのクリア

Error using ros2genmsg("custom")

16 ビュー (過去 30 日間)
Panos
Panos 2023 年 11 月 3 日
回答済み: Panos 2023 年 11 月 24 日
Hello, I am following this Matlab example: Control a simulated UAV using ros2 and PX4 bridge
When running the command:
ros2genmsg("custom")
it returns the error:
>> ros2genmsg("custom")
Identifying message files in folder '/Users/xxxx/MATLAB/xxxx/custom'..Validating message files in folder '/Users/xxxx/MATLAB/xxxx/custom'..Done.
Done.
[1/1] Generating MATLAB interfaces for custom message packages... Done.
Running colcon build in folder '/Users/xxxx/MATLAB/xxxx/custom/matlab_msg_gen/maca64'.
Build in progress. This may take several minutes...Error using ros.internal.ROSProjectBuilder/buildPackage
Error building package: build_log.
Error in ros2genmsg (line 467)
buildPackage(builder, [], ' --merge-install', colconMakeArgs);
Any help?
Similar posts didn't help to get this fixed.
I am on Matlab 2023b for macOS.
Thanks!

採用された回答

Panos
Panos 2023 年 11 月 24 日
Issue resolved by Mathworks support team. This is the solution,
This issue appears to be caused by a small syntax error in the code within the "px4_msgs" folder.
As a workaround, could you please do the following:
1. In the MATLAB command window, unzip the "px4_msgs" folder:
unzip("px4_msgs.zip")
2. Navigate to px4_msgs/msg/VehicleCommand.msg file, and open it
3. Scroll to the end of line numbers 40 and 41 in VehicleCommand.msg, and remove the "*/" symbols from both lines
4. Run "ros2genmsg("custom")" again
This worked for me.
Thanks

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangePublishers and Subscribers についてさらに検索

製品


リリース

R2023b

Community Treasure Hunt

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

Start Hunting!

Translated by