Sorry for asking this super basic question:
I have wrote some very simple programs with Arduino before I get to Ardupilot , but I just got confused about the firmwares in Ardupilot, something like firmware for ArduCopter, firmware for ArduPlane or AntennaTracker …
Why Arduino doesn’t have the “firmware” conception but Ardupilot does (All I known in Arduino is that if I want my Arduino to do something, I just need to write some sketchs in Arduino IDE and upload it to Arduino board) ? What’s the function of Ardupilot’s firmware ? And what’s the relationship between firmware and control codes(sketches)? Are firmware and sketch the same thing or different things ? Or is it that firmware is basic program and sketches run above the firmware?
Ardupilot has moved quite a bit beyond the original Arduino framework. Although it still runs on Arduino-compatible boards, the code is now is standard C++. You can think of the APM code and libraries as sketches and Arduino libraries, so yes, they’re essentially the same thing.
If you want to write code that works with APM/ArduPilot, it’s best to do it at a higher level rather than messing with the flight code itself. That’s why DroneKit was created, so you can create simple Python scripts that do what you want (using a simple companion computer such as a Raspberry Pi), without having to change the APM/ArduPilot code at all.
You can read more about that at Dronekit.io