Hi, I’m using Gazebo simulator for SITL. Recently I found that the value of the barometer and the magnetometer is totally wrong. I used rostopic echo to see the value.
Whether the IRIS model goes up or down, the value of /mavros/atm_presure is always zero like below.
---
header:
seq: 5549
stamp:
secs: 1509173803
nsecs: 913831600
frame_id: base_link
fluid_pressure: 0.0
variance: 0.0
---
header:
seq: 5550
stamp:
secs: 1509173803
nsecs: 936330600
frame_id: base_link
fluid_pressure: 0.0
variance: 0.0
---
header:
seq: 5551
stamp:
secs: 1509173803
nsecs: 953833720
frame_id: base_link
fluid_pressure: 0.0
variance: 0.0
---
header:
seq: 5552
stamp:
secs: 1509173803
nsecs: 983835720
frame_id: base_link
fluid_pressure: 0.0
variance: 0.0
---
header:
seq: 5553
stamp:
secs: 1509173804
nsecs: 3833720
frame_id: base_link
fluid_pressure: 0.0
variance: 0.0
---
header:
seq: 5554
stamp:
secs: 1509173804
nsecs: 23832720
frame_id: base_link
fluid_pressure: 0.0
variance: 0.0
---
header:
seq: 5555
stamp:
secs: 1509173804
nsecs: 56334952
frame_id: base_link
fluid_pressure: 0.0
variance: 0.0
---
header:
seq: 5556
stamp:
secs: 1509173804
nsecs: 76333952
frame_id: base_link
fluid_pressure: 0.0
variance: 0.0
---
Also, the value of the /mavros/mag is always very small like below.
---
header:
seq: 6772
stamp:
secs: 1509173742
nsecs: 156332720
frame_id: base_link
magnetic_field:
x: -3.53058543988e-07
y: 2.16512322426e-05
z: 4.32430148125e-05
magnetic_field_covariance: [-1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]
---
header:
seq: 6773
stamp:
secs: 1509173742
nsecs: 166333720
frame_id: base_link
magnetic_field:
x: -1.27962669358e-06
y: 2.20302283764e-05
z: 4.28217947483e-05
magnetic_field_covariance: [-1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]
---
header:
seq: 6774
stamp:
secs: 1509173742
nsecs: 176331720
frame_id: base_link
magnetic_field:
x: -2.2318450734e-06
y: 2.36665427685e-05
z: 4.30926203728e-05
magnetic_field_covariance: [-1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]
---
header:
seq: 6775
stamp:
secs: 1509173742
nsecs: 183834720
frame_id: base_link
magnetic_field:
x: -1.13077359274e-06
y: 2.19618141651e-05
z: 4.25885289907e-05
magnetic_field_covariance: [-1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]
---
Of course, the local position (/mavros/local_position/pose) is very good. Does posix_sitl_default not use barometer and magnetometer sensor modules?