필터 지우기
필터 지우기

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

조회 수: 7 (최근 30일)
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