Very cool drone brother! I tried following along, but I am getting unusual behavior when hovering and was wondering if you could help me. I used your code to takeoff, but once I get the "altitude reached" message, the drone does not stay still at the desired altitude. Instead, it oscillates up and down, like its in water, and never hovers in place, like yours does, until the mode is switched to LAND mode. So if I try to hover at 2 meters, it will get to 2 * 0.95, then it will bob up to 3, then down to 1, then back up to 3, then back down to 1, and neither of those is 2 * 0.95. I have the break statement when altitude is reached, so I am not sure what is happeneing. I also did several autotune. Have you ever experienced this?
Hello, In order to debug this issue, i request you to take off using RC and put the drone in Loiter mode and just observe . If you find similar behaviour then its because of the faculty measurement. I have this same issue 7 years back with chinese cloned pixhawk 2.4.8, i replace the autopilot and it was all good. When ever i was gaining or loosing altutude it used to do up and down with some jerks.
@@PankajMali Oh really, interesting... I also have the 2.4.8 chinese clone. However, I think my issue might be different because I just tried a flight and put it in loiter to reproduce the bug, like you said, but it did not reproduce the bug. When I enabled loiter from my RC controller, it hovered very still, with no dipping up and down. Its a very strange bug, and now I am thinking that it might have something to do with the dronekit code and my copter version. I am running Copter version 4.3.7, so I am wondering if something behind the scenes has changed from the older versions. Do you remember what Copter version you were using in the mission from the video? If thats the case, then I might have to code up a PID controller or something because the dipping up and down oscillations are very symmetric. If I set the desired height to 2, then it oscillates between 1 and 3. After checking the dataflash log, I see a dampinging happening aswell so that the wave goes 3 to 1, then 2.7 to 1.3, then 2.5 to 1.5, and stays there such that the drone keeps dipping up and down. I will also try to go up higher, like 15 meters, and try to hover for a longer duration, like you do. Wish me luck as I try to take a deep dive into debugging territory lol.
brother, drone kit work with python 2.7 but other version mode set not work! and i am try and tired! i can't install dronekit 2.9.0 in python 3 or 4 also in windows mavproxy can't change mode return the same mode!
Hi, Use python version 3.6. And if you already have anyother pythin 3 eg. Pythin 3.8/3.11 then set python 3.6 on default and then install all the pythin packages using pip3 install . It will workk
For autonomous drone, can we use apm 2.8 satisfactorily? As of now I am unable to get pixhawk in market and have no other option but to go with apm. Kindly help.
Yes you can go with apm...it is no longer supported by the community but still you can build your project with some limitations as compared to pixhawk. Check robu.in for pixhawk
Helle. Good work. I write some dronekit, connect pixhawk from laptop using by telemetry but it does take off. What ı must do from transmitter? Can you help me?
Hello, Transmitter is just for safety/ like a backup controller ...only thing you need to when you want to use transmitter before changing mode from transmitter just keep your throttle stick to mid positio and then change mode to take manual control .
@@PankajMali Thank you! Basically... (Im from Brazil, so sorry for any english mistakes) Im building the parts to build a drone with raspberry pi and pixhawk. My main doubt is: As i can see, i can just choose some waypoints and flight autonoumously using mission planner, but its possible to stream the video while drone is flying? I mean... There is a raspberry and a camera on the drone, do you know a good way to watch the camera recording on real time through internet? Or only using something like VNC/team viewer?
can you please tell the delay thing, I mean the first method at 6:28 . and also what switch has to be toggled ? to take manual control , I mean what actually is that switch ??
Hello, In this video i have executed the code from laptop using ssh . Anothet way is to add your python code to the shell script so that it will start the code as soon as drone is powered and gor safety purpose you can add some 1 min delay so that you can stand away from drone once powered on. You will be having a flight mode switch on your transmitter which has user defined modes like stabilize, loiter , rtl, alt hold etc ...so whenever you execute your code and want to take manul then just an interrupt has to be generated from your transmitter, so its like you just toggle your mode switch irrespective of its initial position...just toggle it and take manual control and dont forget to keep throttle at 50 percent. Good luck
Sir, I want to do only flight planning.. i.e. making waypoints using python then it will export a KML. I will put that waypoint KML in a software and drone will fly. How to do flight plan using python, where I will input area KML, wind direction, overlap and it will make waypoint
Hello ankit , In order to create waypoint from a kml . You need to use pykml package 1) from pykml import parser 2) root =parser.fromstring(open('BatchGeo.kml', 'r').read()) 3) print root.Document.Placemark.Point.coordinates So basically above steps will read a kml file and print the coordinates. As per your requirements you can fetch the coordinates one by one to a python array and then access them as waypoints .
I got a question. Does the vehicle.armed = True works only if the drone is in Guided mode? I tried arming it in stabilize mode but I always get the error of throttle too high
@@PankajMali Last question about the algorithm vehicle.is_armable. Is the GPS lock one of the parameters needed to be set for the vehicle.is_armable to return a True value?
when you send the script the remote in witch mode should be because i put it in the stabilize mode after thet i send the code after few sec the drone armed but dont go up stay on the ground so what i should choose the mode frome remote wile fliying it from the script an help please???????????????
Good question Mohamed When you run a python script you can keep your transmitter in any mode like stabilize or loiter it doesnt matter. I mainly have it in stabilize mode so that when ever i want to get manual control i flip the switch to loiter and the copter is steady. Main thing to remember is you dont change the mode from transmitter once you run the script as it will generate a interrupt and tell the system to get manual access and it wont takeoff. Once it takes off just keep the throttle to 50 percent in case required to take manual control, before takeoff dont move any switch on transmitter.
Yes this script can be tested with no gps guided mode but not recommended unless and until your are specific about the sensors or the approach that you take to build your system like ..... you can use px4 flow sensor as an alternate to gps for position hold and you can use vision based navigation stack like any cameras along with visual markers or can go with lidar based approach .
Is it possible to connect to the onboard Rasberry pi with rfd 900 telemetry or herelink telemetry? If so, can you make a video on how to set it up ? The short WiFi range for Rasberry pi communication is a big limitation and 4g is unreliable where I live. Thanks
since your ssh depends on wifi connection, what happens if one of the devices gets disconnected e.g. if drone goes to such a height or distance away and loses connections. WIll the running script not terminate?
Hello deep blue sea, You are correct, the aircraft keeps on doing its task according to the script . Ssh is just a medium to access the rpi just to trigger the script.
Hello, I got another question. Whenever I try to run the script, I always get this error of "Arm:Throttle(RC3) is not neutral" around the part of vehicle.armed = True. I only got it to pass when I put one joystick at the bottom (which is seen in your video around 8:30). Is it really required to have the joystick at the lowest value before it can pass the arming? Or is there any other way to get past this?
Hi , If the throttle is not at the lower position or zero the pre arm check will generate a error ....this is for safety . If you run the script and then simultaneously you move thr throttle upward then manual interrupt is generated and the code execution stops. Yes it is reaply required to have the throttle stick at thr lowest value before arming
Hi iheb, Let me know about your setup, doe your drone starts the mission automatically once it i powered ? Or you manually run the code from your laptop ?
Brother I am tired to run dronekit-sitl similator ! It installed and downloaded model bur running time not work what can I do?? Please make a video or if u have solution please help me to do this..
This happens when there's no connection between rpi and pixhawk. 1. Check the tx rx pins , might be revered. 2. Check for setting on rpi 3.check baudrate which is assigned to telemetry ports the one which you are using with mission planner. 57600/ 921600
can you show us how to run any Python script on RPi and see the simulation on mission planner ? A small video this would be very helpful, thank you in advance
I have built a drone with APM 2.8 flight controller and rpi, and I'm trying to do same as you have done using pixhawk flight controller, but at the end I am not able to rotate the motor. I just want to make it laptop operated and don't want to fly it with rc.
This error occurs because of the connection string, just check in the mission planner > full parameter list > serial_baud ... this baud rate should be as you are passing in the connection string in your python script , like in my case im having 921600
@@PankajMali I solved this error but last me "prearm calibrate rc" aa raha he Is it compulsory to calibrate rc if we want to fly with only rpi and APM 2.8.
Yes its mandatory to do the pre arm checks, and if you only want to send commands via your laptop then you need to go with robot operating system which is the easiest way to do that
@@PankajMali yes actually my motive is to fly drone only with laptop not by rc. Can you give me brief info about how to do it with robot operating system?
hi, i was trying to do the same,in time your uploaded video was very helpfull iam stuck at code while running it says " waiting to inisialize" and then message is repeating. i checked all the parameters and even gave it a gps lock and even all the neccesary connections the pixhawk has the green led light blinking (system is ok). But the code isnt running.but when done in mavproxy its doing well.pls help...
Just confirm the setup once.....check this steps 1.check if pixhawk n rpi are communicating properly by this this commands sudo -s Python mavproxy.py --master=/dev/ttyAMA0 --baudrate 921600 --aircraft MyCopter If it gives you all the parameters and you can see mode change if you use rc transmitter then just try arming the motors (check for propellers) By using : arm throttle To disarm use :disarm Now its time to run the simple python script for example arm takeoff and land ,just bench test it In you code check for the baudrate that u have set in mission planner for telemetry 2 Baudrate must be same as in you code where you pass the connection string If you get get error like "initialization time out" then it means its due to baudrate and If you get error like "initialization waiting for arm" then check for pre arm check errors by manually arming the drone via rc transmitter If you get error like pre arm logging failed while manually arming the drone then set log backed type to 1(file) in parameter list N most important never connect rpi to the usb port on pixhawk its good just for bench testing
@@PankajMaliYes it worked 1) I fixed the Ekf Nav failure 2) Fixed logging parameters 3) Need a good gps so I had to bring a gps with compass and set Ekf and INS to 2 Thanks a lot ur suggestion really helped
Hello venkatesh, Yes you can upload waypoints in some of the following ways 1. With companion computer you can call out the mission file from the pixhawk and fetch it. 2. You can use navigation api with dronekit, like you can use goto function to let the drone acquire that particular cordinate. 3. You can write a function which will accept user coordinates while the aircraft in the air.
Yes , for autonomous missions you can disable the failsafe in mission planner or set that particular parameter in your python script, so that even if it goes beyond the transmitter range the mission will continue.
The transmitter is in mode 2 configuration and A 3-position switch having stabilize, Loiter and alt hold modes. Just to be on the safer or to get manual control we have to generate an interrupt using this switch and gain control
When its in the air ( guided mode) then the modes on transmitter doesnt matter it can be in any either stabilize or loiter or althold any .... and when i want manual i take it in loiter or stabilize depending where the switch is initially before take off . Usually i have the switch on stabilize initially so when ever i toggle it gets on loiter.
I have one doubt please clear it ................................................On toggle switch , which mode you are providing Loiter Land RTL or others
I have mainly configured 3 modes on this transmitter 1. Stabilize 2. Loiter 3.auto (incase if iam going for some waypoint mission) And this modes are just for backup in case something goes wrong with your code
I am running your GitHub code on thony python ide but there are showing error that dronekit is not found . But I have already installed it though cmd . How can I add this library in thony ide . If you have any suggestions please share me .
Did you follow the video ? Check for baudrate Check the gpio enabled for serial communications Check the port in which the communication is trying to establish.
Waiting for vehicle to initialise... Waiting for vehicle to initialise... Waiting for vehicle to initialise... Waiting for vehicle to initialise... Waiting for vehicle to initialise... Waiting for vehicle to initialise... Waiting for vehicle to initialise... Waiting for vehicle to initialise... Waiting for vehicle to initialise... Waiting for vehicle to initialise... what? waiting????
Can u please make a tutorial or tell me how to get dronekit/dronekit-sitl to work? Ive looked up all tutorials and always end up with errors nothing on the internet seems to work
@@PankajMali tysm , on simple goto it disarms by its own "DISARMING MOTORS" and on mavlink it hits errors like "APM: Initialising APM... Got COMMAND_ACK: COMPONENT_ARM_DISARM: ACCEPTED ARMED Arming checks disabled Got COMMAND_ACK: NAV_TAKEOFF: FAILED APM: DISARMING MOTORS DISARMED"
@@PankajMali i think its a setup problem but i tried mutliple ubuntu versions, python2 and python3 ect.. nothing seems to work so i hope you include the whole setup and software versions ect in ur video.
Great Video! I have successfully done this command: Python mavproxy.py --master=/dev/ttyAMA0 --baudrate 921600 --aircraft MyCopter But when I try to run the python demo.py script, I do not get a connection. I set the correct/same baudrate in Missionplanner for Serial 2. Any ideas what I could have missed? I get the message "waiting for heartbeat from /dev/ttyAMA0 Thanks a lot for the great videos!
@@PankajMali i did it exactly with this command. I use a raspberry Pi4. If the mavproxy.py script works fine, all baudrate settings have to be correct, right?
@@PankajMali Unfortunately it still does not work. pi@raspberrypi:~ $ python vehicle_state.py --connect /dev/ttyAMA0 Connecting to vehicle on: /dev/ttyAMA0 WARNING:dronekit:Link timeout, no heartbeat in last 5 seconds Any ideas?
This error occurs due to 1. Tx rx pins incorrectly connected ( but in your case pi connects successfully with pixhawk) 2. Port no is not correct, i will tell you a port you try connecting on that port , both running mavproxy.py and also to run the python script. For pi4 it doesnt work for ttyama0 go for serial0 or ttys0
Hi brother my name is vijay kumar mr sagar from vizag gave your insta account but I lost it presently iam working on pixhawk and agricultural drones I would like to get some help from you thank you brother.
@@PankajMali brother for agricultural drones we use jiyi,topxgun and pixhawk cube for jiyi and top x gun what kind of programme do we use .and kmnvk1998@gmail.com is my mail bro and some beeping issue with pixhawk too I can elaborate and say via mail can you please pin me there brother.
Did you install ardupilot directory from github? If yes then ...the command what you have used is not sufficient to start rhe simulation . Badically there are 2 ways to start sitl 1. If you are following official documentation then you need to install dronekit, mavlink , mavproxy and then start mavproxy ...here you xan just simulate in mavproxy terminal and also connect mission planner over udp /tcp 2. If you need ardupilot with Gazebo then you need to clone ardupilot directory Commands that you have used are incomplete and you need to install python dependencies. Follow my video on installing ardupilot directory.
@@PankajMali no i am not install ardupilot dir i am just using dronekit , mavproxy, pymavlink . i dont need Gazebo. just drone kit-sitl can u help me on tream view controll just for setup??
thanks a lot sir, it gives me a general view of drones programming, hope i can reach far on this learning journey
Hi,
I'm glad it helped you
Really impressed by the detailed instructional videos.... Keep it up!! Eagerly waiting for upcoming videos......
Thank you very much for appreciation. Will come up with new videos soon 🤘
Wow this is cool , have followed your last video and I'll be trying out this too
Amazing video 😍
Great, will be out with further uploads also❣❣
Very cool drone brother! I tried following along, but I am getting unusual behavior when hovering and was wondering if you could help me. I used your code to takeoff, but once I get the "altitude reached" message, the drone does not stay still at the desired altitude. Instead, it oscillates up and down, like its in water, and never hovers in place, like yours does, until the mode is switched to LAND mode. So if I try to hover at 2 meters, it will get to 2 * 0.95, then it will bob up to 3, then down to 1, then back up to 3, then back down to 1, and neither of those is 2 * 0.95. I have the break statement when altitude is reached, so I am not sure what is happeneing. I also did several autotune. Have you ever experienced this?
Hello,
In order to debug this issue, i request you to take off using RC and put the drone in Loiter mode and just observe . If you find similar behaviour then its because of the faculty measurement. I have this same issue 7 years back with chinese cloned pixhawk 2.4.8, i replace the autopilot and it was all good.
When ever i was gaining or loosing altutude it used to do up and down with some jerks.
@@PankajMali Oh really, interesting... I also have the 2.4.8 chinese clone. However, I think my issue might be different because I just tried a flight and put it in loiter to reproduce the bug, like you said, but it did not reproduce the bug. When I enabled loiter from my RC controller, it hovered very still, with no dipping up and down.
Its a very strange bug, and now I am thinking that it might have something to do with the dronekit code and my copter version. I am running Copter version 4.3.7, so I am wondering if something behind the scenes has changed from the older versions. Do you remember what Copter version you were using in the mission from the video?
If thats the case, then I might have to code up a PID controller or something because the dipping up and down oscillations are very symmetric. If I set the desired height to 2, then it oscillates between 1 and 3. After checking the dataflash log, I see a dampinging happening aswell so that the wave goes 3 to 1, then 2.7 to 1.3, then 2.5 to 1.5, and stays there such that the drone keeps dipping up and down.
I will also try to go up higher, like 15 meters, and try to hover for a longer duration, like you do. Wish me luck as I try to take a deep dive into debugging territory lol.
Hey Pankaj its Anukesh your work is great👍👍👍
That means a lot, thank you ❣❣
Wow
Thanks, a good starting point for a drone developer like me
Yup❣
Good to see integration in each upcoming contents 👍
Hello,
Thank you for appreciating my work❣❣
brother, drone kit work with python 2.7 but other version mode set not work! and i am try and tired! i can't install dronekit 2.9.0 in python 3 or 4 also in windows mavproxy can't change mode return the same mode!
Hi,
Use python version 3.6. And if you already have anyother pythin 3 eg. Pythin 3.8/3.11 then set python 3.6 on default and then install all the pythin packages using pip3 install . It will workk
For autonomous drone, can we use apm 2.8 satisfactorily? As of now I am unable to get pixhawk in market and have no other option but to go with apm.
Kindly help.
Yes you can go with apm...it is no longer supported by the community but still you can build your project with some limitations as compared to pixhawk.
Check robu.in for pixhawk
Helle. Good work. I write some dronekit, connect pixhawk from laptop using by telemetry but it does take off. What ı must do from transmitter? Can you help me?
Hello,
Transmitter is just for safety/ like a backup controller ...only thing you need to when you want to use transmitter before changing mode from transmitter just keep your throttle stick to mid positio and then change mode to take manual control .
Hello. Are you available to help/answer some questions?
Yes please
@@PankajMali Thank you! Basically... (Im from Brazil, so sorry for any english mistakes) Im building the parts to build a drone with raspberry pi and pixhawk. My main doubt is: As i can see, i can just choose some waypoints and flight autonoumously using mission planner, but its possible to stream the video while drone is flying? I mean... There is a raspberry and a camera on the drone, do you know a good way to watch the camera recording on real time through internet? Or only using something like VNC/team viewer?
can you please tell the delay thing, I mean the first method at 6:28 . and also what switch has to be toggled ? to take manual control , I mean what actually is that switch ??
Hello,
In this video i have executed the code from laptop using ssh .
Anothet way is to add your python code to the shell script so that it will start the code as soon as drone is powered and gor safety purpose you can add some 1 min delay so that you can stand away from drone once powered on.
You will be having a flight mode switch on your transmitter which has user defined modes like stabilize, loiter , rtl, alt hold etc ...so whenever you execute your code and want to take manul then just an interrupt has to be generated from your transmitter, so its like you just toggle your mode switch irrespective of its initial position...just toggle it and take manual control and dont forget to keep throttle at 50 percent.
Good luck
Sir,
I want to do only flight planning.. i.e. making waypoints using python then it will export a KML.
I will put that waypoint KML in a software and drone will fly.
How to do flight plan using python, where I will input area KML, wind direction, overlap and it will make waypoint
Hello ankit ,
In order to create waypoint from a kml .
You need to use pykml package
1) from pykml import parser
2) root =parser.fromstring(open('BatchGeo.kml', 'r').read())
3) print root.Document.Placemark.Point.coordinates
So basically above steps will read a kml file and print the coordinates.
As per your requirements you can fetch the coordinates one by one to a python array and then access them as waypoints .
I got a question. Does the vehicle.armed = True works only if the drone is in Guided mode? I tried arming it in stabilize mode but I always get the error of throttle too high
Hellp john,
Yes you are correct ....drone gets armed only in guided mode when commands are sent via a companion computer
@@PankajMali Last question about the algorithm vehicle.is_armable. Is the GPS lock one of the parameters needed to be set for the vehicle.is_armable to return a True value?
You are doing great keep it up !!
Thank you ....really appreciate your support ❣
when you send the script the remote in witch mode should be because i put it in the stabilize mode after thet i send the code after few sec the drone armed but dont go up stay on the ground so what i should choose the mode frome remote wile fliying it from the script an help please???????????????
Good question Mohamed
When you run a python script you can keep your transmitter in any mode like stabilize or loiter it doesnt matter. I mainly have it in stabilize mode so that when ever i want to get manual control i flip the switch to loiter and the copter is steady.
Main thing to remember is you dont change the mode from transmitter once you run the script as it will generate a interrupt and tell the system to get manual access and it wont takeoff. Once it takes off just keep the throttle to 50 percent in case required to take manual control, before takeoff dont move any switch on transmitter.
Hi Pankaj Impressive work... Want to see an autonomous trajectory tracking video, and how to implement the designed controller on the pixhawk.
Hello arindam ,
Yes, will be soon starting to upload
Would this work for a drone that fly in indoor places (non-gps places)
Yes this script can be tested with no gps guided mode but not recommended unless and until your are specific about the sensors or the approach that you take to build your system like ..... you can use px4 flow sensor as an alternate to gps for position hold and you can use vision based navigation stack like any cameras along with visual markers or can go with lidar based approach .
Is it possible to connect to the onboard Rasberry pi with rfd 900 telemetry or herelink telemetry? If so, can you make a video on how to set it up ? The short WiFi range for Rasberry pi communication is a big limitation and 4g is unreliable where I live. Thanks
Yes , that can be done.
@@PankajMali can’t wait for the video !
since your ssh depends on wifi connection, what happens if one of the devices gets disconnected e.g. if drone goes to such a height or distance away and loses connections. WIll the running script not terminate?
Hello deep blue sea,
You are correct, the aircraft keeps on doing its task according to the script . Ssh is just a medium to access the rpi just to trigger the script.
@@PankajMali are you sure? my research suggests if SSH session gets disconnected, the process terminates
Yes im sure , i have tested it many time . If i het time I'll put this query in a video
Nice work mate!
Thank you
Hello, I got another question. Whenever I try to run the script, I always get this error of "Arm:Throttle(RC3) is not neutral" around the part of vehicle.armed = True. I only got it to pass when I put one joystick at the bottom (which is seen in your video around 8:30). Is it really required to have the joystick at the lowest value before it can pass the arming? Or is there any other way to get past this?
Hi ,
If the throttle is not at the lower position or zero the pre arm check will generate a error ....this is for safety .
If you run the script and then simultaneously you move thr throttle upward then manual interrupt is generated and the code execution stops.
Yes it is reaply required to have the throttle stick at thr lowest value before arming
@@PankajMali So the throttle being at the lowest position or zero is also a parameter of the vehicle.is_armable?
Yes, you can check the arming_check parameter in the mission planner for list of all the parameters under that
@@PankajMali I got it now! Thanks so much
can u communicate between apm/pixhwak and arduino???
Yes it works
Great Presentation. Pankaj Impressive.. 👍🏻👍🏻
Thank you
Thanks for the video , but i want to ask you why after starting the code it takes about 30 second to connect to the drone and begin the mission !?
Hi iheb,
Let me know about your setup, doe your drone starts the mission automatically once it i powered ? Or you manually run the code from your laptop ?
I take error WARNING:dronekit:Link timeout, no heartbeat in last 5 seconds, what should I do?
The only reasons for this error are
1. Check the rx tx pins if rhey got interchanged
2. Check for the Bluetooth disable step
keep it up man love ur work
Thank you ❣❣
Great brother keep doing 🤟
Thank you buddy ❣❣
Brother I am tired to run dronekit-sitl similator ! It installed and downloaded model bur running time not work what can I do?? Please make a video or if u have solution please help me to do this..
Hello,
Do you get any errors?
yes brother..
Can you please elaborate on your issue
Nice work mahn😍😍😍
Thank you ❣❣
Pankaj ji which drone u have used here I want to buy it
Hello shantanu ji
Drone that you see is custom designed and developed .
You can catch me on Instagram for more details @punky_pankaj
Can windows be use instead of using ubon to?
Please say
Yes you can use
I constantly receive link:error no heartbeat in last 5 seconds. How can i resolve this?\
This happens when there's no connection between rpi and pixhawk.
1. Check the tx rx pins , might be revered.
2. Check for setting on rpi
3.check baudrate which is assigned to telemetry ports the one which you are using with mission planner. 57600/ 921600
@@PankajMalicould you make a new video to how to integrate pixhawk and raspberry pi along with picam for a line follower drone?
@@dawatamang6765 sure
brother all is work but "vehicle.mode= VehicleMode()""
-mode not work return same mode! what cai I do??
Update mavlink
What size props are you using?
Hello,
Prop size is 17x5.5 inch
can you show us how to run any Python script on RPi and see the simulation on mission planner ? A small video this would be very helpful, thank you in advance
Hello,
You can check the video on sitl anf gazebo simulation i have completed the basic setup...it will help you to understand
@@PankajMali can you please share the link of the video you are talking about?
Thanks
ruclips.net/video/CUEbTx1Fh1w/видео.html
Good information sir
best man ever
Thank you ❣❣
Very interesting Thank you for sharing 👍🦅✨
Welcome❣❣
Good work keep it up
Thank you and sure will do ❣
I have built a drone with APM 2.8 flight controller and rpi, and I'm trying to do same as you have done using pixhawk flight controller, but at the end I am not able to rotate the motor. I just want to make it laptop operated and don't want to fly it with rc.
I am having the error like"no heartbeat in last 5 seconds" ad "api exception timeout in initialising connection
This error occurs because of the connection string, just check in the mission planner > full parameter list > serial_baud ... this baud rate should be as you are passing in the connection string in your python script , like in my case im having 921600
@@PankajMali I solved this error but last me "prearm calibrate rc" aa raha he
Is it compulsory to calibrate rc if we want to fly with only rpi and APM 2.8.
Yes its mandatory to do the pre arm checks, and if you only want to send commands via your laptop then you need to go with robot operating system which is the easiest way to do that
@@PankajMali yes actually my motive is to fly drone only with laptop not by rc. Can you give me brief info about how to do it with robot operating system?
hi,
i was trying to do the same,in time your uploaded video was very helpfull
iam stuck at code while running it says " waiting to inisialize" and then message is repeating.
i checked all the parameters and even gave it a gps lock and even all the neccesary connections the pixhawk has the green led light blinking (system is ok). But the code isnt running.but when done in mavproxy its doing well.pls help...
Just confirm the setup once.....check this steps
1.check if pixhawk n rpi are communicating properly by this this commands
sudo -s
Python mavproxy.py --master=/dev/ttyAMA0 --baudrate 921600 --aircraft MyCopter
If it gives you all the parameters and you can see mode change if you use rc transmitter then just try arming the motors (check for propellers)
By using : arm throttle
To disarm use :disarm
Now its time to run the simple python script for example arm takeoff and land ,just bench test it
In you code check for the baudrate that u have set in mission planner for telemetry 2
Baudrate must be same as in you code where you pass the connection string
If you get get error like "initialization time out" then it means its due to baudrate and
If you get error like "initialization waiting for arm" then check for pre arm check errors by manually arming the drone via rc transmitter
If you get error like pre arm logging failed while manually arming the drone then set log backed type to 1(file) in parameter list
N most important never connect rpi to the usb port on pixhawk its good just for bench testing
If you still get the error then kindly provide more details about that
@@PankajMali sure ,thanks a lot I'll try it
@@PankajMaliYes it worked
1) I fixed the Ekf Nav failure
2) Fixed logging parameters
3) Need a good gps so I had to bring a gps with compass and set Ekf and INS to 2
Thanks a lot ur suggestion really helped
Yeah that's great, glad it helped you...keep building ❤
Great bhaiya
Thank you ❣
any way thats supb.......... keep going bro
Dhanyavaad bhaii
Hi bro
Is there any way to upload the waypoints to drone with our own gps coordinates.
Hello venkatesh,
Yes you can upload waypoints in some of the following ways
1. With companion computer you can call out the mission file from the pixhawk and fetch it.
2. You can use navigation api with dronekit, like you can use goto function to let the drone acquire that particular cordinate.
3. You can write a function which will accept user coordinates while the aircraft in the air.
@@PankajMali thanks bro.
@@PankajMali so can we control it with the only python for long distances, without transmitter
Yes , for autonomous missions you can disable the failsafe in mission planner or set that particular parameter in your python script, so that even if it goes beyond the transmitter range the mission will continue.
Your quad build and configuration video would be great thanks.
Yes, I'll be doing a video on the build of that quad ❣❣
Fantastic...🤩🤩
Thanks a lot
How I can change the location nd from where ???
Hi suyog,
You can use the goto command where you can add the coordinates.
Please refer dronekit documentation for more details regarding the commands
what is the mode on transmitter?
The transmitter is in mode 2 configuration and A 3-position switch having stabilize, Loiter and alt hold modes. Just to be on the safer or to get manual control we have to generate an interrupt using this switch and gain control
@@PankajMali so when it is flying on it own, the mode on transmitter is stabilize, when you want manual control, you change it to loiter mode?
When its in the air ( guided mode) then the modes on transmitter doesnt matter it can be in any either stabilize or loiter or althold any .... and when i want manual i take it in loiter or stabilize depending where the switch is initially before take off .
Usually i have the switch on stabilize initially so when ever i toggle it gets on loiter.
@@PankajMali sure, thank you!
Great bro..
Thank you sir
I have one doubt please clear it ................................................On toggle switch , which mode you are providing
Loiter
Land
RTL or others
I have mainly configured 3 modes on this transmitter
1. Stabilize
2. Loiter
3.auto (incase if iam going for some waypoint mission)
And this modes are just for backup in case something goes wrong with your code
I am using flysky transmitter .
Please provide me information about .
Which switches in transmitter are used for this mode
On top right section of your transmitter use that 3 position switch which is usually channel 5 assigned switch
I am running your GitHub code on thony python ide but there are showing error that dronekit is not found .
But I have already installed it though cmd .
How can I add this library in thony ide . If you have any suggestions please share me .
Thank you 😊
error device reports readiness to read but returned no data?
Hello,
I see that you might have used mavproxy command becfore running the python script.
Try running this command
sudo killall -9 mavproxy.py
If still you aren't able to get the serial data then plz elaborate about your setup
Did you follow the video ?
Check for baudrate
Check the gpio enabled for serial communications
Check the port in which the communication is trying to establish.
Waiting for vehicle to initialise...
Waiting for vehicle to initialise...
Waiting for vehicle to initialise...
Waiting for vehicle to initialise...
Waiting for vehicle to initialise...
Waiting for vehicle to initialise...
Waiting for vehicle to initialise...
Waiting for vehicle to initialise...
Waiting for vehicle to initialise...
Waiting for vehicle to initialise...
what? waiting????
Hi, How do i fix the "import dronekit-sitl error"?
Install dronekit sitl ,using terminal
sudo apt-get install dronekit-sitl
For more information refer dronkit official docs
could you please mention the parts specification for building the drone, your drone is really cool!
Yeah, I'm going to make a video on that soon!!
waiting for the videoo@@PankajMali
Great presentation! Is the script actually available?
Yes its available
Cool!
Yo 🤘
Keep it up
Thank you
Nice 🤘🏼
Thank you ❣❣
@@PankajMali may I ask you? Did you send the python script on rpi or on your another computer and send to the rpi?
Yes basically i write the scripts on the laptop n after that i use the "scp pi@ipof yor pi " command and send the file to pi and then execute it
@@PankajMali thank you for the reply
Keep building
This is amazing
Thank you ❣❣
Can u please make a tutorial or tell me how to get dronekit/dronekit-sitl to work? Ive looked up all tutorials and always end up with errors nothing on the internet seems to work
Yes ,my next video will be uploaded in couple of days its all about simulation with sitl ,Mavproxy and mission planner, also with gazebo integration
Btw what errors did you get ?
@@PankajMali tysm , on simple goto it disarms by its own "DISARMING MOTORS" and on mavlink it hits errors like
"APM: Initialising APM...
Got COMMAND_ACK: COMPONENT_ARM_DISARM: ACCEPTED
ARMED
Arming checks disabled
Got COMMAND_ACK: NAV_TAKEOFF: FAILED
APM: DISARMING MOTORS
DISARMED"
@@PankajMali i think its a setup problem but i tried mutliple ubuntu versions, python2 and python3 ect.. nothing seems to work so i hope you include the whole setup and software versions ect in ur video.
Yes i have experienced those errors
Will surely cover up that things too.
Great..
Thank you sir
Super
Hi. Can you sell this technology
Its already available on the internet just you need to build it
Nice bhava drone chi price kay ahe
Ha drone custom designed aahe ...you can calm it as a diy type, it cost around 1 Lakh complete set
Nice
Thank you
thanks
👍👍
Great Video! I have successfully done this command:
Python mavproxy.py --master=/dev/ttyAMA0 --baudrate 921600 --aircraft MyCopter
But when I try to run the python demo.py script, I do not get a connection. I set the correct/same baudrate in Missionplanner for Serial 2. Any ideas what I could have missed?
I get the message "waiting for heartbeat from /dev/ttyAMA0
Thanks a lot for the great videos!
Gald it helped you,
Run the script with this command
Python demo.py - -connect /dev/ttyAMA0
@@PankajMali i did it exactly with this command. I use a raspberry Pi4. If the mavproxy.py script works fine, all baudrate settings have to be correct, right?
Yes you are correct
@@PankajMali Unfortunately it still does not work.
pi@raspberrypi:~ $ python vehicle_state.py --connect /dev/ttyAMA0
Connecting to vehicle on: /dev/ttyAMA0
WARNING:dronekit:Link timeout, no heartbeat in last 5 seconds
Any ideas?
This error occurs due to
1. Tx rx pins incorrectly connected ( but in your case pi connects successfully with pixhawk)
2. Port no is not correct, i will tell you a port you try connecting on that port , both running mavproxy.py and also to run the python script.
For pi4 it doesnt work for ttyama0 go for serial0 or ttys0
bro cool video but the music is extremely annoying ! Great job anyway
Hi Lyaeus,
Will take care of that in next videos
👍
👍🙌
majh tr awaj nahie ki
Hi pankaj
Hello ,
How can i help you?
Hi brother my name is vijay kumar mr sagar from vizag gave your insta account but I lost it presently iam working on pixhawk and agricultural drones I would like to get some help from you thank you brother.
How can i help you ?
@@PankajMali brother for agricultural drones we use jiyi,topxgun and pixhawk cube for jiyi and top x gun what kind of programme do we use .and kmnvk1998@gmail.com is my mail bro and some beeping issue with pixhawk too I can elaborate and say via mail can you please pin me there brother.
Thankyou
Yeah no issues ...or you can even catch me up on Instagram @punky_pankaj 🤘🤘
@@PankajMali shore brother
brother i can't comment i sent u a text mail plz. help me to fix!
Yes, i have received your mail
@@PankajMali now what can i do brother??
Did you install ardupilot directory from github?
If yes then ...the command what you have used is not sufficient to start rhe simulation .
Badically there are 2 ways to start sitl
1. If you are following official documentation then you need to install dronekit, mavlink , mavproxy and then start mavproxy ...here you xan just simulate in mavproxy terminal and also connect mission planner over udp /tcp
2. If you need ardupilot with Gazebo then you need to clone ardupilot directory
Commands that you have used are incomplete and you need to install python dependencies.
Follow my video on installing ardupilot directory.
@@PankajMali no i am not install ardupilot dir i am just using dronekit , mavproxy, pymavlink . i dont need Gazebo. just drone kit-sitl
can u help me on tream view controll just for setup??
plz brother help me to run sitl...
Hi
Hello
I want to connect with you..
You can catch me up on instagram @punky_pankaj
@@PankajMali please accept my request