Skip to content

Commit

Permalink
feat: tier4_debug_msgs changed to autoware_internal_debug_msgs in fil…
Browse files Browse the repository at this point in the history
…e autoware_universe_utils

Signed-off-by: vish0012 <[email protected]>
  • Loading branch information
vish0012 authored and mitsudome-r committed Jan 21, 2025
1 parent 96708f9 commit 4dfe92f
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 31 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,6 @@
#include <autoware_internal_debug_msgs/msg/int64_multi_array_stamped.hpp>
#include <autoware_internal_debug_msgs/msg/int64_stamped.hpp>
#include <autoware_internal_debug_msgs/msg/string_stamped.hpp>
#include <tier4_debug_msgs/msg/bool_stamped.hpp>
#include <tier4_debug_msgs/msg/float32_multi_array_stamped.hpp>
#include <tier4_debug_msgs/msg/float32_stamped.hpp>
#include <tier4_debug_msgs/msg/float64_multi_array_stamped.hpp>
#include <tier4_debug_msgs/msg/float64_stamped.hpp>
#include <tier4_debug_msgs/msg/int32_multi_array_stamped.hpp>
#include <tier4_debug_msgs/msg/int32_stamped.hpp>
#include <tier4_debug_msgs/msg/int64_multi_array_stamped.hpp>
#include <tier4_debug_msgs/msg/int64_stamped.hpp>
#include <tier4_debug_msgs/msg/string_stamped.hpp>

#include <type_traits>

Expand All @@ -46,52 +36,54 @@ struct is_debug_message : std::false_type
};

template <>
struct is_debug_message<tier4_debug_msgs::msg::BoolStamped> : std::true_type
struct is_debug_message<autoware_internal_debug_msgs::msg::BoolStamped> : std::true_type
{
};

template <>
struct is_debug_message<tier4_debug_msgs::msg::Float32MultiArrayStamped> : std::true_type
struct is_debug_message<autoware_internal_debug_msgs::msg::Float32MultiArrayStamped>
: std::true_type
{
};

template <>
struct is_debug_message<tier4_debug_msgs::msg::Float32Stamped> : std::true_type
struct is_debug_message<autoware_internal_debug_msgs::msg::Float32Stamped> : std::true_type
{
};

template <>
struct is_debug_message<tier4_debug_msgs::msg::Float64MultiArrayStamped> : std::true_type
struct is_debug_message<autoware_internal_debug_msgs::msg::Float64MultiArrayStamped>
: std::true_type
{
};

template <>
struct is_debug_message<tier4_debug_msgs::msg::Float64Stamped> : std::true_type
struct is_debug_message<autoware_internal_debug_msgs::msg::Float64Stamped> : std::true_type
{
};

template <>
struct is_debug_message<tier4_debug_msgs::msg::Int32MultiArrayStamped> : std::true_type
struct is_debug_message<autoware_internal_debug_msgs::msg::Int32MultiArrayStamped> : std::true_type
{
};

template <>
struct is_debug_message<tier4_debug_msgs::msg::Int32Stamped> : std::true_type
struct is_debug_message<autoware_internal_debug_msgs::msg::Int32Stamped> : std::true_type
{
};

template <>
struct is_debug_message<tier4_debug_msgs::msg::Int64MultiArrayStamped> : std::true_type
struct is_debug_message<autoware_internal_debug_msgs::msg::Int64MultiArrayStamped> : std::true_type
{
};

template <>
struct is_debug_message<tier4_debug_msgs::msg::Int64Stamped> : std::true_type
struct is_debug_message<autoware_internal_debug_msgs::msg::Int64Stamped> : std::true_type
{
};

