element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet & Tria Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • About Us
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      • Japan
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Vietnam
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Sci Fi Your Pi
  • Challenges & Projects
  • Design Challenges
  • Sci Fi Your Pi
  • More
  • Cancel
Sci Fi Your Pi
Blog TrainingSphere - 5 - Building APM
  • Blog
  • Forum
  • Documents
  • Files
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: amgalbu
  • Date Created: 9 Jul 2015 3:31 PM Date Created
  • Views 390 views
  • Likes 2 likes
  • Comments 1 comment
  • apm
  • raspberry-pi
  • sci_fi_your_pi
  • training_sphere
Related
Recommended

TrainingSphere - 5 - Building APM

amgalbu
amgalbu
9 Jul 2015

Building APM


Since I expect I will have to make some changes to the code, I will now try to build APM fro source code. Working repository for Navio APM port is on GitHub.

I decided to build APM directly on your Raspberry Pi since it does not require to setup a cross-compiling environment and Raspberry Pi has enough computing power to make this step fast enough


Download the APM’s port for Navio:


git clone https://github.com/emlid/ardupilot.git


Switch to the 'navio' branch:

git checkout navio


Navigate to the autopilot’s directory, for example rover, run configuration and build it:

cd ardupilot/ArduCopter
make configure
make navio-heli


I'm not sure the heli configuration fits my needs, but I will try a build with this configuration, then I will change the makefile. Many other frames are supported. To build for other frame types replace heli with one of the following options:

quad tri hexa y6 octa octa-quad heli single obc nologging

 

Executable file will be placed in /tmp/APMcopter.build directory. Copy the binary from tmp directory to your home folder:

cp /tmp/APMcopter.build/APMcopter.elf /home/pi/APMcopter.elf

 

Running APM

To run APM use the following (change APMrover2.elf to ArduCopter.elf or ArduPlane.elf if needed):


sudo ./APMcopter.elf -A udp:192.168.1.2:14550


Where 192.168.1.2 is the IP address of the device with the Ground Control Station – your laptop, smartphone etc.

 

Arguments specify serial ports (TCP or UDP can be used instead of serial ports) :

  • -A is for telemetry
  • -B is for external GPS
  • -C is for secondary telemetry

If you would like to transfer secondary telemetry over the UART port on Navio you can specify it like this:

 

sudo ./APMcopter.elf -A udp:192.168.1.2:14550 -C /dev/ttyAMA0

Autostarting APM on boot

To automatically start APM on boot add the following (change -A and -C options to suit your setup) to /etc/rc.local file on your Raspberry Pi:


sudo /home/pi/APMcopter.elf -A udp:192.168.1.2:14550 -C /dev/ttyAMA0 > /home/pi/startup_log &


  • Sign in to reply
  • balearicdynamics
    balearicdynamics over 10 years ago

    Hi Ambrogio,

     

    nice post, things start assuming always more consistence ... Do you plan to put somewhere on a repo also the customised versions of your packages?

     

    Enrico

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube