ArduPilot, Dronekit-SITL, and Mission Planner Drone Simulation Installation and Introduction

Поделиться
HTML-код
  • Опубликовано: 12 дек 2024

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

  • @sagarsajeev4768
    @sagarsajeev4768 4 года назад +4

    * If you’re using the DroneKit-SITL Python API then you will instead have to connect to SITLs TCP port. So if DroneKit is connecting to TCP port 5760, you would connect your GCS to 5763 * Essentially, this way can also be done rather connecting to UDP ports, we can utilise the MavLink for sending messages through Script to reflect on Mission Planner - which can be connected to port 5763

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

      I know it's been 3 years, but can you explain this to me? I'm tryna do something similar for my thesis

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

    Thank you for the video. I am having the same problem on disarming itself after a few second of arming and couldn't takeoff. I will try your method to solve it to check whether it works.

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

      this is because of the cmd nav failure

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

      so it works after you tried his way ?

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

    You saved my day sir, thanks a lot. One thing that I encounter was that I had to change to Guided mode manually :)

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

      did you solve that?

    • @PappuYadav-tn7lu
      @PappuYadav-tn7lu 3 года назад

      @@XPowerfullXPlayerX All you have to do is on Mission Planner's "Action" tab, choose Set Mode = Guided. And then run your simple_goto.py script.

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

      It is solved by downgrading pymavlink to 2.4.8

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

      Yes, the more I hear about this software the more it’s stuck in time using older versions.

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

      Even if I manually changed the action to guided mode, still it didn't work for me.

  • @dtfhgggynhvh8761
    @dtfhgggynhvh8761 4 дня назад

    I am having the same problem on disarming itself after a few second of arming and couldn't takeoff.

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

    Hello. Does anyone know why can't i change the flight mode manually in the mavproxy terminal or via python code? It only works if I do it in the "Actions" tab in mission planner

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

    Hi
    Need some help
    I have been trying to connect to SITL
    the connection gets established
    but as soon as is try to arm the vehicle with
    vehicle.armed = True
    command
    Error : autopilot ARMING MOTOTS
    CRITICAL: Ground Start
    CRITICAL : Initializing APM
    Error : autopilot DISARMING MOTORS
    am not able to figure out the reason

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

      I have the same issue

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

      @@thianesh9097 I found the problem. The VehicleMode("GUIDED") from the script is not working. Therefore, I changed the mode manually in Mission Planner to takeoff, and it works with the script after changing the mode. However, I still cannot change to other modes like GUIDED, LAND, AUTO, RTL, and STABILIZE with my python script.

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

      @@tankaichuen1258 Thank you for your reply. The script worked after changing it to guided mode using Mission Planner but, as you said the script was unable to change the mode on its own

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

      @@tankaichuen1258 Were is this setting in Mission planner? Cannot find "GUIDED mode'? New to Dronekit/MissionPlanner.
      Edit: After looking further I found "Flight Modes" I have no 'takeoff' mode? I am using a compiled version of APM Planner 2.x Linux. I do have guided mode. In the terminal repeats 'Waiting for the drone to enter GUIDED mode' I do have guided mode selected. Thank You

    • @PankajMali
      @PankajMali 4 года назад +4

      Actually the problem is mavlink , i dont know what i can call it as a bug or something but the latest version of mavlink has that error, so what i did was like reverting back installed freshly
      pip install pymavlink==2.4.8
      n it works now ,
      in your case the error is due to navigation command failure so you can revert back to previous version...hope it helps you.

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

    what are the backup checks you have put in the simple_goto file because I'm getting this Error - ERROR:autopilot:DISARMING MOTORS. If possible can share share the updated file/link to the file. This worked for me - Set your vehicle mode to STABILIZE (or any other armable mode).
    Run your python script.
    Immediately change your vehicle mode manually to GUIDED.
    Your vehicle should perform your script commands if correct.

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

    I wanna know how did you do for launching the windows acedwards please...

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

    i have no connection btw mission planner and SITL
    PLS HELP ME

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

    Thank you. copter simulation is successful. But, I have problem with SITL plane (after second terminal commands there is no response, its not connecting to MP & MAVproxy: no link). can you please help me.

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

      If you have trouble connecting to the MAVproxy usually there is something wrong with the port you're trying to use as the "fake" drone. All in all I haven't touched the system in years, but I do remember it has always been super buggy. If you forget about best coding practices and just mess with it until it works, that's what I've found to be the best solution.

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

    hello, after writing a dronekit code and sending it to the drone, I run the code, everything is ok, but while the drone is going to the next waypoint, the altitude is not stable. I am using the simple_go function, and I mentioned the altitude. what could be the problem causing this variation of altitude.

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

      It's about the pitch movement of drone. When drone wants to go somewhere it's altitude has to be decrease because it has to bend it's nose forward.

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

    how to update baud rate in simple_go file

  • @Vaishnavi-w4i
    @Vaishnavi-w4i Год назад

    where is the link for the code

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

    mode_mapping = self.master.mode_mapping()
    AttributeError: 'NoneType' object has no attribute 'mode_mapping'
    Can someone help me out?

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

    pip doesnt work anymore? this is frustrating im trying pip3 but its not working either

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

      It really doesn't work. What a pitty.

    • @PappuYadav-tn7lu
      @PappuYadav-tn7lu 3 года назад

      My recommendation would be to install Anaconda and open terminal from an environment in Navigator. From there everything like pip should work.

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

    will it work it with python 3.....but it was given in the dronekit website that... it does not support python 3

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

      yes it wont

    • @charithdilshan7791
      @charithdilshan7791 3 года назад +3

      It will work. The web site is not updated, but it actually works.

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

      @@charithdilshan7791 yes it works but you need to very carefully work with that while choosing packages which works in both py2 and py3

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

      @@PankajMali agree

    • @PappuYadav-tn7lu
      @PappuYadav-tn7lu 3 года назад +3

      It does work for me at least including Python 3.8

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

    Andrew I followed your tutorial but when I check my dronekit import libraries in my windows terminal, i get error like:
    PS C:\Users\cecil> python
    Python 3.10.1 (tags/v3.10.1:2cd268a, Dec 6 2021, 19:10:37) [MSC v.1929 64 bit (AMD64)] on win32
    Type "help", "copyright", "credits" or "license" for more information.
    >>> import dronekit
    Traceback (most recent call last):
    File "", line 1, in
    File "C:\Users\cecil\AppData\Local\Programs\Python\Python310\lib\site-packages\dronekit\__init__.py", line 2689, in
    class Parameters(collections.MutableMapping, HasObservers):
    AttributeError: module 'collections' has no attribute 'MutableMapping'
    What shall I do? My Windows has python3.10.1 installed. Can you help please. Thank you.

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

      Might just be that package has an issue, I would search google and see if there’s another dependency you might need.

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

      The longer response would be, I haven’t touched this module for like a year, but what it seems like is a dependency problem because of an old python version. I think I’m using python 3.7 in the video. But regardless, make sure the distinction is made between mavproxy and ardupilot. The script you write to tell the drone where to go is in python 3, but the OG mavproxy software is in python 2. If it wouldn’t disturb your other projects I would suggest maybe creating a dev environment and trying the python 3.7 version on windows and go through the package install part of the video again. The only way I got this software to work at all was using the setup I had in the video.

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

      Luckily, it worked when I uninstall python3.10.1 then reinstall python3.9 -import dronekit is fine.
      But then went into another problem when I pull a 2nd terminal and call > dronekit-sitl copter --home=53.280707,-9.031534,0,180
      Below is result:
      PS C:\Users\cecil> dronekit-sitl copter --home=53.280707,-9.031534,0,180
      dronekit-sitl : The term 'dronekit-sitl' is not recognized as the name of a cmdlet, function, script file, or operable
      program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
      At line:1 char:1
      + dronekit-sitl copter --home=53.280707,-9.031534,0,180
      + ~~~~~~~~~~~~~
      + CategoryInfo : ObjectNotFound: (dronekit-sitl:String) [], CommandNotFoundException
      + FullyQualifiedErrorId : CommandNotFoundException
      How come that unrecognised..? I install all that dependencies for dronekit in the powershell cmd terminal. Can u suggest another tip pls..
      My PC running in windows10 with ubuntu20.04 on the side app.

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

      Make sure you added python 3.9 to your PATH in windows. That maybe why the command isn’t recognized

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

    Excellent video.
    Do you have any email?
    I need your help.

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

      If you post your problem here you’re going to be able to get help from people who are using the software more readily. I haven’t touched this since I put the video up

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

    I followed your instructions exactly but for some reason I can't solve this problem
    drive.google.com/file/d/1J-pmjvXiEdpmUn4vEZ-PWpiyu45IKOgv/view?usp=sharing
    Do you have any idea what the problem is?