Tutorials & Guides
How to set up an ARM cross-compiler toolchain for macOS
Here’s how to create your own, shiny ARM gcc cross-compile toolchain for your Mac.
Tutorials & Guides
Here’s how to create your own, shiny ARM gcc cross-compile toolchain for your Mac.
If you have programmed Ardupilot and now you switch to PX4, you would really appreciate how easy it is to implement a new flight mode in Ardupilot... PX4 is really good if you just want to write an App to do something, but implementing a new flight mode actually requires a lot of digging around
There are two ways to analyze your PX4 flight as I know, the ".px4log" file generated by PX4, and the ".mavlink" file generated by QGroundControl. 1. ".px4log" with FlightPlot The ".px4log" format is the log file format stored onto the SD card by PX4. The application that performs this logging is "sdlog2". The log files
In most cases, Software In the Loop (SITL) is sufficient for testing your flight controller code. But in other cases, you may want to use Hardware In the Loop (HITL) simulation to validate that your code can actually run on a controller board. The HITL differs from SITL in a few ways: All sensor raw
"mc_att_control" is responsible for PX4 multicopter attitude control, this application can be found in "Firmware/src/modules/mc_att_control". Here is what I understand about this application. Start Similar to "mc_pos_control", this application is started by script "rc.mc_apps" on line 32: rc.mc_apps Call Hierarchy The source code for the application exists in "mc_att_control_main.cpp", it follows a very
The application responsible for multicopter position control exists in "Firmware/src/modules/mc_pos_control". I will describe what I understand about this application as much as I can in this blog. Start The application is started by the script "rc.mc_apps" in "Firmware/ROMFS/px4fmu_common/init.d". The script itself is called by the main starting script "rcS" at line 761. Since "rc.mc_apps" is
Testing development code on a flying platform is always risky, one small bug in the code could cause your beloved airframe go straight into the bin. To avoid that, always check your code stability in simulation. And the PX4 Software In the Loop (SIL) simulation is the perfect solution. SIL uses your computer hardware to
If you have done Ardupilot or Arduino source code development, the first thing you do when you clone source code from Github is probably looking for the main function. This is exactly what I did. I spent about 2 weeks looking for a main function, hoping to stumble across something that initializes everything, execute commands
Being able to connect to PX4 via Serial is essential for development. It allows you to run individual apps in PX4 and it provides a straight forward interface for debugging. I have successfully connected to a HK Pilot 32 using a FTDI breakout adapter in Ubuntu, and here is how I did it. A quick
The best development environment for PX4 is using Eclipse as IDE in Ubuntu. There are also many other ways to do it. I have included in this log what is working for me and how to do it. A quick summary: Install PX4 toolchain Install ninja build system (optional) Clone PX4 source code from Github