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 @a1k0n: Did I get rid of hand-tuned parameters? Yes. Am I still hand-tuning more parameters? Also yes. I have a few knobs to address the…
Monday
DIY Robocars via Twitter
RT @a1k0n: I'm not going to spoil it, but (after charging the battery) this works way better than it has any right to. The car is now faste…
Monday
DIY Robocars via Twitter
RT @a1k0n: Decided to just see what happens if I run the sim-trained neural net on the car, with some safety rails around max throttle slew…
Monday
DIY Robocars via Twitter
Saturday
DIY Robocars via Twitter
RT @SmallpixelCar: @a1k0n @diyrobocars I learned from this. This is my speed profile. Looks like I am too conservative on the right side of…
Saturday
DIY Robocars via Twitter
RT @a1k0n: @SmallpixelCar @diyrobocars Dot color is speed; brighter is faster. Yeah, it has less room to explore in the tighter part, and t…
Saturday
DIY Robocars via Twitter
RT @a1k0n: I'm gonna try to do proper offline reinforcement learning for @diyrobocars and throw away all my manual parameter tuning for the…
Friday
DIY Robocars via Twitter
RT @circuitlaunch: DIY Robocars & Brazilian BBQ - Sat 10/1. Our track combines hairpin curves with an intersection for max danger. Take tha…
Sep 22
DIY Robocars via Twitter
RT @SmallpixelCar: Had an great test today on @RAMS_RC_Club track. However the car starts to drift at 40mph. Some experts recommended to ch…
Sep 11
DIY Robocars via Twitter
RT @gclue_akira: 世界最速 チームtamiyaのaiカー https://t.co/1Qq2zOeftG
Sep 10
DIY Robocars via Twitter
RT @DanielChiaJH: Always a good time working on my @diyrobocars car at @circuitlaunch. Still got some work to do if I’m to beat @a1k0n howe…
Sep 10
DIY Robocars via Twitter
RT @SmallpixelCar: My new speed profile for @RAMS_RC_Club track https://t.co/RtLb7TcgIJ
Sep 10
DIY Robocars via Twitter
RT @SmallpixelCar: Practiced at @RAMS_RC_Club today with my new @ARRMARC car https://t.co/AEu2hCx89T
Aug 28
DIY Robocars via Twitter
Aug 24
DIY Robocars via Twitter
RT @gclue_akira: 柏の葉で走行させてるjetracerの中身 #instantNeRF #jetracer https://t.co/giVvuE4hP7
Jul 4
DIY Robocars via Twitter
Cool web-based self-driving simulator. Click save when the AI does the right thing https://github.com/pncsoares/self-driving-car
Jul 4
More…