Get an error when changing the baseMission waypoint in "Example:UAV Package Delivery"
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
wenhan yuan
el 17 de Mayo de 2021
Comentada: wenhan yuan
el 18 de Mayo de 2021
I tried to change the waypoint in "noQGC/baseMission" block. And I got an error.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/620468/image.png)
I wonder how to fix this. I found that the Storage class of the "baseMission" in "uavPackageDeliveryDataDict.sldd" had changed. Is this the problem?
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/620473/image.png)
Thanks.
0 comentarios
Respuesta aceptada
Jianxin Sun
el 17 de Mayo de 2021
Editada: Jianxin Sun
el 17 de Mayo de 2021
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
Más respuestas (0)
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!