Quadcopter made up of cylinders/fixed joints causes IMU problems in gazebo9 with lib gazebo_imu_plugin

I’ve posted this to the gazebo forums here

I am working on a quadcopter model. Initially I modified the 3DR Solo model to just change the mesh, inertia, and rotor joints to match my geometry. The aircraft flies fine (other than poorly tuned controller gains).

I wanted the motors modelled, since they currently aren’t in my mesh so I added in 4 cylinders attached to the base with fixed joints. When I do this I get a bunch of IMU problems and the accelerometers reading incorrect values.

> pxh> INFO  [mavlink] partner IP: 127.0.0.1
INFO  [ecl/EKF] EKF aligned, (pressure height, IMU buf: 22, OBS buf: 14)
[Wrn] [GuiIface.cc:120] Failed to get QCocoaScreen for NSObject(0x0)
[Wrn] [Publisher.cc:141] Queue limit reached for topic /gazebo/default/quad_x_custom/motor_speed/3, deleting message. This warning is printed only once.
WARN  [commander] Preflight Fail: Accel Range, hold still on arming
[Wrn] [Publisher.cc:141] Queue limit reached for topic /gazebo/default/quad_x_custom/motor_speed/1, deleting message. This warning is printed only once.
INFO  [ecl/EKF] EKF GPS checks passed (WGS-84 origin set)
INFO  [ecl/EKF] EKF commencing GPS fusion
WARN  [ecl/EKF] EKF baro hgt timeout - reset to baro
WARN  [ecl/EKF] EKF baro hgt timeout - reset to baro
WARN  [ecl/EKF] EKF baro hgt timeout - reset to baro
[Wrn] [Publisher.cc:141] Queue limit reached for topic /gazebo/default/quad_x_custom/motors, deleting message. This warning is printed only once.
[Wrn] [Publisher.cc:141] Queue limit reached for topic /gazebo/default/quad_x_custom/motor_speed/2, deleting message. This warning is printed only once.
WARN  [ecl/EKF] EKF baro hgt timeout - reset to baro
WARN  [ecl/EKF] EKF baro hgt timeout - reset to baro
WARN  [ecl/EKF] EKF baro hgt timeout - reset to baro
WARN  [ecl/EKF] EKF baro hgt timeout - reset to baro
WARN  [ecl/EKF] EKF baro hgt timeout - reset to baro
WARN  [ecl/EKF] EKF baro hgt timeout - reset to baro
px4>sensors status
INFO  [sensors] gyro status:
INFO  [ecl/validation] validator: best: 0, prev best: 0, failsafe: NO (0 events)
INFO  [ecl/validation] sensor #0, prio: 100, state: OK
INFO  [ecl/validation]  val:  -0.0238, lp:  -0.0377 mean dev:   0.0000 RMS:   0.0086 conf:   1.0000
INFO  [ecl/validation]  val:  -0.0310, lp:  -0.0137 mean dev:   0.0001 RMS:   0.0084 conf:   1.0000
INFO  [ecl/validation]  val:  -0.0096, lp:  -0.0122 mean dev:  -0.0001 RMS:   0.0083 conf:   1.0000
INFO  [sensors] accel status:
INFO  [ecl/validation] validator: best: 0, prev best: 0, failsafe: NO (0 events)
INFO  [ecl/validation] sensor #0, prio: 100, state: OK
INFO  [ecl/validation]  val:  -0.0478, lp:   0.0485 mean dev:   0.0037 RMS:   0.1045 conf:   1.0000
INFO  [ecl/validation]  val:  -2.4719, lp:  -2.5461 mean dev:   0.0070 RMS:   0.1087 conf:   1.0000
INFO  [ecl/validation]  val:  -2.4057, lp:  -2.4644 mean dev:   0.1297 RMS:   0.9791 conf:   1.0000

The model that works is almost an exact replica of solo.sdf

Here is the output of sensors status for the working version

pxh> sensors status
INFO  [sensors] gyro status:
INFO  [ecl/validation] validator: best: 0, prev best: 0, failsafe: NO (0 events)
INFO  [ecl/validation] sensor #0, prio: 100, state: OK
INFO  [ecl/validation] 	val:  -0.0258, lp:  -0.0124 mean dev:  -0.0005 RMS:   0.0095 conf:   1.0000
INFO  [ecl/validation] 	val:  -0.0043, lp:  -0.0134 mean dev:   0.0002 RMS:   0.0082 conf:   1.0000
INFO  [ecl/validation] 	val:  -0.0141, lp:  -0.0115 mean dev:  -0.0001 RMS:   0.0087 conf:   1.0000
INFO  [sensors] accel status:
INFO  [ecl/validation] validator: best: 0, prev best: 0, failsafe: NO (0 events)
INFO  [ecl/validation] sensor #0, prio: 100, state: OK
INFO  [ecl/validation] 	val:  -0.6478, lp:  -0.0620 mean dev:   0.0080 RMS:   0.2147 conf:   1.0000
INFO  [ecl/validation] 	val:   0.0436, lp:  -0.0907 mean dev:   0.0294 RMS:   0.3506 conf:   1.0000
INFO  [ecl/validation] 	val:  -9.7967, lp:  -9.8908 mean dev:   0.0672 RMS:   0.8262 conf:   1.0000

It break when I add cylinders as motors (base_link->fixed_joint->motor0) and then raise the rotors 1cm and change the revolute joints (motor0->revolute_joint->rotor0)

The IMU reads incorrect z-axis acceleration and I get those EKF errors. I can post my model.sdf but I was hitting the character limit for the post.