Skip to content

Commit

Permalink
feat(diagnostic_graph_utils): use StringStamped in autoware_internal_…
Browse files Browse the repository at this point in the history
…debug_msgs (#9741)

* feat(diagnostic_graph_utils): use StringStamped in autoware_internal_debug_msgs

Signed-off-by: Takayuki Murooka <[email protected]>

* fix

Signed-off-by: Takayuki Murooka <[email protected]>

---------

Signed-off-by: Takayuki Murooka <[email protected]>
  • Loading branch information
takayuki5168 authored Dec 24, 2024
1 parent f16ff53 commit 50f7cb0
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
1 change: 1 addition & 0 deletions system/diagnostic_graph_utils/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
<buildtool_depend>ament_cmake_auto</buildtool_depend>
<buildtool_depend>autoware_cmake</buildtool_depend>

<depend>autoware_internal_debug_msgs</depend>
<depend>diagnostic_msgs</depend>
<depend>rclcpp</depend>
<depend>rclcpp_components</depend>
Expand Down
6 changes: 3 additions & 3 deletions system/diagnostic_graph_utils/src/node/logging.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ LoggingNode::LoggingNode(const rclcpp::NodeOptions & options) : Node("logging",
sub_graph_.register_create_callback(std::bind(&LoggingNode::on_create, this, _1));
sub_graph_.subscribe(*this, 1);

pub_error_graph_text_ = create_publisher<tier4_debug_msgs::msg::StringStamped>(
pub_error_graph_text_ = create_publisher<autoware_internal_debug_msgs::msg::StringStamped>(
"~/debug/error_graph_text", rclcpp::QoS(1));

const auto period = rclcpp::Rate(declare_parameter<double>("show_rate")).period();
Expand Down Expand Up @@ -68,12 +68,12 @@ void LoggingNode::on_timer()
RCLCPP_WARN_STREAM(get_logger(), prefix_message << std::endl << dump_text_.str());
}

tier4_debug_msgs::msg::StringStamped message;
autoware_internal_debug_msgs::msg::StringStamped message;
message.stamp = now();
message.data = dump_text_.str();
pub_error_graph_text_->publish(message);
} else {
tier4_debug_msgs::msg::StringStamped message;
autoware_internal_debug_msgs::msg::StringStamped message;
message.stamp = now();
pub_error_graph_text_->publish(message);
}
Expand Down
5 changes: 3 additions & 2 deletions system/diagnostic_graph_utils/src/node/logging.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

#include <rclcpp/rclcpp.hpp>

#include "tier4_debug_msgs/msg/string_stamped.hpp"
#include "autoware_internal_debug_msgs/msg/string_stamped.hpp"

#include <sstream>
#include <string>
Expand All @@ -37,7 +37,8 @@ class LoggingNode : public rclcpp::Node
void on_timer();
void dump_unit(DiagUnit * unit, int depth, const std::string & indent);
DiagGraphSubscription sub_graph_;
rclcpp::Publisher<tier4_debug_msgs::msg::StringStamped>::SharedPtr pub_error_graph_text_;
rclcpp::Publisher<autoware_internal_debug_msgs::msg::StringStamped>::SharedPtr
pub_error_graph_text_;
rclcpp::TimerBase::SharedPtr timer_;

DiagUnit * root_unit_;
Expand Down

0 comments on commit 50f7cb0

Please sign in to comment.