Skip to content

Commit

Permalink
Variance isn't supported in humble
Browse files Browse the repository at this point in the history
  • Loading branch information
bmagyar authored Sep 8, 2023
1 parent 71d4888 commit c6413d5
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 8 deletions.
1 change: 0 additions & 1 deletion range_sensor_broadcaster/src/range_sensor_broadcaster.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ controller_interface::CallbackReturn RangeSensorBroadcaster::on_configure(
realtime_publisher_->msg_.field_of_view = params_.field_of_view;
realtime_publisher_->msg_.min_range = params_.min_range;
realtime_publisher_->msg_.max_range = params_.max_range;
realtime_publisher_->msg_.variance = params_.variance;
realtime_publisher_->unlock();

RCLCPP_DEBUG(get_node()->get_logger(), "configure successful");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,3 @@ range_sensor_broadcaster:
field_of_view: {type: double, default_value: 0.52, description: "The size of the arc that the distance reading is valid for [rad]",}
min_range: {type: double, default_value: 0.52, description: "Minimum range value [m]",}
max_range: {type: double, default_value: 4.0, description: "Maximum range value [m]",}
variance: {type: double, default_value: 0.0, description: "Variance of the range value",}
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,6 @@ TEST_F(RangeSensorBroadcasterTest, Publish_RangeBroadcaster_Success)
EXPECT_THAT(range_msg.field_of_view, ::testing::FloatEq(field_of_view_));
EXPECT_THAT(range_msg.min_range, ::testing::FloatEq(min_range_));
EXPECT_THAT(range_msg.max_range, ::testing::FloatEq(max_range_));
EXPECT_THAT(range_msg.variance, ::testing::FloatEq(variance_));
}

TEST_F(RangeSensorBroadcasterTest, Publish_Bandaries_RangeBroadcaster_Success)
Expand All @@ -194,7 +193,6 @@ TEST_F(RangeSensorBroadcasterTest, Publish_Bandaries_RangeBroadcaster_Success)
EXPECT_THAT(range_msg.field_of_view, ::testing::FloatEq(field_of_view_));
EXPECT_THAT(range_msg.min_range, ::testing::FloatEq(min_range_));
EXPECT_THAT(range_msg.max_range, ::testing::FloatEq(max_range_));
EXPECT_THAT(range_msg.variance, ::testing::FloatEq(variance_));

sensor_range_ = 4.0;
subscribe_and_get_message(range_msg);
Expand All @@ -205,7 +203,6 @@ TEST_F(RangeSensorBroadcasterTest, Publish_Bandaries_RangeBroadcaster_Success)
EXPECT_THAT(range_msg.field_of_view, ::testing::FloatEq(field_of_view_));
EXPECT_THAT(range_msg.min_range, ::testing::FloatEq(min_range_));
EXPECT_THAT(range_msg.max_range, ::testing::FloatEq(max_range_));
EXPECT_THAT(range_msg.variance, ::testing::FloatEq(variance_));
}

TEST_F(RangeSensorBroadcasterTest, Publish_OutOfBandaries_RangeBroadcaster_Success)
Expand All @@ -227,7 +224,6 @@ TEST_F(RangeSensorBroadcasterTest, Publish_OutOfBandaries_RangeBroadcaster_Succe
EXPECT_THAT(range_msg.field_of_view, ::testing::FloatEq(field_of_view_));
EXPECT_THAT(range_msg.min_range, ::testing::FloatEq(min_range_));
EXPECT_THAT(range_msg.max_range, ::testing::FloatEq(max_range_));
EXPECT_THAT(range_msg.variance, ::testing::FloatEq(variance_));

sensor_range_ = 6.0;
subscribe_and_get_message(range_msg);
Expand All @@ -239,7 +235,6 @@ TEST_F(RangeSensorBroadcasterTest, Publish_OutOfBandaries_RangeBroadcaster_Succe
EXPECT_THAT(range_msg.field_of_view, ::testing::FloatEq(field_of_view_));
EXPECT_THAT(range_msg.min_range, ::testing::FloatEq(min_range_));
EXPECT_THAT(range_msg.max_range, ::testing::FloatEq(max_range_));
EXPECT_THAT(range_msg.variance, ::testing::FloatEq(variance_));
}

int main(int argc, char ** argv)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ class RangeSensorBroadcasterTest : public ::testing::Test
const int radiation_type_ = 1;
const double min_range_ = 0.1;
const double max_range_ = 7.0;
const double variance_ = 1.0;

double sensor_range_ = 3.1;
hardware_interface::StateInterface range_{sensor_name_, "range", &sensor_range_};
Expand Down

0 comments on commit c6413d5

Please sign in to comment.