APM + Raspberry Pi and Image tracking

I have to do a final semester project for a quad to auto-land on a target. Is this possible using and APM, a raspberry pi? I’ve used the APM for quite a while now, and know my way around how to get it set up, tune it and fly using it but am not too good at coding. I was looking at DroneKit and from what I understand, it should allow me to send commands to the vehicle after doing some image processing, is this correct? Is there any way to completely simulate this on software before implementing it in hardware? I can’t seem to completely wrap my head around how to go about it. Would it be better to do the image processing on board the raspberry pi or a laptop? How should I go about it?

Hi Arunabha42,
I’m doing a very similar project. Maybe we can help each other.

I have the raspberry part almost ready but I’m a complete noob in APM. I’ve set it up to fly but now I need to dive inside the code. I’m fighting with the Ardupilot version of Arduino IDE. ¿Do you know something about that?

Regards :wink:

Hey Arunabha42,

I’m in a similair situations as you, I#m using the raspberry Pi with open CV /webcam and laser to do a prcise distance measurement to a wall. got all that set up, but i can’t implement it to the the APM/Pixhawk code.
About the Softwareloop you are looking for SITL is the keyword.

good luck


Never used that, sorry can’t help. Need to know how to use that as well.

I have been trying to setup SITL without success. Currently I’m trying to do it in Windows as described here:

I’ve got Cygwin installed and cloned the GitHub repository. However, everytime I’m running this:
make sitl -j4
I’m getting this error:

Arunabha42@Jeeves ~/ardupilot/ArduCopter
$ make sitl -j4
…/mk/environ.mk:44: *** ERROR: cannot determine sketchbook location - please specify on the commandline with SKETCHBOOK=. Stop.

SO right now I’m stuck here. Have no idea how to solve this.

If it’s of any use I found this discussion:
diydrones.com/forum/topics/best- … -simulator


I’m in pretty much the same position. I know how to get the hardware setup and flying, but need to know how to build the code and how the code works.
And are you following this:
dev.ardupilot.com/wiki/building- … o-windows/

I gave up with that pseudoArduino ide. I was not able to make it work.
Know I’m writing with Notepad++ and building with make: http://dev.ardupilot.com/wiki/building-ardupilot-for-apm2-x-on-windows-with-make/

It’s a little bit slow compiling but I am working know.