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W#%qO5B*yF`N0*A1srvHd0v*yWIk#^?)Ts
zM5jSs*i*xFz2D7|(i500ZVx1J5^<9kp}e$hGHAC2LutRtBH%ytYf07!h%N|p$O_p@
zM76*Ze2pGv`4>e77PC@W+j}V~VvZ$pJA7_u0J6SUt6#Bso7y)~k6x^LN|Y_7g&3t~
zc23kDyJ8C;xg3Hmb~#>n;^|83;U1180$1Uh7VPe5U0Yj3=xI`|HIDic);1
z%Zx)#tB~cm_w^{1mrymqhd`i6ceMi`P*4dL1i~7qi~&@l{y)Y0VJg~EDlzW{YoEjk
QxT*u><#`b=z=h}h2b9~@i2wiq
literal 0
HcmV?d00001
diff --git a/common/tier4_debug_rviz_plugin/include/tier4_debug_rviz_plugin/string_stamped.hpp b/common/tier4_debug_rviz_plugin/include/tier4_debug_rviz_plugin/string_stamped.hpp
new file mode 100644
index 0000000000000..0960875d7eee2
--- /dev/null
+++ b/common/tier4_debug_rviz_plugin/include/tier4_debug_rviz_plugin/string_stamped.hpp
@@ -0,0 +1,107 @@
+// Copyright 2023 TIER IV, Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+// Copyright (c) 2014, JSK Lab
+// All rights reserved.
+//
+// Software License Agreement (BSD License)
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions
+// are met:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following
+// disclaimer in the documentation and/or other materials provided
+// with the distribution.
+// * Neither the name of {copyright_holder} nor the names of its
+// contributors may be used to endorse or promote products derived
+// from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+// COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+// POSSIBILITY OF SUCH DAMAGE.S SOFTWARE, EVEN IF ADVISED OF THE
+// POSSIBILITY OF SUCH DAMAGE.
+
+#ifndef TIER4_DEBUG_RVIZ_PLUGIN__STRING_STAMPED_HPP_
+#define TIER4_DEBUG_RVIZ_PLUGIN__STRING_STAMPED_HPP_
+
+#include
+#include
+
+#ifndef Q_MOC_RUN
+#include "tier4_debug_rviz_plugin/jsk_overlay_utils.hpp"
+
+#include
+#include
+#include
+#include
+
+#endif
+
+#include
+
+namespace rviz_plugins
+{
+class StringStampedOverlayDisplay
+: public rviz_common::RosTopicDisplay
+
+{
+ Q_OBJECT
+
+public:
+ StringStampedOverlayDisplay();
+ ~StringStampedOverlayDisplay() override;
+
+ void onInitialize() override;
+ void onEnable() override;
+ void onDisable() override;
+
+private Q_SLOTS:
+ void updateVisualization();
+
+protected:
+ void update(float wall_dt, float ros_dt) override;
+ void processMessage(const tier4_debug_msgs::msg::StringStamped::ConstSharedPtr msg_ptr) override;
+ jsk_rviz_plugins::OverlayObject::Ptr overlay_;
+ rviz_common::properties::ColorProperty * property_text_color_;
+ rviz_common::properties::IntProperty * property_left_;
+ rviz_common::properties::IntProperty * property_top_;
+ rviz_common::properties::IntProperty * property_value_height_offset_;
+ rviz_common::properties::FloatProperty * property_value_scale_;
+ rviz_common::properties::IntProperty * property_font_size_;
+ rviz_common::properties::IntProperty * property_max_letter_num_;
+ // QImage hud_;
+
+private:
+ static constexpr int line_width_ = 2;
+ static constexpr int hand_width_ = 4;
+
+ std::mutex mutex_;
+ tier4_debug_msgs::msg::StringStamped::ConstSharedPtr last_msg_ptr_;
+};
+} // namespace rviz_plugins
+
+#endif // TIER4_DEBUG_RVIZ_PLUGIN__STRING_STAMPED_HPP_
diff --git a/common/tier4_debug_rviz_plugin/plugins/plugin_description.xml b/common/tier4_debug_rviz_plugin/plugins/plugin_description.xml
index c1158465e1cf1..e18900afc8d84 100644
--- a/common/tier4_debug_rviz_plugin/plugins/plugin_description.xml
+++ b/common/tier4_debug_rviz_plugin/plugins/plugin_description.xml
@@ -4,4 +4,9 @@
base_class_type="rviz_common::Display">
Display drivable area of tier4_debug_msgs::msg::Float32MultiArrayStamped
+
+ Display drivable area of tier4_debug_msgs::msg::StringStamped
+
diff --git a/common/tier4_debug_rviz_plugin/src/string_stamped.cpp b/common/tier4_debug_rviz_plugin/src/string_stamped.cpp
new file mode 100644
index 0000000000000..538dc0cbe7069
--- /dev/null
+++ b/common/tier4_debug_rviz_plugin/src/string_stamped.cpp
@@ -0,0 +1,198 @@
+// Copyright 2023 TIER IV, Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+// Copyright (c) 2014, JSK Lab
+// All rights reserved.
+//
+// Software License Agreement (BSD License)
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions
+// are met:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following
+// disclaimer in the documentation and/or other materials provided
+// with the distribution.
+// * Neither the name of {copyright_holder} nor the names of its
+// contributors may be used to endorse or promote products derived
+// from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+// COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+// POSSIBILITY OF SUCH DAMAGE.S SOFTWARE, EVEN IF ADVISED OF THE
+// POSSIBILITY OF SUCH DAMAGE.
+
+#include "tier4_debug_rviz_plugin/string_stamped.hpp"
+
+#include "tier4_debug_rviz_plugin/jsk_overlay_utils.hpp"
+
+#include
+#include
+
+#include
+
+#include
+#include
+#include
+#include
+
+namespace rviz_plugins
+{
+StringStampedOverlayDisplay::StringStampedOverlayDisplay()
+{
+ const Screen * screen_info = DefaultScreenOfDisplay(XOpenDisplay(NULL));
+
+ constexpr float hight_4k = 2160.0;
+ const float scale = static_cast(screen_info->height) / hight_4k;
+ const auto left = static_cast(std::round(1024 * scale));
+ const auto top = static_cast(std::round(128 * scale));
+
+ property_text_color_ = new rviz_common::properties::ColorProperty(
+ "Text Color", QColor(25, 255, 240), "text color", this, SLOT(updateVisualization()), this);
+ property_left_ = new rviz_common::properties::IntProperty(
+ "Left", left, "Left of the plotter window", this, SLOT(updateVisualization()), this);
+ property_left_->setMin(0);
+ property_top_ = new rviz_common::properties::IntProperty(
+ "Top", top, "Top of the plotter window", this, SLOT(updateVisualization()));
+ property_top_->setMin(0);
+
+ property_value_height_offset_ = new rviz_common::properties::IntProperty(
+ "Value height offset", 0, "Height offset of the plotter window", this,
+ SLOT(updateVisualization()));
+ property_font_size_ = new rviz_common::properties::IntProperty(
+ "Font Size", 15, "Font Size", this, SLOT(updateVisualization()), this);
+ property_font_size_->setMin(1);
+ property_max_letter_num_ = new rviz_common::properties::IntProperty(
+ "Max Letter Num", 100, "Max Letter Num", this, SLOT(updateVisualization()), this);
+ property_max_letter_num_->setMin(10);
+}
+
+StringStampedOverlayDisplay::~StringStampedOverlayDisplay()
+{
+ if (initialized()) {
+ overlay_->hide();
+ }
+}
+
+void StringStampedOverlayDisplay::onInitialize()
+{
+ RTDClass::onInitialize();
+
+ static int count = 0;
+ rviz_common::UniformStringStream ss;
+ ss << "StringOverlayDisplayObject" << count++;
+ auto logger = context_->getRosNodeAbstraction().lock()->get_raw_node()->get_logger();
+ overlay_.reset(new jsk_rviz_plugins::OverlayObject(scene_manager_, logger, ss.str()));
+
+ overlay_->show();
+
+ const int texture_size = property_font_size_->getInt() * property_max_letter_num_->getInt();
+ overlay_->updateTextureSize(texture_size, texture_size);
+ overlay_->setPosition(property_left_->getInt(), property_top_->getInt());
+ overlay_->setDimensions(overlay_->getTextureWidth(), overlay_->getTextureHeight());
+}
+
+void StringStampedOverlayDisplay::onEnable()
+{
+ subscribe();
+ overlay_->show();
+}
+
+void StringStampedOverlayDisplay::onDisable()
+{
+ unsubscribe();
+ reset();
+ overlay_->hide();
+}
+
+void StringStampedOverlayDisplay::update(float wall_dt, float ros_dt)
+{
+ (void)wall_dt;
+ (void)ros_dt;
+
+ std::lock_guard message_lock(mutex_);
+ if (!last_msg_ptr_) {
+ return;
+ }
+
+ // Display
+ QColor background_color;
+ background_color.setAlpha(0);
+ jsk_rviz_plugins::ScopedPixelBuffer buffer = overlay_->getBuffer();
+ QImage hud = buffer.getQImage(*overlay_);
+ hud.fill(background_color);
+
+ QPainter painter(&hud);
+ painter.setRenderHint(QPainter::Antialiasing, true);
+
+ const int w = overlay_->getTextureWidth() - line_width_;
+ const int h = overlay_->getTextureHeight() - line_width_;
+
+ // text
+ QColor text_color(property_text_color_->getColor());
+ text_color.setAlpha(255);
+ painter.setPen(QPen(text_color, static_cast(2), Qt::SolidLine));
+ QFont font = painter.font();
+ font.setPixelSize(property_font_size_->getInt());
+ font.setBold(true);
+ painter.setFont(font);
+
+ // same as above, but align on right side
+ painter.drawText(
+ 0, std::min(property_value_height_offset_->getInt(), h - 1), w,
+ std::max(h - property_value_height_offset_->getInt(), 1), Qt::AlignLeft | Qt::AlignTop,
+ last_msg_ptr_->data.c_str());
+ painter.end();
+ updateVisualization();
+}
+
+void StringStampedOverlayDisplay::processMessage(
+ const tier4_debug_msgs::msg::StringStamped::ConstSharedPtr msg_ptr)
+{
+ if (!isEnabled()) {
+ return;
+ }
+
+ {
+ std::lock_guard message_lock(mutex_);
+ last_msg_ptr_ = msg_ptr;
+ }
+
+ queueRender();
+}
+
+void StringStampedOverlayDisplay::updateVisualization()
+{
+ const int texture_size = property_font_size_->getInt() * property_max_letter_num_->getInt();
+ overlay_->updateTextureSize(texture_size, texture_size);
+ overlay_->setPosition(property_left_->getInt(), property_top_->getInt());
+ overlay_->setDimensions(overlay_->getTextureWidth(), overlay_->getTextureHeight());
+}
+
+} // namespace rviz_plugins
+
+#include
+PLUGINLIB_EXPORT_CLASS(rviz_plugins::StringStampedOverlayDisplay, rviz_common::Display)
From 7db969f0eaf830e1b5dfacb6a69a045b5f3ca3a7 Mon Sep 17 00:00:00 2001
From: Zulfaqar Azmi <93502286+zulfaqar-azmi-t4@users.noreply.github.com>
Date: Fri, 22 Mar 2024 19:14:33 +0900
Subject: [PATCH 11/36] fix(motion_utils): check size after overlap points
removal (#6653)
* fix(motion_utils): check size after overlap points removal
Signed-off-by: Muhammad Zulfaqar Azmi
* change implementation to not return warning
Signed-off-by: Muhammad Zulfaqar Azmi
* fix comparison sign
Signed-off-by: Muhammad Zulfaqar Azmi
---------
Signed-off-by: Muhammad Zulfaqar Azmi
---
.../include/motion_utils/trajectory/trajectory.hpp | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/common/motion_utils/include/motion_utils/trajectory/trajectory.hpp b/common/motion_utils/include/motion_utils/trajectory/trajectory.hpp
index f2e0c1c0c184c..6cb7d34e3aab1 100644
--- a/common/motion_utils/include/motion_utils/trajectory/trajectory.hpp
+++ b/common/motion_utils/include/motion_utils/trajectory/trajectory.hpp
@@ -590,8 +590,12 @@ double calcLateralOffset(
return std::nan("");
}
- const auto p_front = tier4_autoware_utils::getPoint(overlap_removed_points.at(seg_idx));
- const auto p_back = tier4_autoware_utils::getPoint(overlap_removed_points.at(seg_idx + 1));
+ const auto p_indices = overlap_removed_points.size() - 2;
+ const auto p_front_idx = (p_indices > seg_idx) ? seg_idx : p_indices;
+ const auto p_back_idx = p_front_idx + 1;
+
+ const auto p_front = tier4_autoware_utils::getPoint(overlap_removed_points.at(p_front_idx));
+ const auto p_back = tier4_autoware_utils::getPoint(overlap_removed_points.at(p_back_idx));
const Eigen::Vector3d segment_vec{p_back.x - p_front.x, p_back.y - p_front.y, 0.0};
const Eigen::Vector3d target_vec{p_target.x - p_front.x, p_target.y - p_front.y, 0.0};
From 7576be49b95a5f03f1711b87a98815993e403617 Mon Sep 17 00:00:00 2001
From: Satoshi OTA <44889564+satoshi-ota@users.noreply.github.com>
Date: Mon, 28 Oct 2024 19:35:06 +0900
Subject: [PATCH 12/36] fix(static_obstacle_avoidance): suppress unnecessary
warning (#9142) (#1606)
Signed-off-by: satoshi-ota
---
planning/behavior_path_avoidance_module/src/scene.cpp | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/planning/behavior_path_avoidance_module/src/scene.cpp b/planning/behavior_path_avoidance_module/src/scene.cpp
index 4af3dfdb68009..d8d1ee11e7d8f 100644
--- a/planning/behavior_path_avoidance_module/src/scene.cpp
+++ b/planning/behavior_path_avoidance_module/src/scene.cpp
@@ -1505,11 +1505,6 @@ void AvoidanceModule::insertReturnDeadLine(
{
const auto & data = avoid_data_;
- if (data.new_shift_line.empty()) {
- RCLCPP_WARN(getLogger(), "module doesn't have return shift line.");
- return;
- }
-
if (data.to_return_point > planner_data_->parameters.forward_path_length) {
RCLCPP_DEBUG(getLogger(), "return dead line is far enough.");
return;
@@ -1522,6 +1517,11 @@ void AvoidanceModule::insertReturnDeadLine(
return;
}
+ if (data.new_shift_line.empty()) {
+ RCLCPP_WARN(getLogger(), "module doesn't have return shift line.");
+ return;
+ }
+
if (!helper_->isFeasible(data.new_shift_line)) {
RCLCPP_WARN(getLogger(), "return shift line is not feasible. do nothing..");
return;
From 1530ea306e626070b01cc7c0057fd57c6b326d4d Mon Sep 17 00:00:00 2001
From: Mamoru Sobue
Date: Wed, 20 Dec 2023 13:01:05 +0900
Subject: [PATCH 13/36] feat(intersection): disable stuck detection against
private lane (#5910)
Signed-off-by: Mamoru Sobue
---
.../config/intersection.param.yaml | 3 +--
.../src/manager.cpp | 9 +++------
.../src/scene_intersection.cpp | 10 ++++++----
.../src/scene_intersection.hpp | 10 +++-------
4 files changed, 13 insertions(+), 19 deletions(-)
diff --git a/planning/behavior_velocity_intersection_module/config/intersection.param.yaml b/planning/behavior_velocity_intersection_module/config/intersection.param.yaml
index 997addd48d7f8..6fc136c512689 100644
--- a/planning/behavior_velocity_intersection_module/config/intersection.param.yaml
+++ b/planning/behavior_velocity_intersection_module/config/intersection.param.yaml
@@ -23,8 +23,7 @@
stuck_vehicle_velocity_threshold: 0.833
# enable_front_car_decel_prediction: false
# assumed_front_car_decel: 1.0
- timeout_private_area: 3.0
- enable_private_area_stuck_disregard: false
+ disable_against_private_lane: true
yield_stuck:
turn_direction:
diff --git a/planning/behavior_velocity_intersection_module/src/manager.cpp b/planning/behavior_velocity_intersection_module/src/manager.cpp
index 789708abe98f8..e859b15b345b8 100644
--- a/planning/behavior_velocity_intersection_module/src/manager.cpp
+++ b/planning/behavior_velocity_intersection_module/src/manager.cpp
@@ -74,10 +74,8 @@ IntersectionModuleManager::IntersectionModuleManager(rclcpp::Node & node)
getOrDeclareParameter(node, ns + ".stuck_vehicle.stuck_vehicle_detect_dist");
ip.stuck_vehicle.stuck_vehicle_velocity_threshold =
getOrDeclareParameter(node, ns + ".stuck_vehicle.stuck_vehicle_velocity_threshold");
- ip.stuck_vehicle.timeout_private_area =
- getOrDeclareParameter(node, ns + ".stuck_vehicle.timeout_private_area");
- ip.stuck_vehicle.enable_private_area_stuck_disregard =
- getOrDeclareParameter(node, ns + ".stuck_vehicle.enable_private_area_stuck_disregard");
+ ip.stuck_vehicle.disable_against_private_lane =
+ getOrDeclareParameter(node, ns + ".stuck_vehicle.disable_against_private_lane");
ip.yield_stuck.turn_direction.left =
getOrDeclareParameter(node, ns + ".yield_stuck.turn_direction.left");
@@ -201,7 +199,6 @@ void IntersectionModuleManager::launchNewModules(
}
const std::string location = ll.attributeOr("location", "else");
- const bool is_private_area = (location.compare("private") == 0);
const auto associative_ids =
planning_utils::getAssociativeIntersectionLanelets(ll, lanelet_map, routing_graph);
bool has_traffic_light = false;
@@ -213,7 +210,7 @@ void IntersectionModuleManager::launchNewModules(
}
const auto new_module = std::make_shared(
module_id, lane_id, planner_data_, intersection_param_, associative_ids, turn_direction,
- has_traffic_light, enable_occlusion_detection, is_private_area, node_,
+ has_traffic_light, enable_occlusion_detection, node_,
logger_.get_child("intersection_module"), clock_);
generateUUID(module_id);
/* set RTC status as non_occluded status initially */
diff --git a/planning/behavior_velocity_intersection_module/src/scene_intersection.cpp b/planning/behavior_velocity_intersection_module/src/scene_intersection.cpp
index e036fac13fd3b..5909d607f6351 100644
--- a/planning/behavior_velocity_intersection_module/src/scene_intersection.cpp
+++ b/planning/behavior_velocity_intersection_module/src/scene_intersection.cpp
@@ -97,8 +97,8 @@ IntersectionModule::IntersectionModule(
[[maybe_unused]] std::shared_ptr planner_data,
const PlannerParam & planner_param, const std::set & associative_ids,
const std::string & turn_direction, const bool has_traffic_light,
- const bool enable_occlusion_detection, const bool is_private_area, rclcpp::Node & node,
- const rclcpp::Logger logger, const rclcpp::Clock::SharedPtr clock)
+ const bool enable_occlusion_detection, rclcpp::Node & node, const rclcpp::Logger logger,
+ const rclcpp::Clock::SharedPtr clock)
: SceneModuleInterface(module_id, logger, clock),
node_(node),
lane_id_(lane_id),
@@ -107,7 +107,6 @@ IntersectionModule::IntersectionModule(
has_traffic_light_(has_traffic_light),
enable_occlusion_detection_(enable_occlusion_detection),
occlusion_attention_divisions_(std::nullopt),
- is_private_area_(is_private_area),
occlusion_uuid_(tier4_autoware_utils::generateUUID())
{
velocity_factor_.init(PlanningBehavior::INTERSECTION);
@@ -1056,8 +1055,11 @@ IntersectionModule::DecisionResult IntersectionModule::modifyPathVelocityDetail(
// stuck vehicle detection is viable even if attention area is empty
// so this needs to be checked before attention area validation
const bool stuck_detected = checkStuckVehicle(planner_data_, path_lanelets);
+ const bool is_first_conflicting_lane_private =
+ (std::string(first_conflicting_lane.attributeOr("location", "else")).compare("private") == 0);
if (stuck_detected) {
- if (is_private_area_ && planner_param_.stuck_vehicle.enable_private_area_stuck_disregard) {
+ if (!(is_first_conflicting_lane_private &&
+ planner_param_.stuck_vehicle.disable_against_private_lane)) {
} else {
std::optional stopline_idx = std::nullopt;
if (stuck_stopline_idx_opt) {
diff --git a/planning/behavior_velocity_intersection_module/src/scene_intersection.hpp b/planning/behavior_velocity_intersection_module/src/scene_intersection.hpp
index 7366bdc1bc0e6..2f8c296a348b9 100644
--- a/planning/behavior_velocity_intersection_module/src/scene_intersection.hpp
+++ b/planning/behavior_velocity_intersection_module/src/scene_intersection.hpp
@@ -74,8 +74,7 @@ class IntersectionModule : public SceneModuleInterface
bool use_stuck_stopline;
double stuck_vehicle_detect_dist;
double stuck_vehicle_velocity_threshold;
- double timeout_private_area;
- bool enable_private_area_stuck_disregard;
+ bool disable_against_private_lane;
} stuck_vehicle;
struct YieldStuck
@@ -263,8 +262,8 @@ class IntersectionModule : public SceneModuleInterface
const int64_t module_id, const int64_t lane_id, std::shared_ptr planner_data,
const PlannerParam & planner_param, const std::set & associative_ids,
const std::string & turn_direction, const bool has_traffic_light,
- const bool enable_occlusion_detection, const bool is_private_area, rclcpp::Node & node,
- const rclcpp::Logger logger, const rclcpp::Clock::SharedPtr clock);
+ const bool enable_occlusion_detection, rclcpp::Node & node, const rclcpp::Logger logger,
+ const rclcpp::Clock::SharedPtr clock);
/**
* @brief plan go-stop velocity at traffic crossing with collision check between reference path
@@ -314,9 +313,6 @@ class IntersectionModule : public SceneModuleInterface
// vehicles are very slow
std::optional initial_green_light_observed_time_{std::nullopt};
- // for stuck vehicle detection
- const bool is_private_area_;
-
// for RTC
const UUID occlusion_uuid_;
bool occlusion_safety_{true};
From 3836123dc5ca2731476b399e4d0fcaf2c58bca59 Mon Sep 17 00:00:00 2001
From: Mamoru Sobue
Date: Wed, 27 Dec 2023 19:46:50 +0900
Subject: [PATCH 14/36] fix(intersection): fix private condition (#5975)
---
.../src/scene_intersection.cpp | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/planning/behavior_velocity_intersection_module/src/scene_intersection.cpp b/planning/behavior_velocity_intersection_module/src/scene_intersection.cpp
index 5909d607f6351..631c03d923da0 100644
--- a/planning/behavior_velocity_intersection_module/src/scene_intersection.cpp
+++ b/planning/behavior_velocity_intersection_module/src/scene_intersection.cpp
@@ -1058,8 +1058,10 @@ IntersectionModule::DecisionResult IntersectionModule::modifyPathVelocityDetail(
const bool is_first_conflicting_lane_private =
(std::string(first_conflicting_lane.attributeOr("location", "else")).compare("private") == 0);
if (stuck_detected) {
- if (!(is_first_conflicting_lane_private &&
- planner_param_.stuck_vehicle.disable_against_private_lane)) {
+ if (
+ is_first_conflicting_lane_private &&
+ planner_param_.stuck_vehicle.disable_against_private_lane) {
+ // do nothing
} else {
std::optional stopline_idx = std::nullopt;
if (stuck_stopline_idx_opt) {
From b5ad8f8ed7395efa94be6ad72d06ad96c5a6b4c1 Mon Sep 17 00:00:00 2001
From: Mamoru Sobue
Date: Thu, 4 Jan 2024 17:13:04 +0900
Subject: [PATCH 15/36] refactor(intersection): cleanup utility function
(#5972)
Signed-off-by: Mamoru Sobue
---
.../src/scene_intersection.cpp | 1422 +++++++++++++++--
.../src/scene_intersection.hpp | 490 +++++-
.../src/scene_merge_from_private_road.cpp | 77 +-
.../src/scene_merge_from_private_road.hpp | 8 +-
.../src/util.cpp | 1389 +---------------
.../src/util.hpp | 176 +-
.../src/util_type.hpp | 172 +-
7 files changed, 1885 insertions(+), 1849 deletions(-)
diff --git a/planning/behavior_velocity_intersection_module/src/scene_intersection.cpp b/planning/behavior_velocity_intersection_module/src/scene_intersection.cpp
index 631c03d923da0..292a6e6a8843d 100644
--- a/planning/behavior_velocity_intersection_module/src/scene_intersection.cpp
+++ b/planning/behavior_velocity_intersection_module/src/scene_intersection.cpp
@@ -17,7 +17,11 @@
#include "util.hpp"
#include
+#include
#include
+#include
+#include
+#include
#include
#include
#include
@@ -37,10 +41,27 @@
#include
#include
+#include
#include