Skip to content

Commit 4747e74

Browse files
fix(log-messages): reduce excessive log messages (#6406)
* fix(log-messages): lower log level from info to debug in concatenate_and_time_sync_nodelet for info about subscribing to topics and their names Signed-off-by: AhmedEbrahim <ahmed.a.d.ebrahim@gmail.com> * fix(log-messages): adding info print in smart_pose_buffer indicating that there is a mismatch in timestamp Signed-off-by: AhmedEbrahim <ahmed.a.d.ebrahim@gmail.com> * fix(log-messages): removing info msg that is redundant with error msg Signed-off-by: AhmedEbrahim <ahmed.a.d.ebrahim@gmail.com> * fix(log-messages): lower some info msgs to debug Signed-off-by: AhmedEbrahim <ahmed.a.d.ebrahim@gmail.com> --------- Signed-off-by: AhmedEbrahim <ahmed.a.d.ebrahim@gmail.com>
1 parent 70bdf7f commit 4747e74

File tree

7 files changed

+7
-7
lines changed

7 files changed

+7
-7
lines changed

localization/localization_util/src/smart_pose_buffer.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ std::optional<SmartPoseBuffer::InterpolateResult> SmartPoseBuffer::interpolate(
4040
const rclcpp::Time time_last = pose_buffer_.back()->header.stamp;
4141

4242
if (target_ros_time < time_first) {
43+
RCLCPP_INFO(logger_, "Mismatch between pose timestamp and current timestamp");
4344
return std::nullopt;
4445
}
4546

localization/localization_util/src/util_func.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ void output_pose_with_cov_to_log(
241241
rpy.y = rpy.y * 180.0 / M_PI;
242242
rpy.z = rpy.z * 180.0 / M_PI;
243243

244-
RCLCPP_INFO_STREAM(
244+
RCLCPP_DEBUG_STREAM(
245245
logger, std::fixed << prefix << "," << pose.position.x << "," << pose.position.y << ","
246246
<< pose.position.z << "," << pose.orientation.x << "," << pose.orientation.y
247247
<< "," << pose.orientation.z << "," << pose.orientation.w << "," << rpy.x

localization/ndt_scan_matcher/src/map_update_module.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ bool MapUpdateModule::update_ndt(const geometry_msgs::msg::Point & position, Ndt
182182
const auto duration_micro_sec =
183183
std::chrono::duration_cast<std::chrono::microseconds>(exe_end_time - exe_start_time).count();
184184
const auto exe_time = static_cast<double>(duration_micro_sec) / 1000.0;
185-
RCLCPP_INFO(logger_, "Time duration for creating new ndt_ptr: %lf [ms]", exe_time);
185+
RCLCPP_DEBUG(logger_, "Time duration for creating new ndt_ptr: %lf [ms]", exe_time);
186186
return true; // Updated
187187
}
188188

localization/ndt_scan_matcher/src/ndt_scan_matcher_core.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -992,7 +992,7 @@ geometry_msgs::msg::PoseWithCovarianceStamped NDTScanMatcher::align_pose(
992992
result_pose_with_cov_msg.pose.pose = best_particle_ptr->result_pose;
993993

994994
output_pose_with_cov_to_log(get_logger(), "align_pose_output", result_pose_with_cov_msg);
995-
RCLCPP_INFO_STREAM(get_logger(), "best_score," << best_particle_ptr->score);
995+
RCLCPP_DEBUG_STREAM(get_logger(), "best_score," << best_particle_ptr->score);
996996

997997
return result_pose_with_cov_msg;
998998
}

localization/pose_initializer/src/pose_initializer/ndt_module.cpp

-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ PoseWithCovarianceStamped NdtModule::align_pose(const PoseWithCovarianceStamped
4040
RCLCPP_INFO(logger_, "Call NDT align server.");
4141
const auto res = cli_align_->async_send_request(req).get();
4242
if (!res->success) {
43-
RCLCPP_INFO(logger_, "NDT align server failed.");
4443
throw ServiceException(
4544
Initialize::Service::Response::ERROR_ESTIMATION, "NDT align server failed.");
4645
}

sensing/pointcloud_preprocessor/src/concatenate_data/concatenate_and_time_sync_nodelet.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -145,10 +145,10 @@ PointCloudConcatenateDataSynchronizerComponent::PointCloudConcatenateDataSynchro
145145

146146
// Subscribers
147147
{
148-
RCLCPP_INFO_STREAM(
148+
RCLCPP_DEBUG_STREAM(
149149
get_logger(), "Subscribing to " << input_topics_.size() << " user given topics as inputs:");
150150
for (auto & input_topic : input_topics_) {
151-
RCLCPP_INFO_STREAM(get_logger(), " - " << input_topic);
151+
RCLCPP_DEBUG_STREAM(get_logger(), " - " << input_topic);
152152
}
153153

154154
// Subscribe to the filters

sensing/pointcloud_preprocessor/src/filter.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ pointcloud_preprocessor::Filter::Filter(
7777
latched_indices_ = static_cast<bool>(declare_parameter("latched_indices", false));
7878
approximate_sync_ = static_cast<bool>(declare_parameter("approximate_sync", false));
7979

80-
RCLCPP_INFO_STREAM(
80+
RCLCPP_DEBUG_STREAM(
8181
this->get_logger(),
8282
"Filter (as Component) successfully created with the following parameters:"
8383
<< std::endl

0 commit comments

Comments
 (0)