Replies

  • Developer

    Simply answer: Yes

    There are more than 100.000 lines of code that our dev teams have been writing. Originally we had most of the code in normal Arduino sketches but now most of them have been moved to libraries. Most of the code is used on every platform.

    ArduCopter specific code is mainly that code in mentioned as Arduino Sketch. Same type sketch files you can find from ArduPlane and ArduRover. 

    In past few years we replaced all original Arduino libraries and current system does not even look like a Arduino anymore. Thou you should still be able to compile it in normal Arduino IDE environment but if you use that it wont be as compact as compiled with our special compilers. Arduino IDE does rather badly optimized code and it might not fit anymore in to the APM hardware. So more optimized compiling environment is highly suggested to use.

    Also as we run this same code on multiple different platforms like Arduino, uDroid, BeagleBone and PIxhawk (STM32) those cannot be compiled in Arduino IDE as it's only for Arduino systems.

    On top of just main firmware running on electronics we need to remember all Mission Planner, APM Planner, Droidplanner softwares too so total code included among whole APM system can easily go over 400.000 lines or even more and it's growing every day.  

    Jani / Original ArduCopter team leader 

    • That is very interesting. Thank you for all the hard work on this project. I am very impressed with the 400,000+ lines of code, but I am also interested in how little code could be necessary to fly the arducopter. It can be more difficult for me to read and learn many lines of code.

      John

  • thanks for the quick response. so I guess that would be 28,900 lines since it is an Arduino sketch, correct?

    • All of the code in these files form the Ardupilot project. Ardupilot includes ArduPlane, ArduCopter and ArduRover. Most of the code is C/C++ in shared libraries. There is code for multiple platforms and also test code included. As for exactly how many 'lines of code' actually contribute directly to any one binary executable for given settings, I will leave that for someone else to work out.... 

  • Hi, latest Ardupilot master as reported by cloc:

    http://cloc.sourceforge.net v 1.60  T=6.42 s (211.1 files/s, 86581.6 lines/s)

    Files

    Language

    Blank

    Comment

    Code

    699

    C/C++ Header

    19202

    42999

    80906

    249

    C++

    10251

    15300

    47721

    186

    Arduino Sketch

    6674

    8857

    28928

    46

    C

    2468

    1915

    8952

    38

    XML

    317

    269

    7065

    57

    Python

    1491

    756

    6217

    36

    Bourne Shell

    241

    83

    1303

    18

    make

    565

    782

    988

    6

    C#

    70

    121

    449

    3

    Perl

    114

    36

    399

    2

    CSS

    35

    4

    221

    2

    HTML

    51

    2

    168

    1

    MSBuild scripts

    0

    7

    79

    1

    MATLAB

    24

    46

    52

    2

    Bourne Again Shell

    18

    54

    25

    1

    ASP.Net

    0

    0

    3

    1347

     

    41521

    71231

    183476

    CLOC -- Count Lines of Code
This reply was deleted.

Activity

DIY Robocars via Twitter
RT @chr1sa: Donkeycar 4.4 released with tons of new features, including path learning (useful with GPS outdoors), better Web and Lidar supp…
Sunday
DIY Robocars via Twitter
RT @NXP: We are already biting our nails in anticipation of the #NXPCupEMEA challenge! 😉 Did you know there are great cash prizes to be won…
Friday
DIY Robocars via Twitter
RT @gclue_akira: レースまであと3日。今回のコースは激ムズかも。あと一歩 #jetracer https://t.co/GKcEjImQ3t
Friday
DIY Robocars via Twitter
UC Berkeley's DIY robocar program https://roar.berkeley.edu/
Friday
DIY Robocars via Twitter
RT @chr1sa: The next @DIYRobocars autonomous car race at @circuitlaunch will be on Sat, Dec 10. Thrills, spills and a Brazilian BBQ. Fun…
Friday
DIY Robocars via Twitter
RT @arthiak_tc: Donkey car platform ... Still training uses behavioral cloning #TCXpo #diyrobocar @OttawaAVGroup https://t.co/PHBYwlFlnE
Nov 20
DIY Robocars via Twitter
RT @emurmur77: Points for style. @donkeycar racing in @diyrobocars at @UCSDJacobs thanks @chr1sa for taking the video. https://t.co/Y2hMyj1…
Nov 20
DIY Robocars via Twitter
RT @SmallpixelCar: Going to @diyrobocars race at @UCSDJacobs https://t.co/Rrf9vDJ8TJ
Nov 8
DIY Robocars via Twitter
RT @SmallpixelCar: Race @diyrobocars at @UCSDJacobs thanks @chr1sa for taking the video. https://t.co/kK686Hb9Ej
Nov 8
DIY Robocars via Twitter
RT @PiWarsRobotics: Presenting: the Hacky Racers Robotic Racing Series in collaboration with #PiWars. Find out more and register your inter…
Oct 23
DIY Robocars via Twitter
RT @Hacky_Racers: There will be three classes at this event: A4, A2, and Hacky Racer! A4 and A2 are based around UK paper sizing and existi…
Oct 23
DIY Robocars via Twitter
Oct 23
DIY Robocars via Twitter
Oct 19
DIY Robocars via Twitter
Oct 18
DIY Robocars via Twitter
RT @NeaveEng: Calling all UK based folks interested in @diyrobocars, @f1tenth, @donkey_car, and similar robot racing competitions! @hacky_r…
Oct 13
DIY Robocars via Twitter
RT @araffin2: 🏎️ After hours of video editing, I'm happy to share a best of my Twitch videos on learning to race with RL. 🏎️ Each part is…
Oct 13
More…