Custom CAD model in SITL

I’ve modelled a custom hexacopter that includes a protruding attachment (as shown in the image). I’m trying to simulate it in PX4 SITL using Gazebo Harmonic (make px4_sitl my_hexacopter).

Here’s what I’ve done so far:

  1. Converted the CAD model to URDF, and then from URDF to SDF.
  2. Created and placed all the STL meshes properly.
  3. Made a custom airframe file and updated the CMakeLists accordingly.

Despite these steps, I’m still running into several issues during simulation.
I’m not very proficient with SDF files and might be missing some important components or configurations. Since this is a completely custom model (not derived from any existing PX4/Gazebo UAV), there’s a lot of trial and error involved.

  1. I’ve seen some suggestions about attaching a custom structure to an existing drone model, but that approach doesn’t quite fit my case:There isn’t an existing hexacopter model in the PX4 Gazebo Harmonic setup to use as a base.
  2. My model’s geometry and weight distribution are quite different because of the protruding attachment, so simply mounting it on a quadcopter or another existing model wouldn’t reflect its actual dynamics.
  3. I’d also need to redesign the mounting mechanism and adjust dimensions to match any chosen reference model — but I don’t know how to find or extract the reference dimensions. For example, I’m not sure what the real-world dimensions of the “x500” drone model are, so I can’t accurately modify my attachment to fit it.