Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace debug msgs #9797

Open
wants to merge 14 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions common/autoware_goal_distance_calculator/Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ This node publishes deviation of self-pose from goal pose.

### Output

| Name | Type | Description |
| ------------------------ | --------------------------------------- | ------------------------------------------------------------- |
| `deviation/lateral` | `tier4_debug_msgs::msg::Float64Stamped` | publish lateral deviation of self-pose from goal pose[m] |
| `deviation/longitudinal` | `tier4_debug_msgs::msg::Float64Stamped` | publish longitudinal deviation of self-pose from goal pose[m] |
| `deviation/yaw` | `tier4_debug_msgs::msg::Float64Stamped` | publish yaw deviation of self-pose from goal pose[rad] |
| `deviation/yaw_deg` | `tier4_debug_msgs::msg::Float64Stamped` | publish yaw deviation of self-pose from goal pose[deg] |
| Name | Type | Description |
| ------------------------ | --------------------------------------------------- | ------------------------------------------------------------- |
| `deviation/lateral` | `autoware_internal_debug_msgs::msg::Float64Stamped` | publish lateral deviation of self-pose from goal pose[m] |
| `deviation/longitudinal` | `autoware_internal_debug_msgs::msg::Float64Stamped` | publish longitudinal deviation of self-pose from goal pose[m] |
| `deviation/yaw` | `autoware_internal_debug_msgs::msg::Float64Stamped` | publish yaw deviation of self-pose from goal pose[rad] |
| `deviation/yaw_deg` | `autoware_internal_debug_msgs::msg::Float64Stamped` | publish yaw deviation of self-pose from goal pose[deg] |

## Parameters

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@
#include <autoware/universe_utils/ros/self_pose_listener.hpp>
#include <rclcpp/rclcpp.hpp>

#include <autoware_internal_debug_msgs/msg/float64_stamped.hpp>
#include <autoware_planning_msgs/msg/lanelet_route.hpp>
#include <geometry_msgs/msg/pose_stamped.hpp>
#include <tier4_debug_msgs/msg/float64_stamped.hpp>

#include <tf2_ros/transform_listener.h>

Expand Down
2 changes: 1 addition & 1 deletion common/autoware_goal_distance_calculator/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@
<buildtool_depend>ament_cmake</buildtool_depend>
<buildtool_depend>autoware_cmake</buildtool_depend>

<depend>autoware_internal_debug_msgs</depend>
<depend>autoware_planning_msgs</depend>
<depend>autoware_universe_utils</depend>
<depend>geometry_msgs</depend>
<depend>rclcpp</depend>
<depend>rclcpp_components</depend>
<depend>tier4_debug_msgs</depend>

<test_depend>ament_lint_auto</test_depend>
<test_depend>autoware_lint_common</test_depend>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
#include <rclcpp/rclcpp.hpp>
#include <rclcpp/timer.hpp>

#include <tier4_debug_msgs/msg/float64_stamped.hpp>
#include <autoware_internal_debug_msgs/msg/float64_stamped.hpp>

#include <chrono>
#include <functional>
Expand Down Expand Up @@ -100,12 +100,13 @@ void GoalDistanceCalculatorNode::onTimer()
using autoware::universe_utils::rad2deg;
const auto & deviation = output.goal_deviation;

