Skip to content

Commit 04191ae

Browse files
committed
Reverse format changes and comments
Signed-off-by: lotusymt <[email protected]>
1 parent b99dd8f commit 04191ae

File tree

3 files changed

+13
-12
lines changed

3 files changed

+13
-12
lines changed

nav2_collision_monitor/src/collision_monitor_node.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -675,7 +675,7 @@ void CollisionMonitor::toggleCMServiceCallback(
675675

676676
#include "rclcpp_components/register_node_macro.hpp"
677677

678-
// Register the component with class_loader.
679-
// This acts as a sort of entry point, allowing the component to be discoverable when its library
680-
// is being loaded into a running process.
678+
// Register the component with class_loader.
679+
// This acts as a sort of entry point, allowing the component to be discoverable when its library
680+
// is being loaded into a running process.
681681
RCLCPP_COMPONENTS_REGISTER_NODE(nav2_collision_monitor::CollisionMonitor)

nav2_collision_monitor/src/costmap.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,9 @@ void CostmapSource::configure()
5959
std::string source_topic;
6060
getParameters(source_topic);
6161
data_sub_ = node->create_subscription<nav2_msgs::msg::Costmap>(
62-
source_topic,
63-
std::bind(&CostmapSource::dataCallback, this, std::placeholders::_1),
64-
nav2::qos::StandardTopicQoS());
62+
source_topic,
63+
std::bind(&CostmapSource::dataCallback, this, std::placeholders::_1),
64+
nav2::qos::StandardTopicQoS());
6565
}
6666

6767
bool CostmapSource::getData(
@@ -82,13 +82,11 @@ bool CostmapSource::getData(
8282
// This branch is for malformed /local_costmap/costmap in tests or bags.
8383
// It is not expected in the happy path, so we exclude it from coverage.
8484
if (src != base_frame_id_) {
85-
// LCOV_EXCL_START <-- tell lcov/gcovr to ignore below
8685
if (!getTransform(curr_time, data_->header, tf_transform)) {
8786
RCLCPP_WARN(logger_, "[%s] TF %s->%s unavailable at t=%.3f",
8887
source_name_.c_str(), src.c_str(), base_frame_id_.c_str(), curr_time.seconds());
8988
return false;
9089
}
91-
// LCOV_EXCL_STOP
9290
}
9391

9492
// Extract lethal/inscribed cells and transform to base frame
@@ -108,11 +106,13 @@ bool CostmapSource::getData(
108106
tf2::Vector3 p_v3_s(wx, wy, 0.0);
109107
tf2::Vector3 p_v3_b = tf_transform * p_v3_s;
110108
data.push_back({p_v3_b.x(), p_v3_b.y()});
111-
RCLCPP_DEBUG_THROTTLE(logger_, *node->get_clock(), 2000 /*ms*/,
112-
"[%s] Found obstacles in costmap", source_name_.c_str());
109+
RCLCPP_DEBUG_THROTTLE(
110+
logger_, *node->get_clock(), 2000 /*ms*/,
111+
"[%s] Found obstacles in costmap", source_name_.c_str());
113112
}
114113
}
115114
}
115+
116116
return true;
117117
}
118118

nav2_collision_monitor/test/bags/cm_moving_obstacle/fake_cm_bag_source.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
# Copyright (c) 2025 lotusymt
2-
2+
#
33
# Licensed under the Apache License, Version 2.0 (the "License");
44
# you may not use this file except in compliance with the License.
55
# You may obtain a copy of the License at
6-
6+
#
77
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
89
# Unless required by applicable law or agreed to in writing, software
910
# distributed under the License is distributed on an "AS IS" BASIS,
1011
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

0 commit comments

Comments
 (0)