In SITL they’re auto-detected based on the model name. I’m not sure if you’re using a custom model or one of the provided ones. There was some discussion a while back on this. Here is an issue that talks about this, starting at a relevant comment. Read that one and the ones following. https://github.com/PX4/Devguide/issues/398#issuecomment-426109047
I had a customized iris model with depth camera and 2D LIDAR sensors, and I can confirm that I am able to simulate it in Gazebo with ROS interface. I followed steps similar to ones in the issue linked above and I summarize it here.
I copied the customized model to Firmware/Tools/sitl_gazebo/models/<model_name>
Created a startup file in Firmware/ROMFS/px4fmu_common/init.d-posix/xxxx_<model_name> . xxxx is a unique ID that does not start with 0’s (e.g. 10017_<model_name>)
Can you give the file list which needs to be changed in order to fly a custom airframe ?
For simulations, I have
i) Added a my_vehicle folder in Firmware/Tools/sitl_gazebo/models - added a config file and a sdf file in this folder
ii) Created an airframe file under ROMFS/px4fmu_common/init.d-posix with 4229_my_vehicle name
iii)Add the airframe name (my_vehicle) to the file platforms/posix/cmake/sitl_target.cmake in the command set(models … )
Now, which files need to be changed for actually implementing the code in pixhawk?