Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(localization_util): apply static analysis #7399

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions localization/localization_util/src/util_func.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@ std_msgs::msg::ColorRGBA exchange_color_crc(double x)
color.b = 1.0;
color.g = static_cast<float>(std::sin(x * 2.0 * M_PI));
color.r = 0;
} else if (x > 0.25 && x <= 0.5) {
} else if (x <= 0.5) {
color.b = static_cast<float>(std::sin(x * 2 * M_PI));
color.g = 1.0;
color.r = 0;
} else if (x > 0.5 && x <= 0.75) {
} else if (x <= 0.75) {
color.b = 0;
color.g = 1.0;
color.r = static_cast<float>(-std::sin(x * 2.0 * M_PI));
Expand Down
10 changes: 1 addition & 9 deletions localization/localization_util/test/test_smart_pose_buffer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,15 +42,7 @@ bool compare_pose(
pose_a.pose.pose.orientation.w == pose_b.pose.pose.orientation.w;
}

class TestSmartPoseBuffer : public ::testing::Test
{
protected:
void SetUp() override {}

void TearDown() override {}
};

TEST_F(TestSmartPoseBuffer, interpolate_pose) // NOLINT
TEST(TestSmartPoseBuffer, interpolate_pose) // NOLINT
{
rclcpp::Logger logger = rclcpp::get_logger("test_logger");
const double pose_timeout_sec = 10.0;
Expand Down
Loading