Custom Startup Script in UAV Toolbox Support Package for PX4 Autopilots
The Hardware Setup process of UAV Toolbox Support Package for PX4® Autopilots contains a step that enables the usage of a custom startup script. This startup script, which needs to be copied to the micro-SD card to be mounted on the Pixhawk® Series flight controllers, helps in:
Enabling or disabling the default PX4 modules as per the support package capabilities
Avoiding interference with other default PX4 controller modules
Preparing the PX4 Autopilot hardware to run the application generated by Simulink®
For details about using this script, see Performing PX4 System Startup from SD Card.
Modules Enabled Using Custom Startup Script
The UAV Toolbox Support Package for PX4 Autopilots uses the custom startup script to enable some of the important modules.
The following table lists the modules that are enabled during the system startup from SD card.
PX4 Modules Enabled Using Custom Startup Script | Usage |
---|---|
uORB | Enables uORB message bus communication |
px4io | Starts the firmware in IO processor of PX4 Autopilot and it is responsible for Main PWM Output |
fmu | Generating AUX PWM outputs |
ekf2 | Estimator that outputs vehicle attitude |
sensors | The sensors module reads the onboard sensors values and publishes data over uORB message bus |
mtd and param | Loading and reading parameter |
px4_simulink_app | The Simulink generated code that is integrated in PX4 Firmware as a separate module |
Modules Disabled Using Custom Startup Script
The UAV Toolbox Support Package for PX4 Autopilots uses the custom startup script to disable few modules.
The following table lists few modules that are disabled at startup.
PX4 Modules Disabled at Startup | Reason for Disabling |
---|---|
Position Controller Attitude & Rate Controller | The support package enables you to design the controller and hence the default Controller module in PX4 is disabled. |
Commander | The default Commander module is disabled to avoid possible interference with controller algorithm |
Navigator | The default Navigator module is disabled to avoid possible interference with controller algorithm |
MAVLink | The default serial port of MAVLink communication is the USB port of PX4 Autopilot. The MAVLink modules are disabled during startup to enable out-of-the-box External Mode support from Simulink, which uses the same USB port. |
However, you can enable MAVLink while configuring the Simulink model. For details, see Enabling MAVLink in PX4 Over USB.
To understand the impact of disabling the modules, see Impact of Disabling MAVLink, Commander, and Navigator Modules.