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
In 8 minutes from install to functional. THANK YOU for this amazing tutorial that gets to the point very quickly.
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!
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.
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.
Great Caleb, find me on Linkedin
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
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.
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)
Thank you Tiziano, this is awesome and your tutorials have helped me a lot at University
Check out all my other videos! And the one is coming this week (hopefully)
OMG thank you!!!!!!!! im so glad I found this it was so straitforward and to the point you saved my life THANKS
were you able to use dronekit ? because iam getting some mutable mapping error in python 3.10.
well i cant believe why this amazing channel has soo less subs and views do all youtube users just watch shit instead learning something
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?
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.
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
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)
Insightful, But I think, You need to specify groundspeed in the simple_goto function to move the drone
WOW!! you made my life so easy
I am glad I did. Keep following and spread the news
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
yes that was the problem... i forgot to change the network adapter to bridged. Thanks
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!
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?
same here im stuck on the same fucking problem lmao pls let me know if u find a solution
Have you tried using the SIL from mission planner?
@@prandtlmayer That's what I ended up using
@@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!!
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?
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!
Great! Educational. Thanks for sharing.
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!
Sir are you connect hardware when you are Programming drone or doing simulation
"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
In Windows do not write the .py, just call mavproxy
@@prandtlmayer This opinion is very useful. Thank you!
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
brother all is work but "vehicle.mode= VehicleMode()""
-mode not work return same mode! what cai I do??
i don't open mission planner , but i make follow every step , i use window and install mavproxy
dronekit dronekit-sitl complete.
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.
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
What do you mean, I'm afraid I don't understand
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"
I'm seeing the same thing, it arms then immediately disarms. Did you figure it out by any chance?
@@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
Hi could any one figure out the reason for the error and the way out ?
@@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...
@@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.
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>
Read the first line. You should uninstall modem manager
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
Bro, I got an error while executing this code
Showing error: autopilot:ARMING MOTORS
Bro did you resolve the problem? I'm also getting the same error I need to fix it. It's urgent
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?
That is really weird. Try to uninstall mavproxy and install it again
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?
Thank you!
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
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.
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
@@prandtlmayer okay thanks for your reply
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
Sure, I have used the zero too. Much slower, need to check your CPU load
Thanks for the nice video. Just curious to know what all tools did you use for this video? Many thanks.
samacumen VSDC
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
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)
What is this window? I have been using the last version, no problem. Follow my last video on sitl and mission planner
It is the window that appears when the "connect" button is clicked. I will, thanks for answer
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.
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)
waw succes very easy , thanks ,
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
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!!
Drone kit it's just a wrapper for mavlink so you should be ok using it
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.
You cannot run SITL on the raspberry
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
For navio you can also ask them, they usually are very supportive. Another good place is the Ardupilot forum
+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?
Are you sure you put the right ip address?
Just to be sure :Which ip am I supposed to give? The ip of VM or the machine with the Mission Planner?
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
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
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.
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
You probably installed it to a different python.
@@Chr0nalis whats version he must download it on ?
and how be sure?
Are we losing any dronekit functionality/functions by using python e.g. 3.9 instead of 2.7?
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
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 ?
In Windows you run mavproxy without the .py
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?
Almost, will make a video about it soon. I'll keep you posted
@@prandtlmayer hi is there any update on that step by step guide ? I am eagerly waiting.
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?
Is your VM connection in bridged mode?
@@prandtlmayer yes
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?
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)
Is it possible to give the drone updated waypoints mid-flight with this method?
also interested here!
Absolutely yes. You can also set the drone in GUIDED mode and command single points without going into MISSION mode
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....
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
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!
Did you set the connection in bridged mode?
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.
Did you compile dronekit or you installed it with pip?
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.
You can have one connection per udp port per device.
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
The video is old. Dronekit--sitl is no more to be used. Check out my video about sitl in Mission Planner
@@prandtlmayer Does is mean there is no Dronekit setup for PX4?
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.
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
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 ??
Oussalvatore oussama vehicle.grounspeed sets the parameter WPNAV_SPEED
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 ??
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
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
@@prandtlmayer Thanks a lot Tiziano!
is there a feature to do this online
Amazing!!!!
Thanks, keep looking for more
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!
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
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
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
Sorry, I don't
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.
Yes, no and yes
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
The argument is 0 to 360
@@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.
It goes toward the closest direction. But try that with the SITL and see it for yourself.
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 ?
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
Nir Ben Baruch you just gave me the right subject for the next video ;-)
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 .
Is there a way to install mission planner on Ubuntu 17.10 ? If so can you insert the link ?
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
Tiziano Fiorenzani thanks for the help
What about MacOs? for my dissertation I am trying to build a autonomous quadcopter but I don't know where to start
Start from reading carefully all the Ardupilot wiki
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.
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
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.
there is a parameter on the autopilot that resets the board when you connect it to the USB. Don't remember the name though
Can we code for each motor separately using drone kit?
Why would you do that?
@@prandtlmayer Make the drone do a backflip or something.
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.
With no GPS your position estimate degrades pretty quickly. You can set it in guided no gps and command attitude values. But why?
Tiziano Fiorenzani to fly a drone autonomously in a warehouse
@@luigiluft4920 in warehouse , you would need real time 3D map of obstacles to avoid it . So it seems tech called SLAM could work.
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
Explained better here
ruclips.net/video/cZVNndOaYCE/видео.html&ab_channel=TizianoFiorenzani
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?
Be sure you can actually connect with the device. Do you use a virtual machine? Check the IP address and ping it
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?
If I am not mistaken, the radius is just a parameter
@@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?
hello can you tell us what version of dronekit do you use?
Always the latest
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..."
thanks for your hint
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!
that is because you didn't set the connection in bridged mode
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
PROBLEM SOLVED!
Network type is set to NAT
I needed to run this command:
sudo pip install --upgrade pymavlink MAVProxy
I'm glad
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
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?
@@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
Thanks Tiziano for the video. Do you also have a tutor for ardupilot firmware ?
No, sorry
i have face this issue do have any idea :
dronekit.APIException: Timeout in initializing connection.
I need more details, like what you tried to connect with what else?
can i specify the tcp port when initializing the sitl? i want to simulate 2 copter in a computer
Mustafa Gökçe that is a tricky question and I don't know the answer. If you find out, post it here
Hi, i did just like you but my MissionPlaner didin't connect . Any solution ?
Have you set the connection to bridge mode?
Check also this alternative method: ruclips.net/video/o6o5IcTAwgM/видео.html
can you please explain why do we need to change the network connection as bridged?
Just to have a separate IP address
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
SITL does not run on raspberry
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
Never seen that. Follow other videos or mine about sitl
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
Build dronekit from source
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!
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
Bro did you fix the issue because I'm also getting the same error. Can you please help me? It's urgent ASAP
@@iamprudhvigattu There is a lot of time, but I think the @prandtlmayer answer helped me:
@@mathaussilva7252 how to fix it sir
Can the script you just wrote run on a Raspi companion pc with pixhawk as the flight controller?
... that is exactly what the whole purpose of a companion PC
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
Be sure you follow the video. Check my other videos out and the course I promote too
I followed video exactly and copied down same command several times in mavproxy but still I am getting same error.
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.
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
If you are using Windows, this might help ruclips.net/video/o6o5IcTAwgM/видео.html
which is better to for drones ardupilot or ros?
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
Hi Tiziano Fiorenzani! Thankyou for your videos .I would like to know how to do the same in raspbian using pi.
Exactly in the same way. Using dronekit
You connect to the telemetry port 2 using the uart
hi sir, can we display the target point when running python code ?
yes
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
I am sorry about that, you can use other libraries: MavROS for example, if you are more familiar with ROS
@@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..
@@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
@@yahya9889 hey man i just saw your message did you solve it or not.
Hi Tiziano!! May I know your python and pip version you installed?
Python 2.7 and latest pip
@@prandtlmayer thank you..
What are the list of drones that can be controlled by this
Check on Ardupilot website
Hi Tiziano ! 2.27 I have an error saying Sudo:pip: command not found
Just install pip
Sir,can u make a video to send custom sensor messages from rpi to mission planner through pixhawk? that will be very helpful
I have never tried that
which ubuntu vc use?
Any
Can you do a tutorial for using DroneKit and SITL on a fixed wing
I already did
have problem at dronekit_sitl and version of python?
did you still have a problem in dronekit-sitl?
please mention what components used in drone construction
It is all simulated
Why shouldn't use sudo?
It's never a good idea to abuse of the super user environment. You might end up installing packages that work only for it