Skip to content

Commit 2579f3c

Browse files
authored
feat(behavior_velocity_planner): use XXXStamped in autoware_internal_debug_msgs (#9744)
* feat(behavior_velocity_planner): use XXXStamped in autoware_internal_debug_msgs Signed-off-by: Takayuki Murooka <takayuki5168@gmail.com> * fix Signed-off-by: Takayuki Murooka <takayuki5168@gmail.com> --------- Signed-off-by: Takayuki Murooka <takayuki5168@gmail.com>
1 parent e0531b8 commit 2579f3c

File tree

16 files changed

+38
-31
lines changed

16 files changed

+38
-31
lines changed

planning/behavior_velocity_planner/autoware_behavior_velocity_crosswalk_module/package.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323

2424
<depend>autoware_behavior_velocity_planner_common</depend>
2525
<depend>autoware_grid_map_utils</depend>
26+
<depend>autoware_internal_debug_msgs</depend>
2627
<depend>autoware_interpolation</depend>
2728
<depend>autoware_lanelet2_extension</depend>
2829
<depend>autoware_motion_utils</depend>
@@ -41,7 +42,6 @@
4142
<depend>pluginlib</depend>
4243
<depend>rclcpp</depend>
4344
<depend>sensor_msgs</depend>
44-
<depend>tier4_debug_msgs</depend>
4545
<depend>visualization_msgs</depend>
4646

4747
<test_depend>ament_cmake_ros</test_depend>

planning/behavior_velocity_planner/autoware_behavior_velocity_crosswalk_module/scripts/time_to_collision_plotter.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@
1919
from copy import deepcopy
2020

2121
from ament_index_python.packages import get_package_share_directory
22+
from autoware_internal_debug_msgs.msg import StringStamped
2223
import matplotlib.pyplot as plt
2324
import rclpy
2425
from rclpy.node import Node
25-
from tier4_debug_msgs.msg import StringStamped
2626
import yaml
2727

2828

planning/behavior_velocity_planner/autoware_behavior_velocity_crosswalk_module/src/scene_crosswalk.cpp

+4-4
Original file line numberDiff line numberDiff line change
@@ -153,11 +153,11 @@ StopFactor createStopFactor(
153153
return stop_factor;
154154
}
155155

156-
tier4_debug_msgs::msg::StringStamped createStringStampedMessage(
156+
autoware_internal_debug_msgs::msg::StringStamped createStringStampedMessage(
157157
const rclcpp::Time & now, const int64_t module_id_,
158158
const std::vector<std::tuple<std::string, CollisionPoint, CollisionState>> & collision_points)
159159
{
160-
tier4_debug_msgs::msg::StringStamped msg;
160+
autoware_internal_debug_msgs::msg::StringStamped msg;
161161
msg.stamp = now;
162162
for (const auto & collision_point : collision_points) {
163163
std::stringstream ss;
@@ -199,8 +199,8 @@ CrosswalkModule::CrosswalkModule(
199199

200200
road_ = lanelet_map_ptr->laneletLayer.get(lane_id);
201201

202-
collision_info_pub_ =
203-
node.create_publisher<tier4_debug_msgs::msg::StringStamped>("~/debug/collision_info", 1);
202+
collision_info_pub_ = node.create_publisher<autoware_internal_debug_msgs::msg::StringStamped>(
203+
"~/debug/collision_info", 1);
204204
}
205205

206206
bool CrosswalkModule::modifyPathVelocity(PathWithLaneId * path)

planning/behavior_velocity_planner/autoware_behavior_velocity_crosswalk_module/src/scene_crosswalk.hpp

+3-2
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@
2323
#include <autoware_lanelet2_extension/regulatory_elements/crosswalk.hpp>
2424
#include <rclcpp/rclcpp.hpp>
2525

26+
#include <autoware_internal_debug_msgs/msg/string_stamped.hpp>
2627
#include <autoware_perception_msgs/msg/predicted_objects.hpp>
2728
#include <sensor_msgs/msg/point_cloud2.hpp>
28-
#include <tier4_debug_msgs/msg/string_stamped.hpp>
2929

3030
#include <boost/assert.hpp>
3131
#include <boost/assign/list_of.hpp>
@@ -456,7 +456,8 @@ class CrosswalkModule : public SceneModuleInterface
456456

457457
const int64_t module_id_;
458458

459-
rclcpp::Publisher<tier4_debug_msgs::msg::StringStamped>::SharedPtr collision_info_pub_;
459+
rclcpp::Publisher<autoware_internal_debug_msgs::msg::StringStamped>::SharedPtr
460+
collision_info_pub_;
460461

461462
lanelet::ConstLanelet crosswalk_;
462463

planning/behavior_velocity_planner/autoware_behavior_velocity_intersection_module/package.xml

+1
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
<buildtool_depend>autoware_cmake</buildtool_depend>
2121

2222
<depend>autoware_behavior_velocity_planner_common</depend>
23+
<depend>autoware_internal_debug_msgs</depend>
2324
<depend>autoware_interpolation</depend>
2425
<depend>autoware_lanelet2_extension</depend>
2526
<depend>autoware_motion_utils</depend>

planning/behavior_velocity_planner/autoware_behavior_velocity_intersection_module/scripts/ttc.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,13 @@
2222
import time
2323

2424
from PIL import Image
25+
from autoware_internal_debug_msgs.msg import Float64MultiArrayStamped
2526
import imageio
2627
import matplotlib
2728
import matplotlib.pyplot as plt
2829
import numpy as np
2930
import rclpy
3031
from rclpy.node import Node
31-
from tier4_debug_msgs.msg import Float64MultiArrayStamped
3232

3333
matplotlib.use("TKAgg")
3434

planning/behavior_velocity_planner/autoware_behavior_velocity_intersection_module/src/scene_intersection.cpp

+6-5
Original file line numberDiff line numberDiff line change
@@ -88,10 +88,11 @@ IntersectionModule::IntersectionModule(
8888
static_occlusion_timeout_state_machine_.setState(StateMachine::State::STOP);
8989
}
9090

91-
ego_ttc_pub_ = node.create_publisher<tier4_debug_msgs::msg::Float64MultiArrayStamped>(
91+
ego_ttc_pub_ = node.create_publisher<autoware_internal_debug_msgs::msg::Float64MultiArrayStamped>(
9292
"~/debug/intersection/ego_ttc", 1);
93-
object_ttc_pub_ = node.create_publisher<tier4_debug_msgs::msg::Float64MultiArrayStamped>(
94-
"~/debug/intersection/object_ttc", 1);
93+
object_ttc_pub_ =
94+
node.create_publisher<autoware_internal_debug_msgs::msg::Float64MultiArrayStamped>(
95+
"~/debug/intersection/object_ttc", 1);
9596
}
9697

9798
bool IntersectionModule::modifyPathVelocity(PathWithLaneId * path)
@@ -231,7 +232,7 @@ DecisionResult IntersectionModule::modifyPathVelocityDetail(PathWithLaneId * pat
231232
// calculate the expected vehicle speed and obtain the spatiotemporal profile of ego to the
232233
// exit of intersection
233234
// ==========================================================================================
234-
tier4_debug_msgs::msg::Float64MultiArrayStamped ego_ttc_time_array;
235+
autoware_internal_debug_msgs::msg::Float64MultiArrayStamped ego_ttc_time_array;
235236
const auto time_distance_array =
236237
calcIntersectionPassingTime(*path, is_prioritized, intersection_stoplines, &ego_ttc_time_array);
237238

@@ -240,7 +241,7 @@ DecisionResult IntersectionModule::modifyPathVelocityDetail(PathWithLaneId * pat
240241
// passed each pass judge line for the first time, save current collision status for late
241242
// diagnosis
242243
// ==========================================================================================
243-
tier4_debug_msgs::msg::Float64MultiArrayStamped object_ttc_time_array;
244+
autoware_internal_debug_msgs::msg::Float64MultiArrayStamped object_ttc_time_array;
244245
updateObjectInfoManagerCollision(
245246
path_lanelets, time_distance_array, traffic_prioritized_level, safely_passed_1st_judge_line,
246247
safely_passed_2nd_judge_line, &object_ttc_time_array);

planning/behavior_velocity_planner/autoware_behavior_velocity_intersection_module/src/scene_intersection.hpp

+7-5
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
#include <autoware/motion_utils/marker/virtual_wall_marker_creator.hpp>
2828
#include <rclcpp/rclcpp.hpp>
2929

30-
#include <tier4_debug_msgs/msg/float64_multi_array_stamped.hpp>
30+
#include <autoware_internal_debug_msgs/msg/float64_multi_array_stamped.hpp>
3131
#include <tier4_planning_msgs/msg/path_with_lane_id.hpp>
3232

3333
#include <lanelet2_core/Forward.h>
@@ -748,7 +748,7 @@ class IntersectionModule : public SceneModuleInterface
748748
const PathLanelets & path_lanelets, const TimeDistanceArray & time_distance_array,
749749
const TrafficPrioritizedLevel & traffic_prioritized_level,
750750
const bool passed_1st_judge_line_first_time, const bool passed_2nd_judge_line_first_time,
751-
tier4_debug_msgs::msg::Float64MultiArrayStamped * object_ttc_time_array);
751+
autoware_internal_debug_msgs::msg::Float64MultiArrayStamped * object_ttc_time_array);
752752

753753
void cutPredictPathWithinDuration(
754754
const builtin_interfaces::msg::Time & object_stamp, const double time_thr,
@@ -809,13 +809,15 @@ class IntersectionModule : public SceneModuleInterface
809809
TimeDistanceArray calcIntersectionPassingTime(
810810
const tier4_planning_msgs::msg::PathWithLaneId & path, const bool is_prioritized,
811811
const IntersectionStopLines & intersection_stoplines,
812-
tier4_debug_msgs::msg::Float64MultiArrayStamped * ego_ttc_array) const;
812+
autoware_internal_debug_msgs::msg::Float64MultiArrayStamped * ego_ttc_array) const;
813813
/** @} */
814814

815815
mutable DebugData debug_data_;
816816
mutable InternalDebugData internal_debug_data_{};
817-
rclcpp::Publisher<tier4_debug_msgs::msg::Float64MultiArrayStamped>::SharedPtr ego_ttc_pub_;
818-
rclcpp::Publisher<tier4_debug_msgs::msg::Float64MultiArrayStamped>::SharedPtr object_ttc_pub_;
817+
rclcpp::Publisher<autoware_internal_debug_msgs::msg::Float64MultiArrayStamped>::SharedPtr
818+
ego_ttc_pub_;
819+
rclcpp::Publisher<autoware_internal_debug_msgs::msg::Float64MultiArrayStamped>::SharedPtr
820+
object_ttc_pub_;
819821
};
820822

821823
} // namespace autoware::behavior_velocity_planner

planning/behavior_velocity_planner/autoware_behavior_velocity_intersection_module/src/scene_intersection_collision.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ void IntersectionModule::updateObjectInfoManagerCollision(
152152
const IntersectionModule::TimeDistanceArray & time_distance_array,
153153
const IntersectionModule::TrafficPrioritizedLevel & traffic_prioritized_level,
154154
const bool passed_1st_judge_line_first_time, const bool passed_2nd_judge_line_first_time,
155-
tier4_debug_msgs::msg::Float64MultiArrayStamped * object_ttc_time_array)
155+
autoware_internal_debug_msgs::msg::Float64MultiArrayStamped * object_ttc_time_array)
156156
{
157157
const auto & intersection_lanelets = intersection_lanelets_.value();
158158

@@ -815,7 +815,7 @@ std::optional<size_t> IntersectionModule::checkAngleForTargetLanelets(
815815
IntersectionModule::TimeDistanceArray IntersectionModule::calcIntersectionPassingTime(
816816
const tier4_planning_msgs::msg::PathWithLaneId & path, const bool is_prioritized,
817817
const IntersectionStopLines & intersection_stoplines,
818-
tier4_debug_msgs::msg::Float64MultiArrayStamped * ego_ttc_array) const
818+
autoware_internal_debug_msgs::msg::Float64MultiArrayStamped * ego_ttc_array) const
819819
{
820820
const double intersection_velocity =
821821
planner_param_.collision_detection.velocity_profile.default_velocity;

planning/behavior_velocity_planner/autoware_behavior_velocity_planner_common/include/autoware/behavior_velocity_planner_common/scene_module_interface.hpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@
2727

2828
#include <autoware_adapi_v1_msgs/msg/velocity_factor.hpp>
2929
#include <autoware_adapi_v1_msgs/msg/velocity_factor_array.hpp>
30+
#include <autoware_internal_debug_msgs/msg/float64_stamped.hpp>
3031
#include <autoware_planning_msgs/msg/path.hpp>
31-
#include <tier4_debug_msgs/msg/float64_stamped.hpp>
3232
#include <tier4_planning_msgs/msg/path_with_lane_id.hpp>
3333
#include <tier4_rtc_msgs/msg/state.hpp>
3434
#include <tier4_v2x_msgs/msg/infrastructure_command_array.hpp>
@@ -57,8 +57,8 @@ using autoware::objects_of_interest_marker_interface::ObjectsOfInterestMarkerInt
5757
using autoware::rtc_interface::RTCInterface;
5858
using autoware::universe_utils::DebugPublisher;
5959
using autoware::universe_utils::getOrDeclareParameter;
60+
using autoware_internal_debug_msgs::msg::Float64Stamped;
6061
using builtin_interfaces::msg::Time;
61-
using tier4_debug_msgs::msg::Float64Stamped;
6262
using tier4_planning_msgs::msg::PathWithLaneId;
6363
using tier4_rtc_msgs::msg::Module;
6464
using tier4_rtc_msgs::msg::State;

planning/behavior_velocity_planner/autoware_behavior_velocity_planner_common/package.xml

+1
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
<buildtool_depend>eigen3_cmake_module</buildtool_depend>
2121

2222
<depend>autoware_adapi_v1_msgs</depend>
23+
<depend>autoware_internal_debug_msgs</depend>
2324
<depend>autoware_interpolation</depend>
2425
<depend>autoware_lanelet2_extension</depend>
2526
<depend>autoware_map_msgs</depend>

planning/behavior_velocity_planner/autoware_behavior_velocity_run_out_module/package.xml

+1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121

2222
<depend>autoware_behavior_velocity_crosswalk_module</depend>
2323
<depend>autoware_behavior_velocity_planner_common</depend>
24+
<depend>autoware_internal_debug_msgs</depend>
2425
<depend>autoware_motion_utils</depend>
2526
<depend>autoware_object_recognition_utils</depend>
2627
<depend>autoware_perception_msgs</depend>

planning/behavior_velocity_planner/autoware_behavior_velocity_run_out_module/src/debug.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,7 @@ void RunOutDebug::setAccelReason(const AccelReason & accel_reason)
316316
void RunOutDebug::publishDebugValue()
317317
{
318318
// publish debug values
319-
tier4_debug_msgs::msg::Float32MultiArrayStamped debug_msg{};
319+
autoware_internal_debug_msgs::msg::Float32MultiArrayStamped debug_msg{};
320320
debug_msg.stamp = node_.now();
321321
for (const auto & v : debug_values_.getValues()) {
322322
debug_msg.data.push_back(v);

planning/behavior_velocity_planner/autoware_behavior_velocity_run_out_module/src/debug.hpp

+4-4
Original file line numberDiff line numberDiff line change
@@ -18,17 +18,17 @@
1818

1919
#include <autoware/motion_utils/marker/virtual_wall_marker_creator.hpp>
2020

21-
#include <tier4_debug_msgs/msg/float32_multi_array_stamped.hpp>
22-
#include <tier4_debug_msgs/msg/int32_stamped.hpp>
21+
#include <autoware_internal_debug_msgs/msg/float32_multi_array_stamped.hpp>
22+
#include <autoware_internal_debug_msgs/msg/int32_stamped.hpp>
2323

2424
#include <memory>
2525
#include <string>
2626
#include <vector>
2727
namespace autoware::behavior_velocity_planner
2828
{
29+
using autoware_internal_debug_msgs::msg::Float32MultiArrayStamped;
30+
using autoware_internal_debug_msgs::msg::Int32Stamped;
2931
using sensor_msgs::msg::PointCloud2;
30-
using tier4_debug_msgs::msg::Float32MultiArrayStamped;
31-
using tier4_debug_msgs::msg::Int32Stamped;
3232

3333
class DebugValues
3434
{

planning/behavior_velocity_planner/autoware_behavior_velocity_run_out_module/src/scene.hpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,10 @@
3232

3333
namespace autoware::behavior_velocity_planner
3434
{
35+
using autoware_internal_debug_msgs::msg::Float32Stamped;
3536
using autoware_perception_msgs::msg::PredictedObjects;
3637
using run_out_utils::PlannerParam;
3738
using run_out_utils::PoseWithRange;
38-
using tier4_debug_msgs::msg::Float32Stamped;
3939
using tier4_planning_msgs::msg::PathPointWithLaneId;
4040
using tier4_planning_msgs::msg::PathWithLaneId;
4141
using BasicPolygons2d = std::vector<lanelet::BasicPolygon2d>;

planning/behavior_velocity_planner/autoware_behavior_velocity_run_out_module/src/utils.hpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@
2121
#include <autoware/behavior_velocity_planner_common/utilization/util.hpp>
2222
#include <autoware_vehicle_info_utils/vehicle_info_utils.hpp>
2323

24+
#include <autoware_internal_debug_msgs/msg/float32_stamped.hpp>
2425
#include <autoware_perception_msgs/msg/predicted_object.hpp>
2526
#include <autoware_perception_msgs/msg/shape.hpp>
2627
#include <autoware_planning_msgs/msg/path_point.hpp>
27-
#include <tier4_debug_msgs/msg/float32_stamped.hpp>
2828
#include <unique_identifier_msgs/msg/uuid.hpp>
2929

3030
#include <string>
@@ -39,11 +39,11 @@ using autoware::universe_utils::LineString2d;
3939
using autoware::universe_utils::Point2d;
4040
using autoware::universe_utils::Polygon2d;
4141
using autoware::vehicle_info_utils::VehicleInfo;
42+
using autoware_internal_debug_msgs::msg::Float32Stamped;
4243
using autoware_perception_msgs::msg::ObjectClassification;
4344
using autoware_perception_msgs::msg::PredictedObjects;
4445
using autoware_perception_msgs::msg::Shape;
4546
using autoware_planning_msgs::msg::PathPoint;
46-
using tier4_debug_msgs::msg::Float32Stamped;
4747
using tier4_planning_msgs::msg::PathWithLaneId;
4848
using PathPointsWithLaneId = std::vector<tier4_planning_msgs::msg::PathPointWithLaneId>;
4949
struct CommonParam

0 commit comments

Comments
 (0)