template <>
struct is_debug_message<tier4_debug_msgs::msg::StringStamped> : std::true_type
struct is_debug_message<autoware_internal_debug_msgs::msg::StringStamped> : std::true_type
{
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@

#include <rclcpp/publisher.hpp>

#include <autoware_internal_debug_msgs/msg/processing_time_node.hpp>
#include <autoware_internal_debug_msgs/msg/processing_time_tree.hpp>
#include <std_msgs/msg/string.hpp>
#include <tier4_debug_msgs/msg/processing_time_node.hpp>
#include <tier4_debug_msgs/msg/processing_time_tree.hpp>

#include <memory>
#include <ostream>
Expand Down Expand Up @@ -61,9 +61,10 @@ class ProcessingTimeNode : public std::enable_shared_from_this<ProcessingTimeNod
/**
* @brief Construct a ProcessingTimeTree message from the node and its children
*
* @return tier4_debug_msgs::msg::ProcessingTimeTree Constructed ProcessingTimeTree message
* @return autoware_internal_debug_msgs::msg::ProcessingTimeTree Constructed ProcessingTimeTree
* message
*/
tier4_debug_msgs::msg::ProcessingTimeTree to_msg() const;
autoware_internal_debug_msgs::msg::ProcessingTimeTree to_msg() const;

/**
* @brief Get the parent node
Expand Down Expand Up @@ -111,7 +112,8 @@ class ProcessingTimeNode : public std::enable_shared_from_this<ProcessingTimeNod
};

using ProcessingTimeDetail =
tier4_debug_msgs::msg::ProcessingTimeTree; //!< Alias for the ProcessingTimeTree message
autoware_internal_debug_msgs::msg::ProcessingTimeTree; //!< Alias for the ProcessingTimeTree
//!< message

/**
* @brief Class for tracking and reporting the processing time of various functions
Expand Down
2 changes: 1 addition & 1 deletion common/autoware_universe_utils/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
<buildtool_depend>ament_cmake_auto</buildtool_depend>
<buildtool_depend>autoware_cmake</buildtool_depend>

<depend>autoware_internal_debug_msgs</depend>
<depend>autoware_internal_debug_msgs</depend>
<depend>autoware_internal_msgs</depend>
<depend>autoware_perception_msgs</depend>
Expand All @@ -27,7 +28,6 @@
<depend>tf2</depend>
<depend>tf2_eigen</depend>
<depend>tf2_geometry_msgs</depend>
<depend>tier4_debug_msgs</depend>
<depend>tier4_planning_msgs</depend>
<depend>unique_identifier_msgs</depend>
<depend>visualization_msgs</depend>
Expand Down
12 changes: 7 additions & 5 deletions common/autoware_universe_utils/src/system/time_keeper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -67,15 +67,17 @@ std::string ProcessingTimeNode::to_string() const
return oss.str();
}

tier4_debug_msgs::msg::ProcessingTimeTree ProcessingTimeNode::to_msg() const
autoware_internal_debug_msgs::msg::ProcessingTimeTree ProcessingTimeNode::to_msg() const
{
tier4_debug_msgs::msg::ProcessingTimeTree time_tree_msg;
autoware_debug_msgs::msg::ProcessingTimeTree time_tree_msg;

std::function<void(const ProcessingTimeNode &, tier4_debug_msgs::msg::ProcessingTimeTree &, int)>
std::function<void(
const ProcessingTimeNode &, autoware_internal_debug_msgs::msg::ProcessingTimeTree &, int)>
construct_msg = [&](
const ProcessingTimeNode & node,
tier4_debug_msgs::msg::ProcessingTimeTree & tree_msg, int parent_id) {
tier4_debug_msgs::msg::ProcessingTimeNode time_node_msg;
autoware_internal_debug_msgs::msg::ProcessingTimeTree & tree_msg,
int parent_id) {
autoware_internal_debug_msgs::msg::ProcessingTimeNode time_node_msg;
time_node_msg.name = node.name_;
time_node_msg.processing_time = node.processing_time_;
time_node_msg.id = static_cast<int>(tree_msg.nodes.size() + 1);
Expand Down

0 comments on commit 4dfe92f

Please sign in to comment.