Skip to content

Commit 0abaafc

Browse files
committed
fix: remove debug messages
1 parent c12109a commit 0abaafc

File tree

2 files changed

+0
-52
lines changed

2 files changed

+0
-52
lines changed

perception/multi_object_tracker/src/multi_object_tracker_core.cpp

-38
Original file line numberDiff line numberDiff line change
@@ -255,44 +255,6 @@ void MultiObjectTracker::onMessage(const ObjectsList & objects_list)
255255
}
256256
// process end
257257
debugger_->endMeasurementTime(this->now());
258-
259-
/* DEBUG */
260-
const rclcpp::Time latest_time(objects_list.back().second.header.stamp);
261-
RCLCPP_INFO(
262-
this->get_logger(), "MultiObjectTracker::onMessage Objects time range: %f - %f",
263-
(current_time - latest_time).seconds(), (current_time - oldest_time).seconds());
264-
265-
// count objects on each channel
266-
std::vector<int> object_counts;
267-
object_counts.resize(input_channel_size_);
268-
// initialize to zero
269-
for (size_t i = 0; i < input_channel_size_; i++) {
270-
object_counts[i] = 0;
271-
}
272-
for (const auto & objects_data : objects_list) {
273-
object_counts[objects_data.first] += 1;
274-
}
275-
// print result
276-
std::string object_counts_str = "MultiObjectTracker::onMessage Object counts: ";
277-
for (size_t i = 0; i < input_channel_size_; i++) {
278-
object_counts_str +=
279-
input_channels_[i].long_name + " " + std::to_string(object_counts[i]) + " ";
280-
}
281-
RCLCPP_INFO(this->get_logger(), object_counts_str.c_str());
282-
283-
std::string object_info_str = "";
284-
object_info_str += "MultiObjectTracker::onMessage Objects channel and time: \n";
285-
for (const auto & objects_data : objects_list) {
286-
const auto & objects = objects_data.second;
287-
const auto & channel_index = objects_data.first;
288-
const auto & time = rclcpp::Time(objects.header.stamp);
289-
// print object information
290-
object_info_str += input_channels_[channel_index].long_name + " " +
291-
std::to_string((current_time - time).seconds()) + " \n";
292-
}
293-
RCLCPP_INFO(this->get_logger(), object_info_str.c_str());
294-
295-
/* DEBUG END */
296258
}
297259

298260
void MultiObjectTracker::runProcess(

perception/multi_object_tracker/src/processor/input_manager.cpp

-14
Original file line numberDiff line numberDiff line change
@@ -269,20 +269,6 @@ void InputManager::optimizeTimings()
269269
selected_stream_interval = interval_mean;
270270
selected_stream_interval_std = std::sqrt(interval_var);
271271
}
272-
273-
/* DEBUG */
274-
std::string long_name, short_name;
275-
rclcpp::Time latest_measurement_time, latest_message_time;
276-
input_stream->getNames(long_name, short_name);
277-
input_stream->getTimestamps(latest_measurement_time, latest_message_time);
278-
double latency_message = (node_.now() - latest_message_time).seconds();
279-
double latency_measurement = (node_.now() - latest_measurement_time).seconds();
280-
RCLCPP_INFO(
281-
node_.get_logger(),
282-
"InputManager::getObjects %s: latency mean: %f, std: %f, interval mean: "
283-
"%f, std: %f, latest measurement latency: %f, latest message latency: %f",
284-
long_name.c_str(), latency_mean, std::sqrt(latency_var), interval_mean,
285-
std::sqrt(interval_var), latency_measurement, latency_message);
286272
}
287273
}
288274

0 commit comments

Comments
 (0)