Get an error when changing the baseMission waypoint in "Example:UAV Package Delivery"

4 ビュー (過去 30 日間)
I tried to change the waypoint in "noQGC/baseMission" block. And I got an error.
I wonder how to fix this. I found that the Storage class of the "baseMission" in "uavPackageDeliveryDataDict.sldd" had changed. Is this the problem?
Thanks.

採用された回答

Jianxin Sun
Jianxin Sun 2021 年 5 月 17 日
編集済み: Jianxin Sun 2021 年 5 月 17 日
Hi Wenhan,
Can you clarify how you changed the waypoints in "noQGC/baseMission" block? You should be able to update the waypoints by modifying the baseMission struct in the data dictionary.
You can copy the baseMission variable to base workspace, modify it from base workspace and copy it back into data dictionary.
For example, if you need to change the 2nd wayoint, you can do:
baseMission(2).position(:) = newWaypoint; %newWaypoint is a 1x3 vector in [x, y, 0] format
Alternatively, you can consult with the following question to see how to change the waypoint at run time:
Thanks,
Jianxin
  1 件のコメント
wenhan yuan
wenhan yuan 2021 年 5 月 18 日
Thanks! Problem fixed. I modified the value here. And this causes the error.

サインインしてコメントする。

その他の回答 (0 件)

製品


リリース

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by