Skip to content

Commit

Permalink
Fix failing AHRS tests
Browse files Browse the repository at this point in the history
Signed-off-by: Michel Hidalgo <michel@ekumenlabs.com>
  • Loading branch information
hidmic committed Mar 15, 2022
1 parent 200e5da commit 9aa5300
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
10 changes: 5 additions & 5 deletions lrauv_ignition_plugins/test/test_ahrs.cc
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,10 @@ class AhrsTest : public ::testing::Test
"worlds", "buoyant_tethys.sdf"));

this->node.Subscribe(
"/model/tethys/ahrs/imu", &AhrsTest::OnImuMessage, this);
"/tethys/ahrs/imu", &AhrsTest::OnImuMessage, this);

this->node.Subscribe(
"/model/tethys/ahrs/magnetometer",
"/tethys/ahrs/magnetometer",
&AhrsTest::OnMagnetometerMessage, this);

this->fixture->OnConfigure(
Expand Down Expand Up @@ -194,9 +194,9 @@ class AhrsTest : public ::testing::Test
// Acceleration due to gravity
static constexpr double g0{9.8}; // m/s^2
// Earth magnetic field
static constexpr double Be{6.0e-6}; // T
static constexpr double Bn{2.3e-5}; // T
static constexpr double Bu{-4.2e-5}; // T
static constexpr double Be{5.5645e-6}; // T
static constexpr double Bn{22.8758e-6}; // T
static constexpr double Bu{-42.3884e-6}; // T

static constexpr double angularVelocityTolerance{1e-4};
static constexpr double linearAccelerationTolerance{1e-4};
Expand Down
3 changes: 3 additions & 0 deletions lrauv_ignition_plugins/worlds/buoyant_tethys.sdf
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,9 @@
<elevation>0</elevation>
<heading_deg>0</heading_deg>
</spherical_coordinates>
<!-- Brought from https://github.com/ignitionrobotics/sdformat/blob/1acea10dab1cf0c3fa2583f3e2bfd0a8d14ea340/src/World.cc#L75-L76 -->
<magnetic_field>5.5645e-6 22.8758e-6 -42.3884e-6</magnetic_field>

<plugin
filename="ScienceSensorsSystem"
name="tethys::ScienceSensorsSystem">
Expand Down

0 comments on commit 9aa5300

Please sign in to comment.