PX4 Support Package for UAV Toolbox in Simulink Introduction and Build First Module

Поделиться
HTML-код
  • Опубликовано: 18 окт 2024
  • Before Beginning, Sorry for the environmental noise on my audio :)
    This video walks you through understanding the concept behind PX4 Autopilots Support Package for UAV Toolbox in Simulink and help you build your own PX4 module generated with Simulink Model Model based design environment.
    Using the UAV Toolbox Support Package for PX4® Autopilots, you can access autopilot peripherals from MATLAB® and Simulink®. With Embedded Coder®, you can also automatically generate C++ code and use the PX4 toolchain to build and deploy algorithms tailored specifically for Pixhawk® and Pixracer flight management units (FMU), all while incorporating onboard sensor data and other PX4-specific services. PX4 is a trademark of Lorenz Meier.
    Main Documentation page:
    www.mathworks....
    My last Video about uORB Concept:
    • Send custom Data from ...
    My Tutorial about building PX4 SITL un Ubunto (and Ardupilot)
    • Ardupilot & PX4 SIL(SI...

Комментарии • 44

  • @arinzei.7496
    @arinzei.7496 4 месяца назад +1

    Thanks!

  • @shivamgoswami3624
    @shivamgoswami3624 2 года назад +1

    Great work!! I have my own Simulink-based flight dynamic model instead of using an inbuilt one in flight gear and I can visualize the response in flight gear. Any suggestion on how to connect it to Qground control for sending commands and PX4 for the controller? Everything is in SITL.
    Any help would be appreciated. Thanks!

    • @alirezaghaderi
      @alirezaghaderi  2 года назад

      you should send your mavlink udp packets to Qground. Qground normally listens to port 14550. so use mavproxy or any other tool to foreward your mavlink to that port.

  • @黃義明-p8e
    @黃義明-p8e Год назад +1

    Nice work!! I have one question. Why the three-axis acceleration value is not approximately equal to [0 0 9.81]?

    • @alirezaghaderi
      @alirezaghaderi  Год назад

      it will only be 0 0 9.8 if you put the phone on an exact level situation and no tilt...

  • @husseinsleiman6119
    @husseinsleiman6119 Год назад

    Hello, Thank you for your informative video. It helps a lot! One question: in the minute 14:49 step, we must select either "Design Flight Controller in Simulink" or "Design Path follower". I was wondering if I can still add my own controller (or at least edit the existing controller through Simulink)if I choose the "Design Path Follower"? Thank you in advance

    • @alirezaghaderi
      @alirezaghaderi  Год назад

      editing the controller is not possible yet sincee it is writteni n pure c++ so you should change the cpp controller file module for that. you can write your own controller from scratch right now and your navigator if you choose the opstion design the controller

  • @tarkunler6454
    @tarkunler6454 Год назад

    hi. we can successfully upload the controller to the pixhawk through the deploy, run and start mode of simulink. However, the motors of the quadcopter do not spin when the mission mode is activated in qgroundcontrol. Could you help us, please?

    • @alirezaghaderi
      @alirezaghaderi  Год назад

      only in the mission mode? maybe a failesafe or sth is triggering... activate the mavlink on usb and connec to the drone over mavlink and from error messages see what is stopping the the drone from being armed. if it is arm and not spining, there should be a problem with you commands being sent. check you commanded logs and see if you are actually sending pwm commmands or not

  • @yanism8266
    @yanism8266 3 года назад +2

    Hello thx for the video !
    I have a problem at 23:38 when reconnect my Pixhawk4 it keeps sending a message :Attempting reboot on COM8 with baudrate=57600... If the board does not respond, unplug and re-plug the USB connector.
    even if i plug and unplug my board.
    Can you help me please
    Thx

    • @alirezaghaderi
      @alirezaghaderi  3 года назад

      possible missing a step... you installed PX4 on the board?is the board recognized by Qground when you connect it?

    • @yanism8266
      @yanism8266 3 года назад

      ​@@alirezaghaderi thx for the replay, i found out that the COM3 appear for only 3sec. I selected this one for the reboot and it worked. But i still can't get the accelerometer data. I feel like i have one COM for the reboot and one for the data transfer but i can only select one...

    • @yanism8266
      @yanism8266 3 года назад

      When i connect my pixhawk to my computer i have only COM3 Ardupilot (for 3seconds) then I have COM8 MindPX

    • @alirezaghaderi
      @alirezaghaderi  3 года назад

      @@yanism8266 Thats normal. the secound one that appear is the one you should communicate with. Is the assoicated PX4 installed on the board?

    • @yanism8266
      @yanism8266 3 года назад +1

      @@alirezaghaderi yes i have the fmu V5 from QGC
      I dont understand why when I select COM 8 MindPX for the upload I have the problem :
      "Attempting reboot on COM8 with baudrate=57600...
      If the board does not respond, unplug and re-plug the USB connector."

  • @amirhossainjarareh9792
    @amirhossainjarareh9792 2 года назад

    این آموزش واقعا فوق العاده بود ، من توی اینترنت می گشتم تعداد بیشتری از افراد از آردوپایلوت استفاده می کردند ، آیا چنین پکیجی برای آردوپایلوتم هست

    • @alirezaghaderi
      @alirezaghaderi  2 года назад

      Ardupilot Code and syntax and structure is totally different. For that you should write your own plugins with C++ or Lua script and then just communicate with Mavlink

  • @salamsurjitsingh6415
    @salamsurjitsingh6415 4 месяца назад

    and showing this " Firmware Build Failed: No matching files named 'C:\PX4\home\Firmware\build\px4_fmu-v3_default\px4_fmu-v3_default.px4' were found." error.. pleas help me out

    • @alirezaghaderi
      @alirezaghaderi  4 месяца назад

      Hi. I havent cehked the new compatibilities issues. report this in mathworks file exchange comment section and they will respond quickly

  • @eshivashankar2495
    @eshivashankar2495 2 года назад

    Sir can u do a video on path planning using matlab simulink from scratch....

  • @ashhadrasheed4385
    @ashhadrasheed4385 2 года назад

    brilliant work alireza as always, i was wondering if we can perform hils for fixed-wing platforms as well. i know we can alter the flight dynamics model in simulink but i was wondering if we can change airframe in jmavsim as well ?

    • @alirezaghaderi
      @alirezaghaderi  2 года назад +1

      i belive jmavsim is only for rotorcrafts. you should use gazebo and flightgear for that

    • @ashhadrasheed4385
      @ashhadrasheed4385 2 года назад

      @@alirezaghaderi will it work with this Matlab setup ?

    • @alirezaghaderi
      @alirezaghaderi  2 года назад +1

      yeah should work...build your model for SITL and then connect it to gazebo

  • @davemansfield7719
    @davemansfield7719 2 года назад

    Hi, I have designed a controller in simulink and uploaded it to the pixhawk. Before i did this i calibrated the compass and gyroscope ect on Qground control. However after uploading the simulink controller these calibrations are gone along with my px4 parameter configuration. Do you know how i can calibrate the px4 with the simulink controller loaded?

    • @alirezaghaderi
      @alirezaghaderi  2 года назад

      After uploading your code on the board, connect your board to Qgroundcontrol (remember to activate Mavlink on Serial 0) then do the calibrations as usual

    • @davemansfield7719
      @davemansfield7719 2 года назад

      @@alirezaghaderi thank you for the reply, o have some issue then as qgroundcontrol registers a connection but I can't access vehicle settings

  • @davemansfield7719
    @davemansfield7719 2 года назад

    Any tips on using HITL simulations with a custom flight controller the normal method for HITL doesnt seem to work

    • @alirezaghaderi
      @alirezaghaderi  2 года назад

      If its not working as instructed in my old video about PX4 HITL, you better ask the developers in the mathworks product page. They will help you out.

  • @danieldobrin3885
    @danieldobrin3885 Год назад

    Using Simulink 2022b, Cube Black (fmuv3) keeps rebooting after "Reconnect Pixhawk" message on 27:17 and nothing else happens.

    • @alirezaghaderi
      @alirezaghaderi  Год назад

      I suggest you add a question in the official file exchange page. they usually answer in few hours and its possible that there is a bug or sth they should know about.

  • @salamsurjitsingh6415
    @salamsurjitsingh6415 4 месяца назад

    while building the firmaware i got "/usr/bin/bash: /cygdrive/c/Users/Surjit: Permission denied" in the cmd window of the matlab

    • @alirezaghaderi
      @alirezaghaderi  2 месяца назад

      double chekc with mathoworks in the file exchange documentation comments maybe a bug or sth

  • @charefwided2162
    @charefwided2162 2 года назад

    Can i use mini pix from radiolink with this support package ?? If no what should i do ? I have only Mini pix FC .

    • @alirezaghaderi
      @alirezaghaderi  2 года назад

      I dont think so , since as far as i know, Minipix is using a special custom firmware which is not open source. But there might be way for that... I think you should ask it in RadioLink Forums

    • @charefwided2162
      @charefwided2162 2 года назад

      @@alirezaghaderi thank you ..i have one other question ..when deploying the code in hardware , it should work just fine without any connection between the pc and the pixhawk ! Bit i still can't achieve it ...is there any seetings i should know about when using the option "build deploy and start"?

    • @alirezaghaderi
      @alirezaghaderi  2 года назад

      no just the same process. just click build and deploy and then the code will run independently and you will have no connection to PC

  • @jehanpatel8213
    @jehanpatel8213 Год назад

    How to add led for drone light show in pixhwak 2.4.8 custom drone

    • @alirezaghaderi
      @alirezaghaderi  11 месяцев назад

      to control a RGB LED you can use 3 channel of PWM outputs and comamnde them with PWM out block

  • @izurzuhri
    @izurzuhri Год назад

    where i can find default cmake file?

    • @alirezaghaderi
      @alirezaghaderi  Год назад

      when ou git the px4 clone you already have them. and you shoudnt need them

  • @tejalbarnwal7617
    @tejalbarnwal7617 3 года назад

    Hey, can this PX4 toolbox be used with SITL?

    • @alirezaghaderi
      @alirezaghaderi  3 года назад

      I haven't tested it but yes it has a build option for SITL as well.