From d05ac54793a6b85c35ef94d5b4600603d5bb7722 Mon Sep 17 00:00:00 2001 From: taikitanaka3 Date: Thu, 8 Sep 2022 10:43:14 +0900 Subject: [PATCH 1/2] feat(behavior velocity): lighten topic Signed-off-by: taikitanaka3 --- .../include/scene_module/scene_module_interface.hpp | 8 ++++---- planning/behavior_velocity_planner/src/node.cpp | 10 +++++----- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/planning/behavior_velocity_planner/include/scene_module/scene_module_interface.hpp b/planning/behavior_velocity_planner/include/scene_module/scene_module_interface.hpp index e3d41eab53c6f..0ba04a5b40736 100644 --- a/planning/behavior_velocity_planner/include/scene_module/scene_module_interface.hpp +++ b/planning/behavior_velocity_planner/include/scene_module/scene_module_interface.hpp @@ -136,7 +136,7 @@ class SceneModuleManagerInterface : clock_(node.get_clock()), logger_(node.get_logger()) { const auto ns = std::string("~/debug/") + module_name; - pub_debug_ = node.create_publisher(ns, 20); + pub_debug_ = node.create_publisher(ns, 1); if (!node.has_parameter("is_publish_debug_path")) { is_publish_debug_path_ = node.declare_parameter("is_publish_debug_path", false); } else { @@ -147,12 +147,12 @@ class SceneModuleManagerInterface std::string("~/debug/path_with_lane_id/") + module_name, 1); } pub_virtual_wall_ = node.create_publisher( - std::string("~/virtual_wall/") + module_name, 20); + std::string("~/virtual_wall/") + module_name, 1); pub_stop_reason_ = - node.create_publisher("~/output/stop_reasons", 20); + node.create_publisher("~/output/stop_reasons", 1); pub_infrastructure_commands_ = node.create_publisher( - "~/output/infrastructure_commands", 20); + "~/output/infrastructure_commands", 1); processing_time_publisher_ = std::make_shared(&node, "~/debug"); } diff --git a/planning/behavior_velocity_planner/src/node.cpp b/planning/behavior_velocity_planner/src/node.cpp index 2ac0e6eb67f71..739310908a8cc 100644 --- a/planning/behavior_velocity_planner/src/node.cpp +++ b/planning/behavior_velocity_planner/src/node.cpp @@ -119,28 +119,28 @@ BehaviorVelocityPlannerNode::BehaviorVelocityPlannerNode(const rclcpp::NodeOptio createSubscriptionOptions(this)); sub_traffic_signals_ = this->create_subscription( - "~/input/traffic_signals", 10, + "~/input/traffic_signals", 1, std::bind(&BehaviorVelocityPlannerNode::onTrafficSignals, this, _1), createSubscriptionOptions(this)); sub_external_crosswalk_states_ = this->create_subscription( - "~/input/external_crosswalk_states", 10, + "~/input/external_crosswalk_states", 1, std::bind(&BehaviorVelocityPlannerNode::onExternalCrosswalkStates, this, _1), createSubscriptionOptions(this)); sub_external_intersection_states_ = this->create_subscription( - "~/input/external_intersection_states", 10, + "~/input/external_intersection_states", 1, std::bind(&BehaviorVelocityPlannerNode::onExternalIntersectionStates, this, _1)); sub_external_velocity_limit_ = this->create_subscription( "~/input/external_velocity_limit_mps", rclcpp::QoS{1}.transient_local(), std::bind(&BehaviorVelocityPlannerNode::onExternalVelocityLimit, this, _1)); sub_external_traffic_signals_ = this->create_subscription( - "~/input/external_traffic_signals", 10, + "~/input/external_traffic_signals", 1, std::bind(&BehaviorVelocityPlannerNode::onExternalTrafficSignals, this, _1), createSubscriptionOptions(this)); sub_virtual_traffic_light_states_ = this->create_subscription( - "~/input/virtual_traffic_light_states", 10, + "~/input/virtual_traffic_light_states", 1, std::bind(&BehaviorVelocityPlannerNode::onVirtualTrafficLightStates, this, _1), createSubscriptionOptions(this)); sub_occupancy_grid_ = this->create_subscription( From 41e43e481f14e119ae019059d95645f98306845f Mon Sep 17 00:00:00 2001 From: taikitanaka3 Date: Fri, 9 Sep 2022 00:24:17 +0900 Subject: [PATCH 2/2] chore: add queue size of virtual wall for visualization Signed-off-by: taikitanaka3 --- .../include/scene_module/scene_module_interface.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/planning/behavior_velocity_planner/include/scene_module/scene_module_interface.hpp b/planning/behavior_velocity_planner/include/scene_module/scene_module_interface.hpp index 0ba04a5b40736..76b76bea37749 100644 --- a/planning/behavior_velocity_planner/include/scene_module/scene_module_interface.hpp +++ b/planning/behavior_velocity_planner/include/scene_module/scene_module_interface.hpp @@ -147,7 +147,7 @@ class SceneModuleManagerInterface std::string("~/debug/path_with_lane_id/") + module_name, 1); } pub_virtual_wall_ = node.create_publisher( - std::string("~/virtual_wall/") + module_name, 1); + std::string("~/virtual_wall/") + module_name, 5); pub_stop_reason_ = node.create_publisher("~/output/stop_reasons", 1); pub_infrastructure_commands_ =