Is there a way to configure the clock block in SImulink to inherit the sample time?

8 ビュー (過去 30 日間)
hey,
I've trying to make the parrot minidrone track some simple trajectory! and from the webina here, I've noticed that the trajectory should be generated inside the Flight Controller Block like shown in the Image below :
cap3.PNG
I did the same thing like shown in the following image:
cap2.PNG
I wanted to deploy it to the hardware but before I should test it in simulation and when I do that I got his error:
cap1.PNG
Plz any help will be appreciated
  1 件のコメント
KAE
KAE 2019 年 7 月 8 日
Beware to anyone considering the Parrot Mambo FPV: it is discontinued, see here.

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

採用された回答

Maitreyee Mordekar
Maitreyee Mordekar 2019 年 7 月 4 日
Hello Rayane,
In R2019a release of MATLAB, we have a few updates to the model since there is a specific block for Path Planning and Image Processing. To use the model, you would need to install the Simulink Support for Parrot Minidrones.
Once you install the Simulink Support Package for Parrot Minidrones in R2019a, you can use the following command to open the model:
>> parrotMinidroneHoverStart OR
>> parrotMinidroneCompetitionStart
The third video (Model Description) in the following series may help you get started with the new model:
I hope this helps!
-Maitreyee
  4 件のコメント
B.ray
B.ray 2019 年 7 月 4 日
Here I have tried a Matlab function but it does not seem to work for me pic1.PNG
Maitreyee Mordekar
Maitreyee Mordekar 2019 年 7 月 5 日
Hello Rayane,
Not certain on why the signal builder does not work for you. I will check the error that you receive.
Alternately, can you try to use Stateflow to plan your drone's path as shown in the following video?
I hope this helps.
-Maitreyee

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

その他の回答 (1 件)

Maitreyee Mordekar
Maitreyee Mordekar 2019 年 7 月 5 日
Hello Rayane,
Seems like the Signal Builder is still taking a sample time on 0 for your simulation as mentioned by the error. The sample time should be set to -1 (inherited) to resolve the error.
You can change the sample time to inherited by:
  • Open the Signal Builder.
  • Go to File -> Simulation Options
  • Set the Sample Time to -1
sim2.png
I hope this helps!
-Maitreyee
  3 件のコメント
Maitreyee Mordekar
Maitreyee Mordekar 2019 年 7 月 8 日
Hello Rayane,
Considering what has been explained, I feel you can certainly do this with Stateflow. It may be much easier too. I would suggest you to first go through the Tech Talk on State Machines:
Once this is complete, you can go through the following Stateflow Tutorials:
The other alternative for you could be using Digital Clock instead of Clock:
I hope this helps!
-Maitreyee
B.ray
B.ray 2019 年 7 月 8 日
Thanks Maitreyee. It is working Now

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

カテゴリ

Help Center および File ExchangeMATLAB Support Package for Parrot Drones についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by