Problem when setting up Gazebo for coordinated transportation using nested model

Hi,
I try to setup Gazebo simulator for multi-uav coordinated transportation. I use the nested model as my main framework, and put several uav as the sub model in the sdf file so that I can make joint between each iris and each attachment of rod. The sdf file looks like this (A standard nested model structure).
model name = ‘payload_rod’
… link name = ‘link_0’
… …
… /link
… model name = ‘uav_1’
… … (link, joint, plugin)
… /model
… model name = ‘uav_2’
… … (link, joint, plugin)
… /model
.
.
… joint name = ‘rod_uav1’, type=“ball”
… parent link_0 /parent
… child uav_1::base_link /child
… pose relative pose to payload_rod /pose
… /joint
/model

The problem now is when I use this structure, the uav cannot be controlled normally. I monitored the gps data from mavros, they change weirdly. When I hit the takeoff buttton, the iris will go straight up and never stop increasing.
However, if I switch the position of uav and the payload_rod, let’s say like this (one uav, one payload case):
model name = ‘uav_1’
… link name = ‘base_link’
… /link
… . ( other links and joint and plugin here)
… .
… model name = ‘payload_rod’
… link_name = ‘link_0’
… /link
… /model
… joint name = ‘rod_uav1’, type=“ball”
… parent base_link /parent
… child payload_rod::link_0 /child
… pose relative pose to payload_rod /pose
… /joint
/model
It works well, I can takeoff the whole combination through mavros, and see the rod swing, the iris can also follow my setpoint position, all through my mavros command. I use almost the same iris sdf file as in the px4 Firmware, which includes base_link, /imu_link, several rotor_link and plugins,(motors, gps, imu, mavlink). Difference iris has different mavlink_udp port number.

I don’t know how to make my first framework file work. otherwise I couldn’t attach the payload_rod for each iris. I’m guessing When I put iris as the sub-model, is it possible the plugins be overwritten. Or, is it possible the gps and imu sensors try to sense the whole combination instead of a single iris? How to make it possible to separately control each iris? Can I assign each sensor’s working scope?

Hope someone can help!
Thanks!

Hi @aero_gjy, did you ever manage to find a solution to this? I’m now having the same problem a few years later… here’s where I’m at.

Edit: I’ve solved this problem now - solution is documented on the above link.