Background
I am trying to work with a custom airframe on the PX4. I am relatively new to the PX4 framework and all, so I have used the iris
airframe as the base of my new custom airframe. I have a few references on how to do this but I mainly follow this discussion and the steps from @antonerasm. However, I believe these steps are outdated for the current version of PX4 repo.
Current State
Following the steps, I have managed to:
- Create a new model folder in
PX4-Autopilot\Tools\simulation\gazebo-classic\sitl_gazebo-classic\models\my_airframe
- Created both
.sdf
and.config
files formy_airframe
. (copied contents of.sdf
file fromiris
and changed all occurences ofiris
withmy_airframe
) - Created an airframe file in
ROMFS/px4fmu_common/init.d-posix
with the name2021_gazebo-classic_my_airframe
- Added the airframe into the
CmakeLists.txt
file in the same folder - Added the
my_airframe
model to thesitl_target.cmake
file inPX4-Autopilot\src\modules\simulation\simulator_mavlink
. (From this reference)
Problem
When launching the SITL using sudo make px4_sitl gazebo-classic_my_airframe
, I encounter this issue.
______ __ __ ___
| ___ \ \ \ / / / |
| |_/ / \ V / / /| |
| __/ / \ / /_| |
| | / /^\ \ \___ |
\_| \/ \/ |_/
px4 starting.
INFO [px4] startup script: /bin/sh etc/init.d-posix/rcS 0
INFO [init] found model autostart file as SYS_AUTOSTART=2021
INFO [param] selected parameter default file parameters.bson
INFO [param] importing from 'parameters.bson'
INFO [parameters] BSON document size 274 bytes, decoded 274 bytes (INT32:11, FLOAT:3)
INFO [param] selected parameter backup file parameters_backup.bson
SYS_AUTOCONFIG: curr: 0 -> new: 1
+ SYS_AUTOSTART: curr: 10015 -> new: 2021
* SENS_BOARD_X_OFF: curr: 0.0000 -> new: 0.0000
* SENS_DPRES_OFF: curr: 0.0000 -> new: 0.0010
etc/init.d-posix/rcS: 9: /home/arief_ak/PX4-Autopilot/build/px4_sitl_default/rootfs/etc/init.d-posix/airframes/2021_gazebo-cla: not foundframe:
etc/init.d-posix/rcS: 10: .: Can't open /home/arief_ak/PX4-Autopilot/build/px4_sitl_default/rootfs/etc/init.d/rc.mc_defaults
ERROR [px4] Startup script returned with return value: 32512
For this error message:
etc/init.d-posix/rcS: 9: /home/arief_ak/PX4-Autopilot/build/px4_sitl_default/rootfs/etc/init.d-posix/airframes/2021_gazebo-cla: not foundframe:
I checked and the airframe is in the folder.
For this error message:
etc/init.d-posix/rcS: 10: .: Can't open /home/arief_ak/PX4-Autopilot/build/px4_sitl_default/rootfs/etc/init.d/rc.mc_defaults
I have no clue why this issue persists.
I was hoping that I could get some support on this.
Any help would be appreciated.
Arief.