Send custom Data from PX4 to Ground Station (from uORB via MavLink)

Поделиться
HTML-код
  • Опубликовано: 20 авг 2024
  • In this Quick tutorial I will show you how to register new data (topic) in uORB API in your PX4 software. Then we publish the value using Mavlink to out Ground station (QGroundControl) and monitor it using live plot.
    Then we can log the data in real time.
    If you are not familiar with PX4 firmware concepts Refer to my last videos about PX4 SITL, HITL, Log, etc. Another great resource is PX4 developers documentation.
    • Ardupilot & PX4 SIL(SI...
    • PX4 HITL(Hardware in t...
    • PX4 / Ardupilot Flight...
    In this video I walk you through one of pre-build examples in PX4 Firmware called PX4_Mavlink_debug
    dev.px4.io/v1....

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

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

    سلام باعث افتخاره که ویدیوئی با این سطح و محتوا از هموطنم پیدا میکنم

  • @HoangLe-fu4xe
    @HoangLe-fu4xe 3 года назад +2

    This would only broadcast uORB message to other modules (including MAVLink) inside the firmware. For the MAVLink to actually send the message you have to define your message and build your own MAVLink header files, and then implement the sending mechanism into the MAVLink module of the firmware. For the message to be received by the ground station, you will need to use the same MAVLink header files and then generate and implement your message's logic into MAVSDK (or your GCS's MAVLink interface) and build the GCS software yourself.
    PS: I suggest changing the video's name to just "uORB messaging" because you haven't touched anything related to MAVLink in this video yet. If you have a tutorial on how to implement the logic on both sides (GCS and PX4) of the MAVLink messages, please share it with us and guide us around these topics.

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

      Yes Exactly...but instead you can use already available debug_array or debug_float message to send your own values...

    • @HoangLe-fu4xe
      @HoangLe-fu4xe 3 года назад

      alireza ghaderi well that is a different way to send custom values, but I personally still prefer the extension method though either of those methods would do

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

      You are right. .but this is the simplest and easiest for those who are beginners to PX4 architecture so they wont need to create a mavlink header file. just a quick shortcut cheat:D

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

      Thanks for the tutorial Alireza, and thanks for the clarification Hoang. Due to already compiled debug_array headers what is shown works

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

    This tutorial is awesome. :) I would like to know, how it has to be done when we are connecting a external sensor to Pixhawk?

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

      you should create a custom module or use simulink support package. I have a video about that in channel

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

    Thank you alireza ghaderi for this great tutorial,
    I have a question, I build a new app inside examples folder, I followed the instructions in the px4 documentation, and I run git submodule update - -recursive, but px4 does not recognize the app.
    What can I do to make px4 recognize the new app?

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

      Hi
      did you add your app in the cmakelist? using that cmakelist before building you introduce your module to PX4

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

      @@alirezaghaderi
      Thank you, I fixed the problem.
      But I have a question. Could I create an app in the same way in Python?

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

      you mean the module with python? i dont think so...you should ask on px4 developer forums

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

    Could you also explain this process for Ardupilot ? or how similar is it to this ?

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

      Its relatively similar process...its more more readable and easier to follow in ardupilot... I will do in future

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

      @@alirezaghaderi Yes please. it will be pretty helpful for many of us.

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

    Now, I am planning to publish my px4 onboard sensor datas to my companion computer which contains ROS2 , Do I have to make publish and subscribe UORB nodes in side of the px4 right? I mean I will make a pub/sub nodes from ROS2 and px4 to make communication between them?

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

      I havent worked with ROS actually. but if you are going to send data to Raspberry Pi, you should create a mavlink header for your custom uorb. If you dont know how to create a new mavlink packet, you can use the mavlink debug messages to deliver your values. I have a video for that in my channel I guess.

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

      @@alirezaghaderi thanks for the info :) I'll watch it too.

    • @danielefontana4251
      @danielefontana4251 9 месяцев назад

      @@alirezaghadericould you tell me how to use debug values messages to send and receive values? Is there a video where you explained this? Thanks a lot :)