How To Connect PixHawk to Raspberry Pi and NVIDIA Jetson

แชร์
ฝัง
  • เผยแพร่เมื่อ 22 พ.ค. 2024
  • Preflight checklist: companion computer ✅
    In this tutorial, I show you how to connect your PixHawk to both the Raspberry Pi, and an NVIDIA Jetson (a Nano in this case). This includes:
    - Soldering a serial cable that connects to the telemetry port (TELEM2)
    - Which GPIO pins you need to use
    - How to setup MAVProxy and its dependencies
    The steps shown should also work for newer models of the PixHawk (eg, Pix32v5, Pixracer, Hex Cube). Just make sure to pay attention to the cable soldering - everything else should remain the same.
    A203 Carrier Board - Seeed Studio
    www.seeedstudio.com/A203-Carr...
    ↓ Scroll down for the terminal commands ↓
    Special appearance: Sasha Walters (dog)
    Thanks to: Seeed Studio (www.seeedstudio.com/)
    Chapters
    00:00 - Introduction
    00:49 - Serial cable for PixHawk
    02:21 - Software setup
    02:42 - Jetson Nano GPIO to PixHawk
    03:41 - MAVProxy installation (Jetson Nano)
    04:54 - Raspberry Pi GPIO to PixHawk
    05:41 - MAVProxy installation (Raspberry Pi)
    08:28 - Wrapping up
    😎 Social Stuff
    Twitter: / akamatchstic
    Patreon: / akamatchstic
    ⚙️ Commands
    (copy/paste without the $)
    Jetson Nano:
    $ sudo apt-get update
    $ sudo apt-get install python-pip python3-pip
    $ sudo apt-get install python3-dev python3-opencv python3-wxgtk4.0 python3-matplotlib python3-lxml libxml2-dev libxslt-dev
    $ sudo pip install PyYAML mavproxy
    $ sudo mavproxy.py --master=/dev/ttyTHS1
    Raspberry Pi:
    $ sudo raspi-config
    $ sudo nano /boot/config.txt
    $ sudo reboot
    $ sudo apt-get update
    $ sudo apt-get install python3-pip
    $ sudo apt-get install python3-dev python3-opencv python3-wxgtk4.0 python3-matplotlib python3-lxml libxml2-dev libxslt-dev
    $ sudo pip install PyYAML mavproxy
    $ sudo mavproxy.py --master=/dev/ttyAMA0
    🌐 Links
    MAVProxy with systemd
    github.com/Matchstic/MAVProxy...
    🎵 Music
    BVG x møndberg - insomnia
    Listen: • BVG x møndberg - insomnia
    BVG x møndberg - The World At Night
    Listen: • BVG x møndberg - The W...
    Kanisan x no one's perfect - Gentle Wind
    Listen: • no one's perfect x Kan...
    BVG x møndberg - Fireplace
    Listen: • BVG x møndberg - Firep...
    Keywords: NVIDIA Jetson Nano, Raspberry Pi, PixHawk, MAVProxy, serial
  • วิทยาศาสตร์และเทคโนโลยี

