Dronekit setup, simulation and visualization on Mission Planner

Поделиться
HTML-код
  • Опубликовано: 11 сен 2024
  • Setup a Virtual Machine (VM) and set the internet connection as "Bridged". Open a terminal and install dronekit, dronekit-sitl and mavproxy using pip
    ********************************
    NOTE: THIS SETUP IS OBSOLETE. IN ORDER TO INSTALL DRONEKIT DOWNLOAD THE REPOSITORY AND INSTALL FROM SOURCE:
    sudo python setup.py build
    sudo python setup.py install
    dronekit--sitl is obsolete
    Check this video for running sitl with Mission Planner • How to use SITL in Mis...
    *******************************
    pip install mavproxy
    pip install dronekit
    pip install dronekit-sitl
    Start the simulator with
    dronekit-sitl copter
    Share the connection with the localhost and external UDP (as your phone for example)
    mavproxy.py --master tcp:127.0.0.1:5760 --out:127.0.0.1:14551 --out udp:(ip address):14550
    On windows, open Mission Planner (or in your phone open Tower) and connect the UDP port 14550
    In Linux, write your script and connect the vehicle to "udp:127.0.0.1:14550"
    Enjoy
    *** SHOP NOW at my store and help sustaining the channel:
    teespring.com/...
    ** Enroll in the Class ZERO to DRONE PROGRAMMER: • Become a DRONE PROGRAM... ***
    For more information on how to setup dronekit and other examples: python.dronekit...
    The python code is available at: github.com/dro...
    Find the next video here: • Dronekit setup, simula...
    *** JOIN THE FACEBOOK COMMUNITY: / tizianotutorials

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

  • @asnaeb2
    @asnaeb2 Год назад +3

    In 8 minutes from install to functional. THANK YOU for this amazing tutorial that gets to the point very quickly.

  • @Luiblonc
    @Luiblonc 6 лет назад +3

    Hi Tiziano! Thank you - this video is brilliant! You know, I spent so many years in the Rc industry as a 3D helicopter enthusiast - almost 25 years! Today I am heavily versed in Linux and could see this as my next challenging project. Thank you!

    • @prandtlmayer
      @prandtlmayer  6 лет назад +2

      Luis Ferrel I'm glad I could help you finding a new path for your fun or your career. If you do any video or job inspired by my series, pletase post the links in the forum and I'll mention them.

  • @calebbergquist2066
    @calebbergquist2066 6 лет назад +1

    Tiziano, thank you for enlightening me on Dronekit. That looks to be some powerful stuff! I saw where your mission planner was based and it shocked me, cause I live right in Tulsa! Small world.

    • @prandtlmayer
      @prandtlmayer  6 лет назад

      Great Caleb, find me on Linkedin

    • @ethanlee2602
      @ethanlee2602 4 года назад

      You should enlighten your customers on Udemy. I followed your guide and it is broken. Navio2 doesnt listen on port 14550 and so none of the dronekit scripts work

  • @tarasdvoretskij2123
    @tarasdvoretskij2123 2 года назад +2

    Thank you for your work! Please make an up-to-date step-by-step video with Dronekit setup,
    simulation and visualization on Mission Planner for ubuntu 20.04.
    I am particularly interested in which packages need to be installed and configured.
    With best wishes.

    • @carlosquinones7275
      @carlosquinones7275 2 года назад +2

      Just did it not too long ago with ubuntu 16.04. Make sure you are using python 2 and not python3, as dronekit has not been updated to work with python3
      Same goes for pip and pip3
      You can check with version of python and pip you are running using in the terminal pip -V and python -V (should say that python 2.x is running)

  • @richardathey3116
    @richardathey3116 6 лет назад +2

    Thank you Tiziano, this is awesome and your tutorials have helped me a lot at University

    • @prandtlmayer
      @prandtlmayer  6 лет назад

      Check out all my other videos! And the one is coming this week (hopefully)

  • @brockm2263
    @brockm2263 6 месяцев назад

    OMG thank you!!!!!!!! im so glad I found this it was so straitforward and to the point you saved my life THANKS

    • @TheGamerInc26
      @TheGamerInc26 5 месяцев назад

      were you able to use dronekit ? because iam getting some mutable mapping error in python 3.10.

  • @prabhakargupta1767
    @prabhakargupta1767 4 года назад +2

    well i cant believe why this amazing channel has soo less subs and views do all youtube users just watch shit instead learning something

  • @sanperez313
    @sanperez313 Год назад +1

    Gracias Tiziano! I will follow your straightforward and easy-to-understand video! One quick question, have you tried MAVSDK, and if so, what do you think about it?

  • @calebbergquist2066
    @calebbergquist2066 6 лет назад +5

    If anyone is running into DISARMING problems right after ARMING, try adding
    vehicle.channels.overrides['3'] = 1500
    Below "vehicle.armed = True" in the script.
    Apparently some ArduCopter parameters make the copter DISARM if the throttle doesn't reach over 1500 after 2 seconds. This helped me stay ARMED and I was able to execute the script successfully.

    • @prandtlmayer
      @prandtlmayer  6 лет назад

      yes, that is a safety embedded in the firmware. After you armed you set the system in GUIDED and send a simple_takeoff(altitude) command

    • @info781
      @info781 5 лет назад +1

      Add this to delay the launch until it is fully armed.
      vehicle.armed = True
      while not vehicle.armed:
      time.sleep(2)
      vehicle.simple_takeoff(tgt_atltitude)

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

    Insightful, But I think, You need to specify groundspeed in the simple_goto function to move the drone

  • @MrJawwadzahed
    @MrJawwadzahed 6 лет назад +1

    WOW!! you made my life so easy

    • @prandtlmayer
      @prandtlmayer  6 лет назад

      I am glad I did. Keep following and spread the news

  • @prandtlmayer
    @prandtlmayer  6 лет назад

    I suggest first you check out more documentation about mavproxy and really understand how it works, then try again. If you run mavproxy in linux and you want to proxy the info to the windows pc, you have to provide the windows pc ip address. Make sure the vm is setup with the connection in bridged, so it has its own ip

    • @tylerdurden8506
      @tylerdurden8506 6 лет назад +1

      yes that was the problem... i forgot to change the network adapter to bridged. Thanks

  • @guohaoye9628
    @guohaoye9628 4 года назад +2

    Hi, Mr. Tiziano! I am pretty into your videos. Currently I always have a question like:" Arming motors..." again over again. Never stop. I believe it is because the vehicle is not armable yet. so my question is how to exactly make the vehicle armable? I am using Dronekit-python, Intel onboard, and Pixhawk4 (Ardupilot). Looking forward your response!

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

    I am having a problem where my drone won't take off. Basically, I get an error like this
    APM: ARMING MOTORS
    APM: Initialising APM...
    ARMED
    Arming checks disabled
    APM: DISARMING MOTORS
    DISARMED
    The simulated drone tries to take off but can't go over 0.1. Mr.
    Tiziano Fiorenzani, do you know what might be the problem?

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

      same here im stuck on the same fucking problem lmao pls let me know if u find a solution

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

      Have you tried using the SIL from mission planner?

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

      @@prandtlmayer That's what I ended up using

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

      @@prandtlmayer This seems to be a very universal problem and I am running into this as well. I tried to follow the 3DR documentation and your videos but same issues persist. Could you give me some guidance to solve this "Disarming Motors" issue? Thank you so much!!

    • @iamprudhvigattu
      @iamprudhvigattu 8 месяцев назад

      Bro did you fix the problem you are facing because I too got the same error. I need to resolve it can you please help me?

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

    Sir, thank you for your great explanation. SO, sir one thing is not clear to me. Did you connected it with your vehicle or it all about simulation?
    Thank you!

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

    Great! Educational. Thanks for sharing.

  • @SuperKing11100
    @SuperKing11100 Год назад +1

    If you're getting an error in Mission Planner that says "Only one usage of each socket address is normally permitted" it's either due to your Virtual Box not having a bridged connection or in my case Windows private network firewall was blocking the connection from guest (VM) to host, hope this helps someone!

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

    Sir are you connect hardware when you are Programming drone or doing simulation

  • @faikvural1119
    @faikvural1119 5 лет назад +2

    "mavproxy.py --master tcp:127.0.0.1:5760 --out udp:127.0.0.1:14551 --out udp:(ip address):14550" when i write this command in cmd (windows) , open mavproxy.py in my ide and then not execute. pls help ? how i execute this command

    • @prandtlmayer
      @prandtlmayer  5 лет назад +1

      In Windows do not write the .py, just call mavproxy

    • @AS-jc2lc
      @AS-jc2lc 3 года назад

      @@prandtlmayer This opinion is very useful. Thank you!

  • @richdononthego
    @richdononthego 6 лет назад

    Hi Tizziano, I'm new to this dronekit-sitl thing. Installed it on Ubuntu just to try, run it and seems to work. But when I took out the internet connection it don't work. Does sitl work offline? Thanks

  • @Ais-qc1bc
    @Ais-qc1bc Год назад

    brother all is work but "vehicle.mode= VehicleMode()""
    -mode not work return same mode! what cai I do??

  • @tkinter3160
    @tkinter3160 6 лет назад +1

    i don't open mission planner , but i make follow every step , i use window and install mavproxy
    dronekit dronekit-sitl complete.

  • @vighneshnkp6866
    @vighneshnkp6866 5 лет назад

    I seem to be having trouble from 2:50 onwards. I'm getting a message which says USB ports must be specified with host:port. Do you know what needs to be done? Please reply.

  • @chaitanya3702
    @chaitanya3702 4 года назад +1

    when i run the code the simulation and the program is not running simultaneously. The python program is running but its not showing in mission planner until the program is finished running. Please help me out. i have a deadline

    • @prandtlmayer
      @prandtlmayer  4 года назад

      What do you mean, I'm afraid I don't understand

  • @malakzitouni1924
    @malakzitouni1924 5 лет назад +5

    Hi Tiziano! Thank you I followed the procedure and when i run the script of control with arrow keys i end up with this error "ERROR:autopilot:DISARMING MOTORS"

    • @mrsaraf3459
      @mrsaraf3459 4 года назад +1

      I'm seeing the same thing, it arms then immediately disarms. Did you figure it out by any chance?

    • @anujregmi4582
      @anujregmi4582 4 года назад

      @@mrsaraf3459 i too have the same problem it says error:autopilot:ARMING MOTORS, WARNING link timeout, no heartbeat in last 5 seconds
      Error:Autopilot:Disarming

    • @nayeemkhatib9596
      @nayeemkhatib9596 4 года назад

      Hi could any one figure out the reason for the error and the way out ?

    • @anujregmi4582
      @anujregmi4582 4 года назад +1

      @@nayeemkhatib9596 Well the problem is the dronekit version that you installed.. What is the version that you have...The one that works are version 2.9.0 and Dronekit sitl 3.0.1 something like this...

    • @tankaichuen1258
      @tankaichuen1258 4 года назад +1

      @@nayeemkhatib9596 I found out the problem. The issue is the vehicle mode is not switch to GUIDED mode, although you already set it in your script. lol. I have to set it manually in Mission Planner before executing the script. MY goodness.

  • @abhinavreddyk4954
    @abhinavreddyk4954 5 лет назад +1

    Hey Tiziano Fiorenzani!
    I'm unable to open it, I'm getting the below mentioned in my terminal.
    Thank you!
    # mavproxy.py --master tcp:127.0.0.1:5760 --out udp:127.0.0.1:14551 --out udp:10.55.222.120:14550
    WARNING: You should uninstall ModemManager as it conflicts with APM and Pixhawk
    Connect tcp:127.0.0.1:5760 source_system=255
    Log Directory:
    Telemetry log: mav.tlog
    MAV> Waiting for heartbeat from tcp:127.0.0.1:5760
    Exception in thread main_loop:
    Traceback (most recent call last):
    File "/usr/lib/python2.7/threading.py", line 801, in __bootstrap_inner
    self.run()
    File "/usr/lib/python2.7/threading.py", line 754, in run
    self.__target(*self.__args, **self.__kwargs)
    File "/usr/local/bin/mavproxy.py", line 811, in main_loop
    master.wait_heartbeat(timeout=0.1)
    TypeError: wait_heartbeat() got an unexpected keyword argument 'timeout'
    MAV>

    • @prandtlmayer
      @prandtlmayer  5 лет назад

      Read the first line. You should uninstall modem manager

  • @scratchsatriani
    @scratchsatriani 5 лет назад +1

    Hi Tiziano, i able to use your script on a real drone using --connect 0.0.0.0:14550. If i want to connect to another real drone... can i issue another --connect 0.0.0.0:14560?
    Thanks in advance

  • @antonypaul5402
    @antonypaul5402 Год назад +2

    Bro, I got an error while executing this code
    Showing error: autopilot:ARMING MOTORS

    • @iamprudhvigattu
      @iamprudhvigattu 8 месяцев назад

      Bro did you resolve the problem? I'm also getting the same error I need to fix it. It's urgent

  • @juandediosyanez
    @juandediosyanez 6 лет назад +1

    Good Tiziano, first of all thank you for the great tutorial you have done and how much you are helping us. I'm trying to do it step by step, but I find some problems, like the next, and I do not move forward.
    mavproxy.py --master tcp:127.0.0.1:5760 --out udp:192.168.1.132:14551 --out udp:192.168.1.132:14550
    ERROR: mavproxy takes no position arguments; got (['\xe2\x80\x93-out', 'udp:192.168.1.132:14551'])
    When I try to start mavproxy I get the following error. What can you owe? Do you have any solution?

    • @prandtlmayer
      @prandtlmayer  6 лет назад

      That is really weird. Try to uninstall mavproxy and install it again

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

    Hi it's nice video. All works for me except changing mode. I get an error as DO_SET_MODE : unsupported. I try to figure of with all kind of tutorials but nothing works. Any idea what should be done to work out this?

  • @01bit
    @01bit 3 года назад

    Thank you!

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

    Hi Sir ! How can I change the drone location ? I wrote the latitude , longitude and the other two value (0,180) same as yours. And now I want to change my drone home location . Can you help ? thanks

  • @grabitgo2724
    @grabitgo2724 4 года назад +1

    Thank you sir for your content.
    Sir I need a help.
    Sir I'm very confused and stuck in the software solution, that is I cannot able to figure out which softwares you're using in this video and how can I use the same softwares in Windows 10.
    Please give me a software solution for Windows 10, i.e. for this codings which softwares I can use in Windows 10.

    • @prandtlmayer
      @prandtlmayer  4 года назад

      Watch the other videos in the series, it becomes easier. Here I showed the SIL running in Linux on VM and Mission Planner running in Windows

    • @grabitgo2724
      @grabitgo2724 4 года назад

      @@prandtlmayer okay thanks for your reply

  • @tomdebie2486
    @tomdebie2486 6 лет назад

    Hello Tiziano,
    Would this also be possible to use a Raspberry Zero for this? I'm quite interested in implementing some intelligence into my multi-rotor, but would like to keep the weight as low as possible.
    With kind regards,
    Tom

    • @prandtlmayer
      @prandtlmayer  6 лет назад

      Sure, I have used the zero too. Much slower, need to check your CPU load

  • @samacumen
    @samacumen 6 лет назад

    Thanks for the nice video. Just curious to know what all tools did you use for this video? Many thanks.

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

    Also at first Ubuntu 16.04 was saying dronekit-sitl command was not recognized but I ended up rebooting my VM and it worked all of a sudden

  • @marco6969ish
    @marco6969ish 6 лет назад +1

    Hi Tiziano, I tried to conect the mission planner but the "Connecting Mavlink" window is stuck. I recently installed the las version of mission planner (1.3.55 build)

    • @prandtlmayer
      @prandtlmayer  6 лет назад

      What is this window? I have been using the last version, no problem. Follow my last video on sitl and mission planner

    • @marco6969ish
      @marco6969ish 6 лет назад

      It is the window that appears when the "connect" button is clicked. I will, thanks for answer

  • @mickey3572
    @mickey3572 6 лет назад

    Hey the video is enlightening. Keep up the work.
    Yet I have a small doubt.
    What about the simulator file ,where I can get it? Can I write the simulation code on normal console? Do we need some telemetry hardware in order for functioning of mavlink because my mission planner is not showing anything on UDP mode. Sorry, I am new into all this.

    • @prandtlmayer
      @prandtlmayer  6 лет назад

      For the simulator you have different option. You can run dronekit_sitl on the linux virtual machine (but is an fw release) or you can use the one embedded in Mission Planner (I will do a video covering this shortly). Every mission lanner or APM planner or Qground control can connect to udp or tcp. At the top right window there is a drop down menu where you can select either tcp (usually port 5760 for telemetry 1 or 5762 for telemetry 2) or UDP (usually forwarded by a mavproxy to 14550)

  • @ywf98
    @ywf98 5 лет назад

    waw succes very easy , thanks ,

    • @chaitanya3702
      @chaitanya3702 4 года назад

      when i run the code the simulation and the program is not running simultaneously. The python program is running but its not showing in mission planner until the program is finished running. Please help me out. i have a deadline

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

    Sir your videos have helped a lot!!....wanted to ask what if i want to run the sitl for my unmanned ground vehicle??..is there "roverkit" like "dronekit"??...Please acknwledge sir!!

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

      Drone kit it's just a wrapper for mavlink so you should be ok using it

  • @fendadwiariefianto9446
    @fendadwiariefianto9446 6 лет назад

    hi tiziano,
    i need ur help..
    when i enter this command "dronekit-sitl copter --home=35.9835973,-95.8742309,0,180"
    i get an error like this
    "pi@raspberrypi:~ $ dronekit-sitl copter --home=35.9835973,-95.8742309,0,180
    os: linux, apm: copter, release: stable
    SITL already Downloaded and Extracted.
    Ready to boot.
    Traceback (most recent call last):
    File "/usr/local/bin/dronekit-sitl", line 11, in
    sys.exit(main())
    File "/home/pi/.local/lib/python2.7/site-packages/dronekit_sitl/__init__.py", line 591, in main
    sitl.launch(args, verbose=True)
    File "/home/pi/.local/lib/python2.7/site-packages/dronekit_sitl/__init__.py", line 251, in launch
    caps = ArdupilotCapabilities(self.path)
    File "/home/pi/.local/lib/python2.7/site-packages/dronekit_sitl/__init__.py", line 160, in __init__
    process = subprocess.Popen([path, '--help'], stdout=subprocess.PIPE)
    File "/usr/lib/python2.7/subprocess.py", line 390, in __init__
    errread, errwrite)
    File "/usr/lib/python2.7/subprocess.py", line 1024, in _execute_child
    raise child_exception
    OSError: [Errno 8] Exec format error"
    I'm using at putty in windows and i have been searching on internet... i don't get an answer. Maybe u can help me..
    thanks.
    nb: sry for bad english, i'm student from indonesia.

    • @prandtlmayer
      @prandtlmayer  6 лет назад

      You cannot run SITL on the raspberry

  • @serkanbtn
    @serkanbtn 4 года назад

    hi tiziano . i have a problem from my mavproxy connection can you help me.
    i am running dronekit software in the my gcs and i am running mavproxy.py in the navio but thats not working. i think the problem is for my running shape but i try so many thing

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

      For navio you can also ask them, they usually are very supportive. Another good place is the Ardupilot forum

  • @tylerdurden8506
    @tylerdurden8506 6 лет назад

    +Tiziano Fiorenzani when i try to connect to mission planner at port 14550 , it doesnt happen. Also the mavlink script says no link. Any idea?

    • @prandtlmayer
      @prandtlmayer  6 лет назад

      Are you sure you put the right ip address?

    • @tylerdurden8506
      @tylerdurden8506 6 лет назад

      Just to be sure :Which ip am I supposed to give? The ip of VM or the machine with the Mission Planner?

  • @dinesh1286
    @dinesh1286 6 лет назад

    I need to control an fixed wing uav using pixhawk and raspberry pi 3. i want to do a real-time control (get states from pixhawk do computations in RPi3 and send pwm command from RPi3 to pixhawk). i followed ur video and managed to get states from pixhawk to rpi3. now i need to send pwm commands to control throttle, rudder, elevator and aileron in real-time. This is not allowing pixhawk to take control of the plane. kindly explain me how to go abt

    • @prandtlmayer
      @prandtlmayer  6 лет назад

      Dineshkumar M , first you'd better check out my video on plane. Second, there is no free meal. You have to study the documentations, helps and tutorials, write your coding and make your way through it. You can do it

  • @maker72460
    @maker72460 6 лет назад

    Hey Tiziano,
    Your video is very informative.
    Is your linux version x86?
    I have x64 Ubuntu 17.10 and installed everything from pip as you did. But it shows error "dronekit-sitl : command not found" when I type dronekit-sitl command on terminal.

    • @prandtlmayer
      @prandtlmayer  6 лет назад

      Sarvesh Thakur I haven't tried the 17 yet, still at 16 lts. I have the 64 running on my laptop and on my virtual machine

    • @Chr0nalis
      @Chr0nalis 6 лет назад

      You probably installed it to a different python.

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

      @@Chr0nalis whats version he must download it on ?
      and how be sure?

  • @hello81642
    @hello81642 8 месяцев назад

    Are we losing any dronekit functionality/functions by using python e.g. 3.9 instead of 2.7?

    • @prandtlmayer
      @prandtlmayer  8 месяцев назад

      I don't think so, it has been ported to 3 long ago. Also you can always access the lower pymavlink object and get to the mavlink message level

  • @khtan5531
    @khtan5531 5 лет назад

    At the 2:51 mark in the video , after I typed the "mavproxy.py --master tcp:127.0.0.1:5760 --out:127.0.0.1:14551 --out udp:(ip address):14550" command in the Anaconda command line window, a Notepad window named mavproxy pops up instead. What is the problem here and how can I resolve it ?

    • @prandtlmayer
      @prandtlmayer  5 лет назад

      In Windows you run mavproxy without the .py

  • @SarvaShakthiRotavator
    @SarvaShakthiRotavator 6 лет назад

    hey! i see the video was quite informative but not quite enough for dead-start beginners like me. Is there any written, step-by-step help for that?

    • @prandtlmayer
      @prandtlmayer  6 лет назад +1

      Almost, will make a video about it soon. I'll keep you posted

    • @ankurkamboj4854
      @ankurkamboj4854 5 лет назад

      @@prandtlmayer hi is there any update on that step by step guide ? I am eagerly waiting.

  • @yazeedarifin6708
    @yazeedarifin6708 5 лет назад

    Hi Tiziano! I had a problem when I try to connect the both VM and Mission palnner. After I connected to mavproxy then I open the mission planner, I clicked the connect button inside. Window 'Connecting Mavlink' appears and stays on waiting progress to connect. It keeps waiting even after an hour. Do you have a solution for it to connect?

  • @dopichannel2646
    @dopichannel2646 4 года назад

    Hello Tiziano, thanks for your information. I'm still confused,
    My drone can fly, with px4 in mission planner using flight plans only. but can it be optimized by editing through the source code? in which option to change source code?

    • @prandtlmayer
      @prandtlmayer  4 года назад

      The point of my video is showing that you can add a whole new layer of logics, guidance and algorithms using python rather than messing with the source code (that is also open source and requires you to share everything you modified in it)

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

    Is it possible to give the drone updated waypoints mid-flight with this method?

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

      also interested here!

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

      Absolutely yes. You can also set the drone in GUIDED mode and command single points without going into MISSION mode

  • @LNasterio
    @LNasterio 6 лет назад

    when I run Mavproxy, I get the following error:
    load_all took 0us
    0 0 0 online system 1
    STABILIZE> Mode STABILIZE
    Exception in thread main_loop:
    Traceback (most recent call last):
    File "/usr/lib/python2.7/threading.py", line 801, in __bootstrap_inner
    self.run()
    File "/usr/lib/python2.7/threading.py", line 754, in run
    self.__target(*self.__args, **self.__kwargs)
    File "/usr/local/bin/mavproxy.py", line 783, in main_loop
    master.wait_heartbeat()
    File "/usr/local/lib/python2.7/dist-packages/pymavlink/mavutil.py", line 383, in wait_heartbeat
    return self.recv_match(type='HEARTBEAT', blocking=blocking)
    File "/usr/local/lib/python2.7/dist-packages/pymavlink/mavutil.py", line 344, in recv_match
    m = self.recv_msg()
    File "/usr/local/lib/python2.7/dist-packages/pymavlink/mavutil.py", line 318, in recv_msg
    msg = self.mav.parse_char(s)
    File "/usr/local/lib/python2.7/dist-packages/pymavlink/dialects/v10/ardupilotmega.py", line 9257, in parse_char
    self.__callbacks(m)
    File "/usr/local/lib/python2.7/dist-packages/pymavlink/dialects/v10/ardupilotmega.py", line 9234, in __callbacks
    self.callback(msg, *self.callback_args, **self.callback_kwargs)
    File "/usr/local/lib/python2.7/dist-packages/MAVProxy/modules/mavproxy_link.py", line 460, in master_callback
    mavutil.mavlink.MAV_TYPE_DODECAROTOR]:
    AttributeError: 'module' object has no attribute 'MAV_TYPE_DODECAROTOR'
    although if I upgrade pymavlink this error would disappear, but Mavproxy will not function, additional to that, the dronekit end up with error as it requires lower version of pymavlink.
    I really need help with this....

    • @prandtlmayer
      @prandtlmayer  6 лет назад

      Where are you running this? On Debian with a Raspi or a Ubuntu machine? Anyway, I'd suggest you wipe it clean, uninstall dronekit and pymavlink and mavproxy, then proceed with downloading and compiling dronekit (I have it on the SITL video and the Raspi video) and then pip install mavproxy

  • @MrOdded
    @MrOdded 6 лет назад

    hello, im using virtual box for linux, and trying to connect to the mission planner. im getting "no link" massages. i think i typed a wrong ip address. what do you think might be the problem?
    thanks!

    • @prandtlmayer
      @prandtlmayer  6 лет назад

      Did you set the connection in bridged mode?

  • @rasmusg1407
    @rasmusg1407 6 лет назад

    Hi Tiziano,
    Very nice video!
    When I get to the part where I want to run my script, mission planner looses connection the the UDP. As soon as I close my script/command prompt window mission planner regains connection. Do you know why this could be? It is as if only one connection can be on 127.0.0.1:14551 at a time? I also tried with the mission planner build in your video (v. 1.3.49) but it is the same issue.

    • @prandtlmayer
      @prandtlmayer  6 лет назад

      Did you compile dronekit or you installed it with pip?

    • @rasmusg1407
      @rasmusg1407 6 лет назад

      Tiziano Fiorenzani initially I installed with pip, but there was some conflict in versions with mavproxy. So I downloaded it from GitHub and installed from there.

    • @prandtlmayer
      @prandtlmayer  6 лет назад

      You can have one connection per udp port per device.

  • @abdulbasitfakir7127
    @abdulbasitfakir7127 5 лет назад +1

    JUST FOLLOWED the procedure end up with this error " OSError :[Errorno 8] exec format error " while running this "dronekit-sitl copter" please help i am using ubuntu 16.04 lts
    thank you for the beautiful video

    • @prandtlmayer
      @prandtlmayer  5 лет назад

      The video is old. Dronekit--sitl is no more to be used. Check out my video about sitl in Mission Planner

    • @chenerlich6596
      @chenerlich6596 5 лет назад

      @@prandtlmayer Does is mean there is no Dronekit setup for PX4?

  • @dinesh1286
    @dinesh1286 6 лет назад

    This a great video, i could make SITL after following this video. I tried for copter and its working. But when i applied to the plane there is an oscillation in the yaw and roll angles continuously in the HUD panel. how to rectify this.

    • @prandtlmayer
      @prandtlmayer  6 лет назад

      Not an expert in plane SITL. Check the documentation here: ardupilot.org/dev/docs/sitl-simulator-software-in-the-loop.html#sitl-simulator-software-in-the-loop
      I will try and make a video on that

  • @oussalvatoreoussama2692
    @oussalvatoreoussama2692 6 лет назад

    Hi Tiziano, thank you for the amazing video, please I have a question, which parameters I need to change in order to increase the speed in this case ??

    • @prandtlmayer
      @prandtlmayer  6 лет назад +1

      Oussalvatore oussama vehicle.grounspeed sets the parameter WPNAV_SPEED

    • @oussalvatoreoussama2692
      @oussalvatoreoussama2692 6 лет назад

      thank you for your response Tiziano, inside the python script there is a gnd_speed parameter set to 8 m/s when I change the value of this parameter to 15 the trajectory is not circular anymore, is there any other parameter that need to be chnged ??

  • @robbieGftw
    @robbieGftw 4 года назад

    I'm a little confused with the mavproxy setup. Local host uses tcp port 5760, Mission Planner GCS uses tdp 14550. What is tdp port 14551 for? Thanks

    • @prandtlmayer
      @prandtlmayer  4 года назад +1

      They connect to whatever TCP or UDP port you want. The SITL by default outputs on localhost tcp 5760. From there you can use Mavproxy to proxy the connection wo any IP and UDP port you need

    • @robbieGftw
      @robbieGftw 4 года назад +1

      @@prandtlmayer Thanks a lot Tiziano!

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

    is there a feature to do this online

  • @donkrip
    @donkrip 6 лет назад

    Amazing!!!!

  • @Boss-pu9uc
    @Boss-pu9uc 6 лет назад

    Hi Tiziano! This video is amazing and the tutorial is really clear. I tried to replicate the simulation, but if I put the sleep up to 60 seconds instead of 30 (in order to cover more distance) the sitl vehicle get a FAILSAFE warning and set to RTL mode, returning to the home location. How can I solve this issue?
    I have tried to change the target altitude up to 60 meters, the time.sleep() or even different GPS coordinates. I have no GeoFence enabled and in the simulation the battery voltage is kept in a regular value. My settings is similar to yours:
    pymavlink 2.0.6
    mavproxy 1.6.1
    dronekit 2.9.1
    dronekit-sitl 3.2.0
    Copter 3.3
    running on VMware with Ubuntu 16.04 LTS (64 bit).
    Reading the dronekit/ardupilot documentations I found the failsafe error is linked to battery fails, geofence border violations or fail in the connection with the GCS, but actually it seems none of these happen.
    Thank you in advance and congratulations for all the great dronekit videos!

    • @prandtlmayer
      @prandtlmayer  6 лет назад

      Hi Luca, it might be related to the Vehicle not receiving any message from the Companion PC (that in fact is seen as a Ground Station) and this might trigger the RTL failsafe. On Mission Planner, in Initial Setup you should find the failsafe settings. Try and disable the GCS failsafe and let me know

    • @Boss-pu9uc
      @Boss-pu9uc 6 лет назад

      I think I fixed it: it was just the sleep time too high. Sleep times higher than 30 seconds provoke a timeout connection error, making the drone perceive it as a GCS fault error and setting it to RTL mode. Thank you, I admire you for all the hard and great work you are doing to make this concepts available for everyone.
      Good evening and best wishes, Luca

    • @Boss-pu9uc
      @Boss-pu9uc 6 лет назад

      Do you know how to run multiple SITL instances in order to simulate a swarm of drones? I know that with APMPlanner 2.0 it is possible to have multiple drones connected, but I don't know how to run multiple instances of dronekit-sitl; I guess I should run several of them by invoking different port numbers, but I have no idea how to do it..
      Thanks in advance

    • @prandtlmayer
      @prandtlmayer  6 лет назад

      Sorry, I don't

  • @fratmehmet71
    @fratmehmet71 4 года назад

    Hi. Can we add new waypoint code while drone is flying, does it make any problem? And another question can we do this on an airplane.

  • @khtan5531
    @khtan5531 5 лет назад

    Hi sir, for the condition_yaw() function, I observe that the drone yaws to the 'right' when given condition_yaw(45,1), but it does not respond when I enter a negative value for the angle argument. For example, it does not respond to condition_yaw(-45,1). How do I make the drone yaw to the 'left'? Thank you

    • @prandtlmayer
      @prandtlmayer  5 лет назад

      The argument is 0 to 360

    • @khtan5531
      @khtan5531 5 лет назад

      @@prandtlmayer sir, if i enter an argument greater than 180 degrees, for example, condition_yaw(315,1), how does the drone behave ? Does it yaw left to 45 degrees or does it yaw right 315 degrees? I could not find documentation on the dronekit commands that explain the yaw behavior. Appreciate it if you can help to enlighten. I am using the dronekit library in a computer vision-based object following application. Thank you.

    • @prandtlmayer
      @prandtlmayer  5 лет назад

      It goes toward the closest direction. But try that with the SITL and see it for yourself.

    • @khtan5531
      @khtan5531 5 лет назад

      Sir, thank you for enlightening, will give it a shot. Does the condition_yaw function take in only integer arguments or can it accept decimal places eg. 45.2567 degrees? Is there a precision limit ?

  • @nirbenbaruch5821
    @nirbenbaruch5821 6 лет назад

    Hey Tiziano,
    Thanks a lot for this helpful video!!
    is it possible to change/add WP during the drone is airborne/simulation is running ?
    I'm currently working on a project for autonomous flight - meaning during flight I want to use the air data + additional inputs in a python code which consistently generate new WP according to the inputs it receives.
    do you have any experience with that ? or any idea if it's possible ?
    I would appreciate any help :)
    thanks Nir

    • @prandtlmayer
      @prandtlmayer  6 лет назад

      Nir Ben Baruch you just gave me the right subject for the next video ;-)

    • @noahorosw
      @noahorosw 6 лет назад

      I'm lost . Are you running mission planner on windows ? Or do you actually have it installed on Ubuntu virtual machine ? If so ! How ? I'm trying to connect APM 2.8 to Raspberry Pi . then to Ubuntu ? Stuck At Raspi .

    • @noahorosw
      @noahorosw 6 лет назад

      Is there a way to install mission planner on Ubuntu 17.10 ? If so can you insert the link ?

    • @prandtlmayer
      @prandtlmayer  6 лет назад

      MP runs only on windows. You can use QgroundControl in Ubuntu if you want: docs.qgroundcontrol.com/en/getting_started/download_and_install.html.
      If you setup the VM as Bridged, it will have its own ip address, like it was running on a separate pc

    • @noahorosw
      @noahorosw 6 лет назад

      Tiziano Fiorenzani thanks for the help

  • @parusmajor1826
    @parusmajor1826 5 лет назад

    What about MacOs? for my dissertation I am trying to build a autonomous quadcopter but I don't know where to start

    • @prandtlmayer
      @prandtlmayer  5 лет назад

      Start from reading carefully all the Ardupilot wiki

  • @SuperSuperhugh
    @SuperSuperhugh 4 года назад

    Hi, is it possible to control the vehicle via python in Ubuntu system directly rather than the virtual machine. And I use QGC mostly. Thank you.

    • @prandtlmayer
      @prandtlmayer  4 года назад

      Check out the Ardupilot.org documentation: some has changed since the video. Plus I have another video where I show how to use the SITL in windows

  • @mustafa-gokce
    @mustafa-gokce 6 лет назад

    every connection with mavproxy.py to the board reboots the board.
    if connection is lost restarting the mavproxy reboots the board and it is a disaster in midair.
    is there a way to start the mavproxy.py without rebooting the apm board?
    thanks.

    • @prandtlmayer
      @prandtlmayer  6 лет назад

      there is a parameter on the autopilot that resets the board when you connect it to the USB. Don't remember the name though

  • @SHASHANKDAMMALAPATI
    @SHASHANKDAMMALAPATI 5 лет назад +1

    Can we code for each motor separately using drone kit?

  • @luigiluft4920
    @luigiluft4920 5 лет назад

    Hi
    Tiziano Fiorenzani,
    There is any way to program a drone that could fly about half mile without GPS signal? For example, pre-set direction to the drone, then just ask him to do the pre-setted directions.

    • @prandtlmayer
      @prandtlmayer  5 лет назад

      With no GPS your position estimate degrades pretty quickly. You can set it in guided no gps and command attitude values. But why?

    • @luigiluft4920
      @luigiluft4920 5 лет назад

      Tiziano Fiorenzani to fly a drone autonomously in a warehouse

    • @ankurkamboj4854
      @ankurkamboj4854 5 лет назад

      @@luigiluft4920 in warehouse , you would need real time 3D map of obstacles to avoid it . So it seems tech called SLAM could work.

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

    hi how do you setup the virtual machine? I have installed an ubuntu dekstop on my VM but i am unsure how i can connect it to my raspberry pi and pixhawk to run the codes

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

      Explained better here
      ruclips.net/video/cZVNndOaYCE/видео.html&ab_channel=TizianoFiorenzani

  • @user-or8qn5kq5t
    @user-or8qn5kq5t 5 лет назад

    Thanks Sir! Tiziano! I have some problems with mavproxy.py --master ......... when I typed it in the new tab, then I have "no link" message repeatedly. could you please help with this?

    • @prandtlmayer
      @prandtlmayer  5 лет назад

      Be sure you can actually connect with the device. Do you use a virtual machine? Check the IP address and ping it

  • @jiayeeten3114
    @jiayeeten3114 4 года назад

    Hello Tiziano, I have successfully built my SITL with your video. However, I faced some problem when specifying the waypoints radius. Can you help me with that by editing the simple_goto examples?

    • @prandtlmayer
      @prandtlmayer  4 года назад

      If I am not mistaken, the radius is just a parameter

    • @jiayeeten3114
      @jiayeeten3114 4 года назад

      @@prandtlmayer Yes, but my mission is to set the waypoint radius, but I'm not sure how to edit the source code. May you help me with that?

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

    hello can you tell us what version of dronekit do you use?

  • @Meowoofbark
    @Meowoofbark 6 лет назад

    A major issue I had when trying to get Mavproxy and any other .py file wouldn't accept any commands such as --udp___. I believe this is a registry error from installing multiple python versions. To fix this simply insert python before your command, "python mavproxy --master..."

  • @BDRCkid
    @BDRCkid 5 лет назад

    Great video Tiziano, I am getting a time out error when running mavproxy t o connect to the Sitl.
    I am using a VM and when typing if config the local ip is the 127.0.0.1
    On the terminal running the drone kit that dose display bind port 5760 before I get the time out error in the mavproxy terminal.
    Any ideas would be greatly appreciated!

    • @prandtlmayer
      @prandtlmayer  5 лет назад +1

      that is because you didn't set the connection in bridged mode

    • @BDRCkid
      @BDRCkid 5 лет назад

      Interesting, I got it working on another computer running a VB VM. This computer that is working has it network set to NAT not Bridged. I tried switching to bridge adapter this did not work.
      Thanks for the response

    • @BDRCkid
      @BDRCkid 5 лет назад +1

      PROBLEM SOLVED!
      Network type is set to NAT
      I needed to run this command:
      sudo pip install --upgrade pymavlink MAVProxy

    • @prandtlmayer
      @prandtlmayer  5 лет назад

      I'm glad

  • @kaanceylan83
    @kaanceylan83 5 лет назад

    Hi Tiziano! I need some help with my connection,I can't connect via UDP on mission planner.
    I'm using 16.04 ubuntu and mavproxy version 1.6.2. I tried Virtual machine at Nat and Bridged mode(on VM) but ı can not to connection

    • @prandtlmayer
      @prandtlmayer  5 лет назад

      That is weird. When in bridge mode is like having a second computer. Do you need to run a custom version or can you use the master?

    • @kaanceylan83
      @kaanceylan83 5 лет назад

      @@prandtlmayerFirst, thanks for comment , I solved the problem. I found a solution with double boot, but I get a different error in dronekit-sitl. When I change home position, it's giving a barometer error

  • @shakthiprashanth5730
    @shakthiprashanth5730 5 лет назад

    Thanks Tiziano for the video. Do you also have a tutor for ardupilot firmware ?

  • @darpantrivedi3242
    @darpantrivedi3242 4 года назад

    i have face this issue do have any idea :
    dronekit.APIException: Timeout in initializing connection.

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

      I need more details, like what you tried to connect with what else?

  • @mustafa-gokce
    @mustafa-gokce 6 лет назад

    can i specify the tcp port when initializing the sitl? i want to simulate 2 copter in a computer

    • @prandtlmayer
      @prandtlmayer  6 лет назад

      Mustafa Gökçe that is a tricky question and I don't know the answer. If you find out, post it here

  • @dronzut6823
    @dronzut6823 5 лет назад

    Hi, i did just like you but my MissionPlaner didin't connect . Any solution ?

    • @prandtlmayer
      @prandtlmayer  5 лет назад

      Have you set the connection to bridge mode?
      Check also this alternative method: ruclips.net/video/o6o5IcTAwgM/видео.html

  • @saran-ravi
    @saran-ravi 5 лет назад

    can you please explain why do we need to change the network connection as bridged?

    • @prandtlmayer
      @prandtlmayer  5 лет назад

      Just to have a separate IP address

  • @aviocavioc1280
    @aviocavioc1280 6 лет назад

    When i run DRONEKIT-SITL COPTER 3.3 it gives ERROR . I am using raspian strech os in raspberry. And laptop with windows 8. Plzz suggest me some way to solve it

  • @qamishah621
    @qamishah621 5 лет назад

    Hi! i have entered the position in dronekit-sitl, i am getting permission error : [Error 13] permission denied:'c:\\\users\\qamber\\.dronekit\\sitl\\copter-3.3\\.\\apm.exe'
    please what should i do ?
    thanks in advance

    • @prandtlmayer
      @prandtlmayer  5 лет назад

      Never seen that. Follow other videos or mine about sitl

  • @hatemmahmoudi3880
    @hatemmahmoudi3880 4 года назад

    hello sir , thanks a lot for the great tutorial , i followed the procedure and when i run the script of control dronekit doesn't connect to APM and i get this error "WARNING:dronekit:Link timeout, no heartbeat in last 5 seconds" then error

  • @mathaussilva7252
    @mathaussilva7252 6 лет назад

    Hi Tiziano,
    I'm having a problema here. My python script connects, starts to ARMING MOTORS but after a few seconds It DISARMING MOTORS. Do you know something about this problem?
    thank you very much and congratulations for your channel!

    • @prandtlmayer
      @prandtlmayer  6 лет назад

      It disarms because it does not receive a takeoff message, so the firmware goes in timeout and disarms the motor. Be sure the system is actually in GUIDED mode

    • @iamprudhvigattu
      @iamprudhvigattu 8 месяцев назад

      Bro did you fix the issue because I'm also getting the same error. Can you please help me? It's urgent ASAP

    • @mathaussilva7252
      @mathaussilva7252 8 месяцев назад

      @@iamprudhvigattu There is a lot of time, but I think the @prandtlmayer answer helped me:

    • @iamprudhvigattu
      @iamprudhvigattu 8 месяцев назад

      @@mathaussilva7252 how to fix it sir

  • @bryankoh3836
    @bryankoh3836 5 лет назад

    Can the script you just wrote run on a Raspi companion pc with pixhawk as the flight controller?

    • @prandtlmayer
      @prandtlmayer  5 лет назад

      ... that is exactly what the whole purpose of a companion PC

  • @ashvnikumar4292
    @ashvnikumar4292 5 лет назад

    hey
    whenever i am trying to connect mission planner using port 14550 it does not succeed and mavproxy terminal show "TypeError: string argument without an encoding" error. While mission planner show no heartbeat recieved

    • @prandtlmayer
      @prandtlmayer  5 лет назад

      Be sure you follow the video. Check my other videos out and the course I promote too

    • @ashvnikumar4292
      @ashvnikumar4292 5 лет назад

      I followed video exactly and copied down same command several times in mavproxy but still I am getting same error.

    • @ashvnikumar4292
      @ashvnikumar4292 5 лет назад

      Do I need a flying board now because I am just learning program now I had not built any drone yet and neither I have pixhawk.

    • @prandtlmayer
      @prandtlmayer  5 лет назад

      You can stick to the SITL as long as you want. You need a flying board only the if you fly. Anyway, you can always run your dronekit on the ground and connect through the datalink. It's ok for low rate commands

    • @prandtlmayer
      @prandtlmayer  5 лет назад

      If you are using Windows, this might help ruclips.net/video/o6o5IcTAwgM/видео.html

  • @ady7d77
    @ady7d77 4 года назад

    which is better to for drones ardupilot or ros?

    • @prandtlmayer
      @prandtlmayer  4 года назад

      They are two completely different things. Ardupilot is one family of open source firmwares for the autopilot. ROS is a Linux development environment that simplifies the integration of yours and third party code for robotics

  • @frajomethippara9952
    @frajomethippara9952 5 лет назад

    Hi Tiziano Fiorenzani! Thankyou for your videos .I would like to know how to do the same in raspbian using pi.

    • @prandtlmayer
      @prandtlmayer  5 лет назад

      Exactly in the same way. Using dronekit

    • @prandtlmayer
      @prandtlmayer  5 лет назад

      You connect to the telemetry port 2 using the uart

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

    hi sir, can we display the target point when running python code ?

  • @captainbad286
    @captainbad286 4 года назад

    I am tired of going through the dronekit seems to have so much problem to connect i am tired of installing in ubuntu 18. I only get ARM in my terminal but no reaction on the Missionplanner

    • @prandtlmayer
      @prandtlmayer  4 года назад

      I am sorry about that, you can use other libraries: MavROS for example, if you are more familiar with ROS

    • @captainbad286
      @captainbad286 4 года назад +1

      @@prandtlmayerWhat i did in the installation of the packages is that
      First:
      Download the dronekit and dronekit sitl version as per the drone dojo in youtube, because the latest version has the problem. And must be first to be downloaded as we download in the later stage then the Mavproxy would have problem.
      Second:
      And then follow the intelligent quads github page and download till 4 and also mission planner.
      github.com/Intelligent-Quads/iq_tutorials
      Third:
      Download the droneAPI for python.
      github.com/JamesHarrison/droneapi-python/blob/master/example/documentation/install.md
      It worked like this..I had to uninstall ubuntu and re-install each time i made error. Finally this was the only solution i could find.
      After this i got tried the simple way to go script and it worked ..
      A small contribution from my side for your viewers..

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

      @@captainbad286 could u make a video tutorial please? im really fucked i based my grad project on dronekit and i cant get it to work.. lmao i thought ill be busy writing code but im stuck on the motors disarming error when running the script. fml

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

      @@yahya9889 hey man i just saw your message did you solve it or not.

  • @yazeedarief8670
    @yazeedarief8670 5 лет назад

    Hi Tiziano!! May I know your python and pip version you installed?

  • @lestergetubig9161
    @lestergetubig9161 5 лет назад

    What are the list of drones that can be controlled by this

  • @karthickeyanmanivannan9912
    @karthickeyanmanivannan9912 4 года назад

    Hi Tiziano ! 2.27 I have an error saying Sudo:pip: command not found

  • @pirunthankeerthinathan4286
    @pirunthankeerthinathan4286 5 лет назад

    Sir,can u make a video to send custom sensor messages from rpi to mission planner through pixhawk? that will be very helpful

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

    which ubuntu vc use?

  • @isrg7221
    @isrg7221 4 года назад

    Can you do a tutorial for using DroneKit and SITL on a fixed wing

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

    have problem at dronekit_sitl and version of python?

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

      did you still have a problem in dronekit-sitl?

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

    please mention what components used in drone construction

  • @tankaichuen1258
    @tankaichuen1258 4 года назад

    Why shouldn't use sudo?

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

      It's never a good idea to abuse of the super user environment. You might end up installing packages that work only for it