Skip to content

Commit

Permalink
Show remapped topic names (#196)
Browse files Browse the repository at this point in the history
This PR, similar to #192, changes the topic names in the warning message to remapped ones in order to make the message more understandable.

---------

Signed-off-by: Tamaki Nishino <otamachan@gmail.com>
Co-authored-by: Martin Günther <martin.guenther@dfki.de>
  • Loading branch information
otamachan and mintar committed Apr 26, 2024
1 parent 102c6d3 commit e4c2fce
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions imu_filter_madgwick/src/imu_filter_ros.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -543,12 +543,14 @@ void ImuFilterMadgwickRos::reconfigCallback(
void ImuFilterMadgwickRos::checkTopicsTimerCallback()
{
if (use_mag_)
RCLCPP_WARN_STREAM(
get_logger(),
"Still waiting for data on topics /imu/data_raw and /imu/mag...");
else
RCLCPP_WARN_STREAM(get_logger(),
"Still waiting for data on topic /imu/data_raw...");
"Still waiting for data on topics "
<< imu_subscriber_->getTopic() << " and "
<< mag_subscriber_->getTopic() << "...");
else
RCLCPP_WARN_STREAM(get_logger(), "Still waiting for data on topic "
<< imu_subscriber_->getTopic()
<< "...");
}

#include "rclcpp_components/register_node_macro.hpp"
Expand Down

0 comments on commit e4c2fce

Please sign in to comment.