ความคิดเห็น • 85

  • @HoffmanTactical
    @HoffmanTactical ปีที่แล้ว +12

    Keep these videos coming! There is a lack of good CV / AI / UAV content on the internet, and it's a fascinating area.

  • @IamG3X
    @IamG3X ปีที่แล้ว

    Man your voice is so soothing to hear. And the editing is perfect to follow. Step by step guide is on point. Really deserve top views and likes for this TH-cam category.

  • @mohamedaminefaiz6378
    @mohamedaminefaiz6378 หลายเดือนก่อน

    Perfect work! Please continue, you're helping a lot people with these videos!

  • @akshaydevanpally3764
    @akshaydevanpally3764 ปีที่แล้ว +1

    This video really helped me, thanks for such videos

  • @jnick6
    @jnick6 ปีที่แล้ว

    clear and concise.
    as a newbie, this was really needed. especially when it comes to the running commands and their meaning.. reading code is my second fear, fist is algebra.
    thanks a lot, subbed.

  • @faraazk.8015
    @faraazk.8015 9 หลายเดือนก่อน

    just came across this vid, nicely done sir

  • @royjones1053
    @royjones1053 9 หลายเดือนก่อน

    Thanks again for the quality content

  • @Film-maker
    @Film-maker 2 หลายเดือนก่อน

    Hi Matt, very informative video! Would you know which new flight controllers will work with Jatson boards?

  • @harmonydevdao55
    @harmonydevdao55 ปีที่แล้ว

    great content!

  • @AndrewBakerEngineer
    @AndrewBakerEngineer ปีที่แล้ว

    Great video. At Honeywell we use the Cube Orange and the Jetson Xavier NX combo. We don't bother with the GPIO header and just go straight from the Jetson's USB to the Cube's microUSB. Works fantastic.

    • @NOVAAlimentos-ux2xw
      @NOVAAlimentos-ux2xw ปีที่แล้ว

      Hi AerialRobotics, are you have some tutorials you can share us about the communication by Jetson Xavier NX USB and Cube's microUSB?

    • @Film-maker
      @Film-maker 2 หลายเดือนก่อน

      Hi Andrew, I hear many have issues connecting Cube Orange. Is there a way to avoid connection problems?

  • @athiganesh6130
    @athiganesh6130 5 หลายเดือนก่อน

    thanku for helping bro

  • @Dragoneer
    @Dragoneer 3 หลายเดือนก่อน

    Great tutorial man, that's gonna really help me out later. I see you cut the 5V wire, but I also would like to know, is the PixHawk capable of supplying the full 20W range specified for the Nano through the telem2 port? That would be really handy as I want to install the board to the drone itself. And I'm not sure that I trust the PixHawk board will permit that power draw...
    Edit: Figured I would use a buck converter from the battery instead, that way I can guarantee that it is capable

  • @vikaspoddar8443
    @vikaspoddar8443 ปีที่แล้ว

    welcome back Matchstic !!! can you do video on ROS2 integration with pix Hawk for robot management and PyTorch for object detection ???

    • @vikramurs9416
      @vikramurs9416 ปีที่แล้ว

      Yes, even i was looking for such kind of videos...

    • @akamatchstic
      @akamatchstic  ปีที่แล้ว

      I can try - ROS is something I played with last year but didn’t end up using, so will have to learn it myself first 😅

  • @Sam-iy1kv
    @Sam-iy1kv ปีที่แล้ว

    nice, I used a uart-usb connector connet pxihwak to one usb port, seems using the pins is easiers

  • @abeshifat7707
    @abeshifat7707 ปีที่แล้ว +1

    would you please make a video how i can make a indoor flying drone who perform like a flying robot . like if i want i can move a glass of water from one room to another room using this drone and put the glass in another room in accurate position . And what types of hardware is needed to be done to make this. Like Jetson Nano , pixhawk 2.4.8 , GPS and last thing how i can control it auto by using laptop or computers . by the way i cant write English properly so hope you kindly forgive me if i make some mistake to write this . I will be waiting for your video .Carry on brother .

  • @alexbattikha
    @alexbattikha 9 หลายเดือนก่อน

    are there any alternatives to the a203 carrier board? or is it possible to connect a pixhawk to jetson without any external carrier boards?

  • @sefaklcr
    @sefaklcr ปีที่แล้ว

    Hi mr. Matt, I have some questions about coding RP4 with PixHawk. We are trying to making a VTOL UAV and it has a simple task that it will change servo angle at the determined location and altitude. So, I want write a code for RP4 that will get this mission. How can I do that, can u help me? I am an amateur on RP4. Do you have some simple examples about that? :)

  • @elbhilatel7841
    @elbhilatel7841 ปีที่แล้ว

    Welcome, excellent explanation. Can you make a video of orange pi integration with pixhawk???

    • @akamatchstic
      @akamatchstic  ปีที่แล้ว +1

      If I had access to one, sure! That said, in theory you can adapt the instructions in this video for the Orange Pi.
      This looks to be the pinout for the Orange 5: www.orangepi.org/img/pi-5-pin-definition.png
      I imagine its a case of ensuring the TX and RX jumper wires of the serial wire I showed to the pins marked UART3 - ensure the TX jumper goes to the RX GPIO!
      In software, it looks like that would map to /dev/ttyS3. See here for where I'm pulling that info (which is for the R1): learn.adafruit.com/circuitpython-on-orangepi-linux/uart-serial#the-hard-way-using-built-in-uart-3010837
      Additionally, you may need to enable UART - see here (again, for the R1): learn.adafruit.com/circuitpython-on-orangepi-linux/orange-pi-r1#enable-uart-i2c-and-spi-3029848
      TLDR; make sure to enable UART if needed, and connect to the relevant GPIO headers with the serial cable I showed in my video

  • @MuhammadJunaid-yr8jd
    @MuhammadJunaid-yr8jd 10 หลายเดือนก่อน

    Hey, thank you so much for guiding me just like WOW! I am thinking about how can we connect the companion computer pi or Jetson, with Pixhawk using their micro-USB cable, I have seen a guy who is connecting, can we do it after following all the commands provided by you or there is another configuration need for that...

    • @akamatchstic
      @akamatchstic  10 หลายเดือนก่อน +1

      You can technically use the micro-USB cable for serial but be aware that it disables some safety checks - for example, ArduPilot will assume it is not connected to a battery when using the USB link, and disables all battery failsafes.

  • @eminbozkus3896
    @eminbozkus3896 ปีที่แล้ว

    Hi sir, Please give me a feedback. How can I connect my jetson nano with pixhawk cube orange on python scripts, using dronekit ? Actually I know about the software side but I need to help to hardware side.

  • @DavidGutierrezhi
    @DavidGutierrezhi 3 หลายเดือนก่อน

    bro what i have to do in the px4 im using the cube black, to enable mavlin in telemetry 1 or 2?

  • @CM-nq3zu
    @CM-nq3zu ปีที่แล้ว

    Nice

  • @mohammadabdollahi2742
    @mohammadabdollahi2742 5 หลายเดือนก่อน

    i have quastion for you
    what frame and vehicle do you use on your pixhawk and how do you upload it?
    i use simonhardware and upload it on linux but i didnt get the same result as you for example the AP:... commands
    i get some #%$#EREGF$F and some EPK and GPS ...
    |'ll be glad if you help me

  • @danielq1985
    @danielq1985 ปีที่แล้ว +2

    First, love the videos. Second, how can I send you a proper set of wire strippers?

    • @akamatchstic
      @akamatchstic  ปีที่แล้ว

      Thanks! So wire strippers… I do have one in a box, that is incredibly frustrating to get into 😅 Since I don’t have a PO Box etc, I am pretty uncomfortable giving out my address online, but I *seriously* appreciate the sentiment!

  • @user-mt8it3nd9n
    @user-mt8it3nd9n ปีที่แล้ว

    where can I type those command? I have connect pixhawk with resp pi.

  • @prathamvjain7569
    @prathamvjain7569 3 หลายเดือนก่อน

    Bro I’m building package pickup drone using ros and jetson nano and using pixhawk for flight control

  • @DeanBateman
    @DeanBateman ปีที่แล้ว

    Now that it is connected, would love to see some examples of what you can do with them. Even if they are not fully coded examples

    • @akamatchstic
      @akamatchstic  ปีที่แล้ว

      I can show you a fully functioning system using this if you wanted! This is the source code for Stanley, an autonomous drone using an RPi for the companion computer: github.com/Matchstic/stanley

  • @philippjansen6079
    @philippjansen6079 ปีที่แล้ว

    Hi Matt! Great video - do you think it is possible to connect a Orange Pi 5 to a Pixhawk?

    • @akamatchstic
      @akamatchstic  ปีที่แล้ว +1

      Cheers! I would expect so, just double check the GPIO layout before you do. There may also be a need to enable appropriate hardware like for the Raspberry Pi via a config file

    • @philippjansen6079
      @philippjansen6079 ปีที่แล้ว

      @@akamatchstic Thanks Matt!

  • @alexandergeorgiev2631
    @alexandergeorgiev2631 3 หลายเดือนก่อน

    Can you use ttyTHS2 instead?

  • @HS_COMET
    @HS_COMET ปีที่แล้ว

    Your video is interesting. Let me ask you a question. Does connecting using usb to ttl work in the same way as connecting to gpio pins 8, 9, and 10?

    • @akamatchstic
      @akamatchstic  ปีที่แล้ว +2

      It should do yes - the key thing is to ensure a serial device is available to receive/send MAVLink messages

    • @diannajames4453
      @diannajames4453 ปีที่แล้ว

      @@akamatchstic I too bought a usb to ttl device. But I do see how your way would save the cost and save an additional USB port.

  • @DineshKumar-ki2lf
    @DineshKumar-ki2lf ปีที่แล้ว

    Hey, just a quick question - have you experimented with PX4 firmware ?

    • @akamatchstic
      @akamatchstic  ปีที่แล้ว

      Not as much as ArduPilot to be honest!

  • @user-jw3hy1dh9z
    @user-jw3hy1dh9z ปีที่แล้ว

    thanks for sharing, i'm wondering if mavproxy can work on PX4 firmware?

    • @akamatchstic
      @akamatchstic  ปีที่แล้ว +1

      Yep, should work just fine 👍🏻

    • @user-jw3hy1dh9z
      @user-jw3hy1dh9z ปีที่แล้ว

      @@akamatchstic thanks for reply, it works. However i have to wire tx rx through usb signal transform device.

  • @RacecarJ0hnny
    @RacecarJ0hnny ปีที่แล้ว

    omg this is what im gonna do

  • @RacecarJ0hnny
    @RacecarJ0hnny ปีที่แล้ว

    Why did you choose the carrier board rather than the Nano Dev Kit?

    • @akamatchstic
      @akamatchstic  ปีที่แล้ว +1

      I’ve used both with a drone, with the carrier board I can just wire up an XT30 connector and not need to power it via GPIO

  • @ensam9317
    @ensam9317 ปีที่แล้ว

    But how to power it on the drone

  • @ienMinh
    @ienMinh ปีที่แล้ว

    Hii Matchstic ! Can i connect the F405 mk3 lite filght control (other pikHawk)with Jetson Nano for project like u ?

    • @akamatchstic
      @akamatchstic  ปีที่แล้ว +1

      In theory, yes!
      Looking at the documentation (ardupilot.org/plane/docs/common-mamba-basic-mk3.html ), you’ll need to solder the jumper wires directly to the board. I’m not 100% certain of the pins you need to solder to though. That docs page seems to suggest that the RX6 and TX6 pins are available for this, as well as any available Ground pin. As per the video, make sure you connect the soldered RX connection on the board to the TX GPIO pin, and the equivalent for TX to RX GPIO.
      In your autopilot parameters, you may need to update the relevant serial port’s protocol to 2 to get MAVLink messages flowing.

    • @ienMinh
      @ienMinh ปีที่แล้ว

      I looked on the jetso nano forum and someone asked the same question. why are Tx/rx2 and tx/rx4 pins empty but we don't connect them?

  • @dsyeta174omkshirsgar2
    @dsyeta174omkshirsgar2 หลายเดือนก่อน

    jetson says permission denied on THS1 port error 13

  • @VitaoHelloWorld
    @VitaoHelloWorld 11 หลายเดือนก่อน

    after install mavproxy i need to install dronekit or with only mavproxy i can send commands for px4?

    • @akamatchstic
      @akamatchstic  10 หลายเดือนก่อน

      Depends on your goal to be honest. I used DroneKit in a project to send commands from a companion computer over Python. Setup looked like this:
      My Python program -> DroneKit -> MAVProxy running locally -> PixHawk
      If you’re using DroneKit and don’t need MAVProxy to eg also forward data to a ground station, you can actually skip MAVProxy and connect directly to the serial port.
      With MAVProxy on its own, you can connect it up to anything that works with MAVLink data over the network. Eg multiple ground stations
      If used on its own, you’ll still be able to send commands to PX4 on the PixHawk. DroneKit is one source that can send those commands

  • @ttaylor9916
    @ttaylor9916 2 หลายเดือนก่อน

    maybe next a simple diagram that shows that you connect rx to tx?

  • @kemaldemir7045
    @kemaldemir7045 ปีที่แล้ว

    hello, thanks for this informative video 🙋🏻‍♂️ i need to ask that, can i do the same steps for jetson xavier nx ? and also i need to give the power supply from a lipo batterry how can i do that? does anybody here to help me?

    • @akamatchstic
      @akamatchstic  ปีที่แล้ว

      I’d imagine the exact same steps will work for Xavier - just make sure your GPIO connection is correct! For the Lipo battery, I’d recommend looking into using a UBEC to source a good supply of 5V, then power the device from that - this is what I did for my drone using the Jetson Nano

  • @sairajesh4817
    @sairajesh4817 7 หลายเดือนก่อน

    hai
    how u connected jetson nano without cable to pc and is there any files how to access jetson and can u sujected me which is better rasberry pi or jetson nano for pixhawk AI control

    • @akamatchstic
      @akamatchstic  7 หลายเดือนก่อน

      I used SSH to run commands on both the Jetson Nano and Raspberry Pi. If you’re looking for longer flight times, the Raspberry Pi would be preferable due to less power requirements. It’s all down to your project’s requirements really!

    • @sairajesh4817
      @sairajesh4817 7 หลายเดือนก่อน

      THANKYOU SIR
      @@akamatchstic

  • @johnmelbolaybolay6725
    @johnmelbolaybolay6725 9 หลายเดือนก่อน

    Why do I get a permission denied whenever I tried to run mavproxy in serial port ttyTHS1

    • @akamatchstic
      @akamatchstic  9 หลายเดือนก่อน

      You’ll need to run it as root

  • @denisbrown261
    @denisbrown261 7 หลายเดือนก่อน

    Hi, when I tried to run this command: sudo pip install PyYAML mavproxy, I got an error that said the SSL Certificate Verify failed. How could I fix this?

    • @LeviDeHaan
      @LeviDeHaan 4 หลายเดือนก่อน

      Youre using anaconda? If so run conda deactivate and then run again.

  • @DhruvArne-ff8kw
    @DhruvArne-ff8kw 9 วันที่ผ่านมา

    Libxslt is not installing

  • @eminbozkus3896
    @eminbozkus3896 ปีที่แล้ว

    I get an error saying MAV > link1 down. Could you help with the solution?

    • @akamatchstic
      @akamatchstic  ปีที่แล้ว

      Sounds like one of the following:
      - the RX and TX pins are connected the wrong way around on the GPIO header
      - you’re using the wrong serial port (run the following to see available ones: ls /dev)
      - the cable is not soldered properly
      - the cable is not connected to the right telemetry port on the PixHawk (or equivalent)

    • @eminbozkus3896
      @eminbozkus3896 ปีที่แล้ว

      @@akamatchstic There is no problem with any of the steps you mentioned. Could there be another reason?

    • @chiuanshin1987
      @chiuanshin1987 ปีที่แล้ว

      @@eminbozkus3896 sir,I have the same problem, how did you solve it?

    • @eminbozkus3896
      @eminbozkus3896 ปีที่แล้ว

      @@chiuanshin1987 Yes, I solved. The problem is depend on the cables of rx,th,ground connection. You should connect the rx to tx, tx to rx and ground to ground, for communication. If your problem will continue I can help you on zoom or any video conference application.

    • @chiuanshin1987
      @chiuanshin1987 ปีที่แล้ว

      @@eminbozkus3896 Thank you so much, I successfully solved the problem by swapping "tx" and"rx", thank you again~!

  • @duanebowman9595
    @duanebowman9595 ปีที่แล้ว

    Are you still with US? Hope so. Can you do a more indepth Raspbeery 4??

    • @akamatchstic
      @akamatchstic  ปีที่แล้ว

      Yeah I’m still here, just busy IRL! 😅 What do you mean by more in depth Raspberry Pi 4?

    • @duanebowman9595
      @duanebowman9595 ปีที่แล้ว

      @@akamatchstic I am A 70+ old fart. and 8min is hard for me to walk through. I need to do long range way points. Might try 4/5g to get what I need.

  • @tselin7611
    @tselin7611 ปีที่แล้ว

    But it doesn't work for PX4 right?

    • @akamatchstic
      @akamatchstic  ปีที่แล้ว

      Should work just fine with PX4 too, i just used ArduPilot for demonstration purposes

  • @canadianrepublican1185
    @canadianrepublican1185 4 หลายเดือนก่อน

    cut ur hair.

    • @akamatchstic
      @akamatchstic  4 หลายเดือนก่อน

      absolutely not!

    • @canadianrepublican1185
      @canadianrepublican1185 4 หลายเดือนก่อน

      @@akamatchstic
      I used to have hair just like urs. :)
      So gas generators on bigger drones . Why does this seem uncommon?

  • @user-bc6dh8yk3o
    @user-bc6dh8yk3o ปีที่แล้ว

    hi, I'm making a drone. your drone is very awesome
    my project is using jetson. if I have a question about drone, can I email to you?

    • @user-bc6dh8yk3o
      @user-bc6dh8yk3o ปีที่แล้ว

      how do you connect jetson nano and pixhawk from a software perspective? something I have to download?