diff --git a/src/AirSpeedSensor.cc b/src/AirSpeedSensor.cc index 741274ff..ef267a81 100644 --- a/src/AirSpeedSensor.cc +++ b/src/AirSpeedSensor.cc @@ -20,7 +20,7 @@ #pragma warning(disable: 4005) #pragma warning(disable: 4251) #endif -#include +#include #if defined(_MSC_VER) #pragma warning(pop) #endif @@ -113,7 +113,7 @@ bool AirSpeedSensor::Load(const sdf::Sensor &_sdf) this->SetTopic("/air_speed"); this->dataPtr->pub = - this->dataPtr->node.Advertise( + this->dataPtr->node.Advertise( this->Topic()); if (!this->dataPtr->pub) @@ -155,7 +155,7 @@ bool AirSpeedSensor::Update( return false; } - msgs::AirSpeedSensor msg; + msgs::AirSpeed msg; *msg.mutable_header()->mutable_stamp() = msgs::Convert(_now); auto frame = msg.mutable_header()->add_data(); frame->set_key("frame_id"); @@ -185,7 +185,6 @@ bool AirSpeedSensor::Update( diff_pressure = this->dataPtr->noises[AIR_SPEED_NOISE_PASCALS]->Apply( diff_pressure); - msg.mutable_pressure_noise()->set_type(msgs::SensorNoise::GAUSSIAN); } msg.set_diff_pressure(diff_pressure * 100.0f); diff --git a/test/integration/air_speed.cc b/test/integration/air_speed.cc index 59b0d630..e7b23682 100644 --- a/test/integration/air_speed.cc +++ b/test/integration/air_speed.cc @@ -184,7 +184,7 @@ TEST_F(AirSpeedSensorTest, SensorReadings) gz::math::Pose3d(0, 0, 1.5, 0, 0, 0) * sensorNoise->Pose()); // verify msg received on the topic - WaitForMessageTestHelper msgHelper(topic); + WaitForMessageTestHelper msgHelper(topic); EXPECT_TRUE(sensor->HasConnections()); sensor->Update(std::chrono::steady_clock::duration(std::chrono::seconds(1))); EXPECT_TRUE(msgHelper.WaitForMessage()) << msgHelper; @@ -195,7 +195,7 @@ TEST_F(AirSpeedSensorTest, SensorReadings) EXPECT_DOUBLE_EQ(288.1369934082031, msg.temperature()); // verify msg with noise received on the topic - WaitForMessageTestHelper + WaitForMessageTestHelper msgHelperNoise(topicNoise); sensorNoise->Update(std::chrono::steady_clock::duration( std::chrono::seconds(1)), false);