QGroundControl comes packaged with the most recent stable versions of ArduPilot and can flash them to the Pixhawk. Instructions for flashing default firmware can be found here.
ArduSub supports custom motor layouts called frames. In order to do this:
- Add the frame to AP_Motors6DOF.cpp
- This can be found in
Ardupilot/libraries\AP_Motors\AP_Motors6DOF.cpp
- Search for SUB_FRAME_CUSTOM and your motor there following this template
- Uncomment the break statement after the added commands
- This can be found in
- Compile the firmware and upload it to the Pixhawk
- Use QGroundControl to set the FRAME_CONFIG parameter to
custom
More information can be found here but this page is specifically for the Blue Robotics version of ArduSub which is significantly behind the ArduPilot version.
First, follow the setup instructions here. Then, follow instructions here to build the firmware. the The Pixhawk will most likely work best using the px4-v3 board.
We had issues with the setup script given by ArduPilot not working because there was a repository that failed to install halfway through. Because of this we had to download the gcc-arm cross compiler from here and follow the instructions here to get the compiler to work. Make sure to download the exact version referenced in the instructions. After that we had to install genromfs and empy by running
sudo apt-get install genromfs python-empy
If you already failed to build the firmware before make sure to run ./waf clean
before trying again because sometimes the previously cached build will cause problems.