フィルターのクリア

How To get multiple mission plan from Q ground control for UAV package delivery example?

6 ビュー (過去 30 日間)
Abhishek Singh
Abhishek Singh 2022 年 6 月 21 日
移動済み: Remo Pillat 2023 年 10 月 1 日
I wanted to have multple mission plan from QGC block, so that I can simulate multiple UAVs in the same simulation 3D environment.
  2 件のコメント
Abhishek Singh
Abhishek Singh 2022 年 7 月 8 日
i am trying to modify the UAV package delivery example - https://in.mathworks.com/help/uav/ug/uav-package-delivery.html, where there is a MavLink interface block which is communicating with QGC. I am able to get mission plan for one UAV from Qgroundcontrol and receive the feedback of current state of UAV to Qgroundccontrol.
But, I want to simulate multiple UAVs, each getting it's unique mission plan from QGC; also, receive the feedback of the states of these multiple UAVs in Qgroundcontrol
Vedant Dubey
Vedant Dubey 2023 年 8 月 31 日
編集済み: Vedant Dubey 2023 年 8 月 31 日
Hi Abhishek,
Based on the previous suggestion, have you tried using different system IDs on MAVLink deserializer and serializer blocks. Each system ID can correspond to a specific drone.
When you mentioned the below statement:
"But, I want to simulate multiple UAVs, each getting it's unique mission plan from QGC; also, receive the feedback of the states of these multiple UAVs in Qgroundcontrol"
Where specifically are you facing issues? Are you looking for guidance on how to model multiple UAV dynamics or you are unable to see the multiple UAVs in QGC.

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

回答 (1 件)

Jianxin Sun
Jianxin Sun 2022 年 6 月 28 日
移動済み: Remo Pillat 2023 年 10 月 1 日
Hi Abhishek,
Are you planning to connect to multiple UAVs at the same time in MATLAB/Simulink and obtain their missions?
As long as each UAV you connect to has a unique system ID, you should be able to distinguish them with the MAVLink message he receives. A sample code would look like:
mavlink = mavlinkio("common.xml");
connect(mavlink,"UDP");
uav1 = mavlinkclient(mavlink,1,1);
uav2 = mavlinkclient(mavlink,2,1);
% sub1 only receives message from uav1
sub1 = mavlinksub(mavlink, uav1, NewMessageFcn=@(~, payload)display(payload));
% sub2 only receives message from uav2
sub2 = mavlinksub(mavlink, uav2, NewMessageFcn=@(~, payload)display(payload));
% specify client when sending mavlink messages
msg = createcmd(mavlink.Dialect, "long", 22);
sendmsg(mavlink, msg, uav1);
On Simulink, you could use MAVLink deserializerand serializer blocks to filter different system IDs.
Additionally, you can refer to the MATLAB files in the UAV Package Delivery example to see how we are exchanging data between QGroundControl and simulated UAV in Simulink. Files are in <ExampleFolder>\utilities\MAVLinkMissionProtocolExample, start with MAVLinkInterface.m

製品


リリース

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by