I understand this may be a px4 issue and I'll post it to their forums, but I'm wondering if anyone knows what I am doing wrong.
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
Here is the model that works:
0 0 0 0 0 1.57 0 0 0 0 0 0 0.320 0.000785 0 0 0.00101 0 0.001779 0 0 -0.04 0 0 0 0.32 0.32 0.18 0.001 0 0 0 0 0 0 0 1 1 1 model://quad_x_custom/meshes/quad_x_custom.stl 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0.015 1e-05 0 0 1e-05 0 1e-05 imu_link base_link 1 0 0 0 0 0 0 0 0 1 .360 0.0002041 0 0 0.0009354 0 0.0009354 0 -0 0 0 0 0 0 -0 -0.0275 0 -0 0 1 0 0 0 0 -0 0 0 -0 0 0.1 0.035 0.035 1 0.3 0.3 0.3 1 0.7 0.7 0.7 1 0.01 0.01 0.01 1 0 0 0 1 0 1 0 10 0 -0 0 0 -0 0 0.1 0.035 0.035 base_link battery 0 0 -0.0275 0 -0 0 0.1 -0.1 0.02 0 0 0 0 0 0 0 0 0 0.005 9.75e-07 0 0 0.000273104 0 0.000274004 0 0 0 0 0 0 0.005 0.0635 0 0 0 0 0 0 1 1 1 model://quad_x_custom/meshes/prop_ccw.stl 1 0 rotor_0 base_link 0 0 1 -1e+16 1e+16 0 0 1 -0.1 0.1 0.02 0 0 0 0 0 0 0 0 0 0.005 9.75e-07 0 0 0.000273104 0 0.000274004 0 0 0 0 0 0 0.005 0.0635 0 0 0 0 0 0 1 1 1 model://quad_x_custom/meshes/prop_ccw.stl 1 0 rotor_1 base_link 0 0 1 -1e+16 1e+16 0 0 1 0.1 0.1 0.02 0 0 0 0 0 0 0 0 0 0.005 9.75e-07 0 0 0.000273104 0 0.000274004 0 0 0 0 0 0 0.005 0.0635 0 0 0 0 0 0 1 1 1 model://quad_x_custom/meshes/prop_cw.stl 1 0 rotor_2 base_link 0 0 1 -1e+16 1e+16 0 0 1 -0.1 -0.1 0.02 0 0 0 0 0 0 0 0 0 0.005 9.75e-07 0 0 0.000273104 0 0.000274004 0 0 0 0 0 0 0.005 0.0635 0 0 0 0 0 0 1 1 1 model://quad_x_custom/meshes/prop_cw.stl 1 0 rotor_3 base_link 0 0 1 -1e+16 1e+16 0 0 1 base_link 10 rotor_0_joint rotor_0 ccw 0.0125 0.025 1500 8.54858e-06 0.06 /gazebo/command/motor_speed 0 0.000806428 1e-06 /motor_speed/0 10 rotor_1_joint rotor_1 ccw 0.0125 0.025 1500 8.54858e-06 0.06 /gazebo/command/motor_speed 1 0.000806428 1e-06 /motor_speed/1 10 rotor_2_joint rotor_2 cw 0.0125 0.025 1500 8.54858e-06 0.06 /gazebo/command/motor_speed 2 0.000806428 1e-06 /motor_speed/2 10 rotor_3_joint rotor_3 cw 0.0125 0.025 1500 8.54858e-06 0.06 /gazebo/command/motor_speed 3 0.000806428 1e-06 /motor_speed/3 10 true /imu /gps INADDR_ANY 14560 false /dev/ttyACM0 921600 INADDR_ANY 14550 false false /gazebo/command/motor_speed 0 0 1200 0 100 velocity 1 0 1200 0 100 velocity 2 0 1200 0 100 velocity 3 0 1200 0 100 velocity 0 imu_link /imu 0.0003394 3.8785e-05 1000.0 0.0087 0.004 0.006 300.0 0.196
When I add "motors" as fixed joints it doesn't work:
0 1 0 0 0 0 -0 0 0 0 0 0 -0 0 0.32 0.000785 0 0 0.00101 0 0.001779 1 0 0 0 0 0 0 0 -0 0 1 1 1 model://quad_x_custom/meshes/quad_x_custom.stl 0 1 0 10 0 0 -0.04 0 -0 0 0.32 0.32 0.18 0.36 0.0002041 0 0 0.0009354 0 0.0009354 0 -0 0 0 -0 0 -0 0 -0.0275 0 -0 0 1 0 0 0 0 -0 0 0 -0 0 0.1 0.035 0.035 1 __default__ 0.3 0.3 0.3 1 0.7 0.7 0.7 1 0.01 0.01 0.01 1 0 0 0 1 0 1 0 10 0 0 0 0 -0 0 0.1 0.035 0.035 base_link battery 0 0 -0.0275 0 -0 0 0 0.2 0 0.2 0 0 0 0 -0 0 0 0 0 0 -0 0 0.015 1e-05 0 0 1e-05 0 1e-05 0 0 0 base_link imu_link 0 0 0 0 -0 0 1 0 0 1 0 0 0 0 0 0 0 0 0 0.2 0 0.2 0.07 0.00013125 0 0 0.00013125 0 0.0001125 0 0 0 0 -0 0 0.1 -0.1 -0 0 -0 0 1 0 0 0 0 0 0.015 0 -0 0 0.013 0.015 1 __default__ 0.3 0.3 0.3 1 0.7 0.7 0.7 1 0.01 0.01 0.01 1 0 0 0 1 0 1 0 10 0 0 0 0 -0 0 0.013 0.015 base_link motor_0 0.1 -0.1 0.02 0 -0 0 0 0.2 0 0.2 0.07 0.00013125 0 0 0.00013125 0 0.0001125 0 0 0 0 -0 0 -0.1 0.1 -0 0 -0 0 1 0 0 0 0 0 0.015 0 -0 0 0.013 0.015 1 __default__ 0.3 0.3 0.3 1 0.7 0.7 0.7 1 0.01 0.01 0.01 1 0 0 0 1 0 1 0 10 0 0 0 0 -0 0 0.013 0.015 base_link motor_1 -0.1 0.1 0.02 0 -0 0 0 0.2 0 0.2 0.07 0.00013125 0 0 0.00013125 0 0.0001125 0 0 0 0 -0 0 0.1 0.1 -0 0 -0 0 1 0 0 0 0 0 0.015 0 -0 0 0.013 0.015 1 __default__ 0.3 0.3 0.3 1 0.7 0.7 0.7 1 0.01 0.01 0.01 1 0 0 0 1 0 1 0 10 0 0 0 0 -0 0 0.012 0.015 base_link motor_2 0.1 0.1 0.02 0 -0 0 0 0.2 0 0.2 0.07 0.00013125 0 0 0.00013125 0 0.0001125 0 0 0 0 -0 0 -0.1 -0.1 -0 0 -0 0 1 0 0 0 0 0 0.015 0 -0 0 0.013 0.015 1 __default__ 0.3 0.3 0.3 1 0.7 0.7 0.7 1 0.01 0.01 0.01 1 0 0 0 1 0 1 0 10 0 0 0 0 -0 0 0.013 0.015 base_link motor_3 -0.1 -0.1 0.02 0 -0 0 0 0.2 0 0.2 0.1 -0.1 0.025 0 -0 0 0 0 0 0 -0 0 0.005 9.75e-07 0 0 0.000273104 0 0.000274004 1 0 0 0 0 0 0 0 -0 0 1 1 1 model://quad_x_custom/meshes/prop_ccw.stl 0 1 0 10 0 0 0 0 -0 0 0.0635 0.005 -0.1 0.1 0.025 0 -0 0 0 0 0 0 -0 0 0.005 9.75e-07 0 0 0.000273104 0 0.000274004 1 0 0 0 0 0 0 0 -0 0 1 1 1 model://quad_x_custom/meshes/prop_ccw.stl 0 1 0 10 0 0 0 0 -0 0 0.0635 0.005 0.1 0.1 0.025 0 -0 0 0 0 0 0 -0 0 0.005 9.75e-07 0 0 0.000273104 0 0.000274004 1 0 0 0 0 0 0 0 -0 0 1 1 1 model://quad_x_custom/meshes/prop_cw.stl 0 1 0 10 0 0 0 0 -0 0 0.0635 0.005 -0.1 -0.1 0.025 0 -0 0 0 0 0 0 -0 0 0.005 9.75e-07 0 0 0.000273104 0 0.000274004 1 0 0 0 0 0 0 0 -0 0 1 1 1 model://quad_x_custom/meshes/prop_cw.stl 0 1 0 10 0 0 0 0 -0 0 0.0635 0.005 motor_0 rotor_0 0 0 0 0 -0 0 0 0 1 1 -1e+16 1e+16 -1 -1 0 0 0 0 0 0.2 0 0.2 motor_1 rotor_1 0 0 0 0 -0 0 0 0 1 1 -1e+16 1e+16 -1 -1 0 0 0 0 0 0.2 0 0.2 motor_2 rotor_2 0 0 0 0 -0 0 0 0 1 1 -1e+16 1e+16 -1 -1 0 0 0 0 0 0.2 0 0.2 motor_3 rotor_3 0 0 0 0 -0 0 0 0 1 1 -1e+16 1e+16 -1 -1 0 0 0 0 0 0.2 0 0.2 rotor_1_joint rotor_1 ccw 0.0125 0.025 1500 8.54858e-06 0.06 /gazebo/command/motor_speed 1 0.000806428 1e-06 /motor_speed/1 10 rotor_3_joint rotor_3 cw 0.0125 0.025 1500 8.54858e-06 0.06 /gazebo/command/motor_speed 3 0.000806428 1e-06 /motor_speed/3 10 rotor_2_joint rotor_2 cw 0.0125 0.025 1500 8.54858e-06 0.06 /gazebo/command/motor_speed 2 0.000806428 1e-06 /motor_speed/2 10 rotor_0_joint rotor_0 ccw 0.0125 0.025 1500 8.54858e-06 0.06 /gazebo/command/motor_speed 0 0.000806428 1e-06 /motor_speed/0 10 imu_link /imu 0.0003394 3.8785e-05 1000.0 0.0087 0.004 0.006 300.0 0.196 1 /imu /gps INADDR_ANY 14560 0 /dev/ttyACM0 921600 INADDR_ANY 14550 0 0 /gazebo/command/motor_speed 0 0 1200 0 100 velocity 1 0 1200 0 100 velocity 2 0 1200 0 100 velocity 3 0 1200 0 100 velocity base_link 10
↧