Flying drone over UDP

Hi, does anyone know if you can fly the drone over UDP from mission planner? We’re also wondering if its possible to control the drone from the pi that its connected to rather than from a radio.

Yes, you can connect a joystick/gamepad to your pc running missionplanner and use it to fly your drone.
Keep in mind, that you are required to use a dedicated RC system at least as a backup in some countries. Also using a RC system makes it a lot easier to setup your drone. Trying to fly your drone for the first time with Missionplanner only, will most certainly lead to a crash. Buy a RC system once and save on spare parts many times.
I do not really understand the second part of your post.
The Arducopter/Plane/Rover executable or your own control code is running on the RPi mounted on your vehicle.
Depending on what flight mode you select, it flies/drives more or less by itself, but it is always executing commands you entered before. So if you program waypoints to follow, those waypoints are saved on the RPi and you could say the RPi is controlling your drone.

Hey thanks for your reply. Yes we will have a dedicated RC system for backup as well as an emergency “Kill Switch” if something goes although we do plan to use the drone inside and in a cage and possibly even tethered for a large part of the project whilst we try get the thing to fly in a stable manor.

What I am wanting to know is, say I wanted to control the drone using a python script / C++ within the pi B 2 itself. I know i can the motors and check the status of components but I was wondering whether there is a way to internally port to APM itself rather than me having to write a bunch of PID controllers and annoying stuff like that that I’d rather skip.

The reason we need to do this is because we want the drone to make decisions based on images that it processes from an on board camera. (it needs to accurately follow a line within about ± 0.5m either side.

Have a look at dronekit. I am not sure it does what you want, but you can interact with APM through it:

http://dev.ardupilot.com/wiki/droneapi-tutorial/

1 Like

Cheers. Perhaps I can create a virtual loopback com in the Pi worst case scenario.

Hello Daniel, I am completely new here, so I cannot write a private message to you, but it seems like we are doing almost the exact same thing! I also need to make the drone fly autonomously with RPi2+Navio+ using an on-board sensor input (probably lidar in my case), so I think we can help each other :slight_smile: Is your project already finished?

I made my drone fly over UDP using standard USB joystick and now I try to find the best way to control it with my code. I use DJI F450 frame.

To anyone alse reading this - hello! It’s nice to be in your community :smile:

1 Like

Hi Krzysztof!

I think your ahead of us. Our drone is still on the ground but I believe the best way would be to use mavlink running over local UDP or something (i.e. set up the connection using sudo ArduCopter-quad -A udp:127.0.0.1:14550 -C udp:)

We are not sure yet. Also there is a way to calibrate the ESC without needing to do the whole controller thing (You can set the esc calibration parameter in mission planner to 2 which means auto calibrate on startup)

Also something to note is the raspberry pi 3 is out! definitely worth looking into as that thing is powerful!

I have DJI E300 OPTO-ESCs and as I read somewhere, they don’t need to be (or even can’t be) calibrated and they seem to be working just fine.

I don’t have RC. The way I did it was just to set up a WiFi hotspot with the smartphone, connect both Raspberry Pi with a WiFi dongle and computer to it, then calibrate a basic Logitech USB joystick in Mission Planner (not APMPlanner), omit voltage check in the startup procedure and it works… I use the same command to connect it (with only -A primary telemetry). I crashed it, however (just as schuermannsebastian said), so now I wait for new propellers.

I had some strange problems with Mission Planner - it was crashing when I was enabling the joystick, I had to downgrade it to previous version to make it work…

I’ve seen RPi3 and I’m quite impressed, if I get some results with RPi2 and it will look like I could use some more computational power, I will definitely try it out!

I will try to figure something out with the whole “autonomous” thing, I will let you know if I find something worth sharing. I’m also doing it as a university project.