Borrar filtros
Borrar filtros

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

6 visualizaciones (últimos 30 días)
I wanted to have multple mission plan from QGC block, so that I can simulate multiple UAVs in the same simulation 3D environment.
  2 comentarios
Abhishek Singh
Abhishek Singh el 8 de Jul. de 2022
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 el 31 de Ag. de 2023
Editada: Vedant Dubey el 31 de Ag. de 2023
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.

Iniciar sesión para comentar.

Respuestas (1)

Jianxin Sun
Jianxin Sun el 28 de Jun. de 2022
Movida: Remo Pillat el 1 de Oct. de 2023
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

Productos


Versión

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by