debug_publisher_.publish<tier4_debug_msgs::msg::Float64Stamped>(
debug_publisher_.publish<autoware_internal_debug_msgs::msg::Float64Stamped>(
"deviation/lateral", deviation.lateral);
debug_publisher_.publish<tier4_debug_msgs::msg::Float64Stamped>(
debug_publisher_.publish<autoware_internal_debug_msgs::msg::Float64Stamped>(
"deviation/longitudinal", deviation.longitudinal);
debug_publisher_.publish<tier4_debug_msgs::msg::Float64Stamped>("deviation/yaw", deviation.yaw);
debug_publisher_.publish<tier4_debug_msgs::msg::Float64Stamped>(
debug_publisher_.publish<autoware_internal_debug_msgs::msg::Float64Stamped>(
"deviation/yaw", deviation.yaw);
debug_publisher_.publish<autoware_internal_debug_msgs::msg::Float64Stamped>(
"deviation/yaw_deg", rad2deg(deviation.yaw));
RCLCPP_INFO_THROTTLE(
this->get_logger(), *this->get_clock(), 1000,
Expand Down
6 changes: 3 additions & 3 deletions common/autoware_path_distance_calculator/Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ Note that the distance means the arc-length along the path, not the Euclidean di

### Output

| Name | Type | Description |
| ------------ | --------------------------------------- | ----------------------------------------------------------------------------------------------------- |
| `~/distance` | `tier4_debug_msgs::msg::Float64Stamped` | Publish a distance from the closest path point from the self-position to the end point of the path[m] |
| Name | Type | Description |
| ------------ | --------------------------------------------------- | ----------------------------------------------------------------------------------------------------- |
| `~/distance` | `autoware_internal_debug_msgs::msg::Float64Stamped` | Publish a distance from the closest path point from the self-position to the end point of the path[m] |

## Parameters

Expand Down
2 changes: 1 addition & 1 deletion common/autoware_path_distance_calculator/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@
<buildtool_depend>ament_cmake</buildtool_depend>
<buildtool_depend>autoware_cmake</buildtool_depend>

<depend>autoware_internal_debug_msgs</depend>
<depend>autoware_motion_utils</depend>
<depend>autoware_planning_msgs</depend>
<depend>autoware_universe_utils</depend>
<depend>rclcpp</depend>
<depend>rclcpp_components</depend>
<depend>tier4_debug_msgs</depend>

<test_depend>ament_lint_auto</test_depend>
<test_depend>autoware_lint_common</test_depend>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ namespace autoware::path_distance_calculator
PathDistanceCalculator::PathDistanceCalculator(const rclcpp::NodeOptions & options)
: Node("path_distance_calculator", options), self_pose_listener_(this)
{
pub_dist_ =
create_publisher<tier4_debug_msgs::msg::Float64Stamped>("~/output/distance", rclcpp::QoS(1));
pub_dist_ = create_publisher<autoware_internal_debug_msgs::msg::Float64Stamped>(
"~/output/distance", rclcpp::QoS(1));

using std::chrono_literals::operator""s;
timer_ = rclcpp::create_timer(this, get_clock(), 1s, [this]() {
Expand All @@ -50,7 +50,7 @@ PathDistanceCalculator::PathDistanceCalculator(const rclcpp::NodeOptions & optio
const double distance = autoware::motion_utils::calcSignedArcLength(
path->points, pose->pose.position, path->points.size() - 1);

tier4_debug_msgs::msg::Float64Stamped msg;
autoware_internal_debug_msgs::msg::Float64Stamped msg;
msg.stamp = pose->header.stamp;
msg.data = distance;
pub_dist_->publish(msg);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
#include <autoware/universe_utils/ros/self_pose_listener.hpp>
#include <rclcpp/rclcpp.hpp>

#include <autoware_internal_debug_msgs/msg/float64_stamped.hpp>
#include <autoware_planning_msgs/msg/path.hpp>
#include <tier4_debug_msgs/msg/float64_stamped.hpp>

namespace autoware::path_distance_calculator
{
Expand All @@ -33,7 +33,7 @@ class PathDistanceCalculator : public rclcpp::Node
private:
autoware::universe_utils::InterProcessPollingSubscriber<autoware_planning_msgs::msg::Path>
sub_path_{this, "~/input/path"};
rclcpp::Publisher<tier4_debug_msgs::msg::Float64Stamped>::SharedPtr pub_dist_;
rclcpp::Publisher<autoware_internal_debug_msgs::msg::Float64Stamped>::SharedPtr pub_dist_;
rclcpp::TimerBase::SharedPtr timer_;
autoware::universe_utils::SelfPoseListener self_pose_listener_;
};
Expand Down
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
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
#include <pcl_ros/transforms.hpp>
#include <rclcpp/rclcpp.hpp>

#include <autoware_internal_debug_msgs/msg/float32_stamped.hpp>
#include <autoware_perception_msgs/msg/predicted_objects.hpp>
#include <autoware_planning_msgs/msg/trajectory.hpp>
#include <autoware_system_msgs/msg/autoware_state.hpp>
Expand All @@ -33,7 +34,6 @@
#include <nav_msgs/msg/odometry.hpp>
#include <sensor_msgs/msg/imu.hpp>
#include <sensor_msgs/msg/point_cloud2.hpp>
#include <tier4_debug_msgs/msg/float32_stamped.hpp>
#include <tier4_metric_msgs/msg/metric.hpp>
#include <tier4_metric_msgs/msg/metric_array.hpp>
#include <visualization_msgs/msg/marker.hpp>
Expand Down Expand Up @@ -348,7 +348,8 @@ class AEB : public rclcpp::Node
rclcpp::Publisher<MarkerArray>::SharedPtr virtual_wall_publisher_;
rclcpp::Publisher<autoware::universe_utils::ProcessingTimeDetail>::SharedPtr
debug_processing_time_detail_pub_;
rclcpp::Publisher<tier4_debug_msgs::msg::Float32Stamped>::SharedPtr debug_rss_distance_publisher_;
rclcpp::Publisher<autoware_internal_debug_msgs::msg::Float32Stamped>::SharedPtr
debug_rss_distance_publisher_;
rclcpp::Publisher<MetricArray>::SharedPtr metrics_pub_;
// timer
rclcpp::TimerBase::SharedPtr timer_;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
<test_depend>autoware_test_utils</test_depend>

<depend>autoware_control_msgs</depend>
<depend>autoware_internal_debug_msgs</depend>
<depend>autoware_motion_utils</depend>
<depend>autoware_planning_msgs</depend>
<depend>autoware_pointcloud_preprocessor</depend>
Expand All @@ -43,7 +44,6 @@
<depend>tf2_eigen</depend>
<depend>tf2_geometry_msgs</depend>
<depend>tf2_ros</depend>
<depend>tier4_debug_msgs</depend>
<depend>tier4_metric_msgs</depend>
<depend>visualization_msgs</depend>

Expand Down
5 changes: 3 additions & 2 deletions control/autoware_autonomous_emergency_braking/src/node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,8 @@ AEB::AEB(const rclcpp::NodeOptions & node_options)
debug_marker_publisher_ = this->create_publisher<MarkerArray>("~/debug/markers", 1);
virtual_wall_publisher_ = this->create_publisher<MarkerArray>("~/virtual_wall", 1);
debug_rss_distance_publisher_ =
this->create_publisher<tier4_debug_msgs::msg::Float32Stamped>("~/debug/rss_distance", 1);
this->create_publisher<autoware_internal_debug_msgs::msg::Float32Stamped>(
"~/debug/rss_distance", 1);
metrics_pub_ = this->create_publisher<MetricArray>("~/metrics", 1);
}
// Diagnostics
Expand Down Expand Up @@ -647,7 +648,7 @@ bool AEB::hasCollision(const double current_v, const ObjectData & closest_object
return ego_stopping_distance + obj_braking_distance + longitudinal_offset_margin_;
});

tier4_debug_msgs::msg::Float32Stamped rss_distance_msg;
autoware_internal_debug_msgs::msg::Float32Stamped rss_distance_msg;
rss_distance_msg.stamp = get_clock()->now();
rss_distance_msg.data = rss_dist;
debug_rss_distance_publisher_->publish(rss_distance_msg);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@
#include <autoware_control_validator/msg/control_validator_status.hpp>
#include <rclcpp/rclcpp.hpp>

#include <autoware_internal_debug_msgs/msg/float64_stamped.hpp>
#include <autoware_planning_msgs/msg/trajectory.hpp>
#include <diagnostic_msgs/msg/diagnostic_array.hpp>
#include <nav_msgs/msg/odometry.hpp>
#include <tier4_debug_msgs/msg/float64_stamped.hpp>

#include <cstdint>
#include <memory>
Expand Down Expand Up @@ -139,7 +139,8 @@ class ControlValidator : public rclcpp::Node
universe_utils::InterProcessPollingSubscriber<Trajectory>::SharedPtr sub_reference_traj_;
rclcpp::Publisher<ControlValidatorStatus>::SharedPtr pub_status_;
rclcpp::Publisher<visualization_msgs::msg::MarkerArray>::SharedPtr pub_markers_;
rclcpp::Publisher<tier4_debug_msgs::msg::Float64Stamped>::SharedPtr pub_processing_time_;
rclcpp::Publisher<autoware_internal_debug_msgs::msg::Float64Stamped>::SharedPtr
pub_processing_time_;

// system parameters
int64_t diag_error_count_threshold_ = 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ ControlValidator::ControlValidator(const rclcpp::NodeOptions & options)

pub_markers_ = create_publisher<visualization_msgs::msg::MarkerArray>("~/output/markers", 1);

pub_processing_time_ =
this->create_publisher<tier4_debug_msgs::msg::Float64Stamped>("~/debug/processing_time_ms", 1);
pub_processing_time_ = this->create_publisher<autoware_internal_debug_msgs::msg::Float64Stamped>(
"~/debug/processing_time_ms", 1);

debug_pose_publisher_ = std::make_shared<ControlValidatorDebugMarkerPublisher>(this);

Expand Down Expand Up @@ -181,7 +181,7 @@ void ControlValidator::publish_debug_info()
debug_pose_publisher_->publish();

// Publish ProcessingTime
tier4_debug_msgs::msg::Float64Stamped processing_time_msg;
autoware_internal_debug_msgs::msg::Float64Stamped processing_time_msg;
processing_time_msg.stamp = get_clock()->now();
processing_time_msg.data = stop_watch.toc();
pub_processing_time_->publish(processing_time_msg);
Expand Down
Loading
Loading