diff --git a/perception/radar_crossing_objects_noise_filter/CMakeLists.txt b/perception/radar_crossing_objects_noise_filter/CMakeLists.txt index dd179e99829a3..bf4a46cda7ae6 100644 --- a/perception/radar_crossing_objects_noise_filter/CMakeLists.txt +++ b/perception/radar_crossing_objects_noise_filter/CMakeLists.txt @@ -17,9 +17,17 @@ rclcpp_components_register_node(radar_crossing_objects_noise_filter_node_compone # Tests if(BUILD_TESTING) + find_package(ament_cmake_ros REQUIRED) list(APPEND AMENT_LINT_AUTO_EXCLUDE ament_cmake_uncrustify) find_package(ament_lint_auto REQUIRED) ament_lint_auto_find_test_dependencies() + + file(GLOB_RECURSE test_files test/**/*.cpp) + ament_add_ros_isolated_gtest(radar_crossing_objects_noise_filter ${test_files}) + + target_link_libraries(radar_crossing_objects_noise_filter + radar_crossing_objects_noise_filter_node_component + ) endif() # Package diff --git a/perception/radar_crossing_objects_noise_filter/include/radar_crossing_objects_noise_filter/radar_crossing_objects_noise_filter_node.hpp b/perception/radar_crossing_objects_noise_filter/include/radar_crossing_objects_noise_filter/radar_crossing_objects_noise_filter_node.hpp index 3b4674072a742..7ef369840c791 100644 --- a/perception/radar_crossing_objects_noise_filter/include/radar_crossing_objects_noise_filter/radar_crossing_objects_noise_filter_node.hpp +++ b/perception/radar_crossing_objects_noise_filter/include/radar_crossing_objects_noise_filter/radar_crossing_objects_noise_filter_node.hpp @@ -58,6 +58,7 @@ class RadarCrossingObjectsNoiseFilterNode : public rclcpp::Node // Parameter NodeParam node_param_{}; +public: // Core bool isNoise(const DetectedObject & object); }; diff --git a/perception/radar_crossing_objects_noise_filter/test/test_radar_crossing_objects_filter.cpp b/perception/radar_crossing_objects_noise_filter/test/test_radar_crossing_objects_filter.cpp new file mode 100644 index 0000000000000..43f030ce8493a --- /dev/null +++ b/perception/radar_crossing_objects_noise_filter/test/test_radar_crossing_objects_filter.cpp @@ -0,0 +1,26 @@ +// Copyright 2024 TierIV +// +// 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. + +#include + +#include + +int main(int argc, char * argv[]) +{ + testing::InitGoogleTest(&argc, argv); + rclcpp::init(argc, argv); + bool result = RUN_ALL_TESTS(); + rclcpp::shutdown(); + return result; +} diff --git a/perception/radar_crossing_objects_noise_filter/test/test_radar_crossing_objects_noise_filter/test_radar_crossing_objects_filter_is_noise.cpp b/perception/radar_crossing_objects_noise_filter/test/test_radar_crossing_objects_noise_filter/test_radar_crossing_objects_filter_is_noise.cpp new file mode 100644 index 0000000000000..16d3cad8c3314 --- /dev/null +++ b/perception/radar_crossing_objects_noise_filter/test/test_radar_crossing_objects_noise_filter/test_radar_crossing_objects_filter_is_noise.cpp @@ -0,0 +1,175 @@ +// Copyright 2024 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. + +#include "radar_crossing_objects_noise_filter/radar_crossing_objects_noise_filter_node.hpp" +#include "tier4_autoware_utils/geometry/geometry.hpp" +#include "tier4_autoware_utils/math/unit_conversion.hpp" + +#include + +#include + +std::shared_ptr get_node( + double angle_threshold, double velocity_threshold) +{ + rclcpp::NodeOptions node_options; + + node_options.parameter_overrides( + {{"angle_threshold", angle_threshold}, {"velocity_threshold", velocity_threshold}}); + auto node = + std::make_shared( + node_options); + return node; +} + +autoware_auto_perception_msgs::msg::DetectedObject get_object( + geometry_msgs::msg::Vector3 velocity, geometry_msgs::msg::Point position, + geometry_msgs::msg::Quaternion orientation) +{ + autoware_auto_perception_msgs::msg::DetectedObject object; + object.kinematics.twist_with_covariance.twist.linear = velocity; + object.kinematics.pose_with_covariance.pose.position = position; + object.kinematics.pose_with_covariance.pose.orientation = orientation; + return object; +} + +TEST(RadarCrossingObjectsFilter, IsNoise) +{ + rclcpp::init(0, nullptr); + { + auto velocity = tier4_autoware_utils::createVector3(40.0, 30.0, 0.0); + auto position = tier4_autoware_utils::createPoint(1.0, 0.0, 0.0); + auto orientation = tier4_autoware_utils::createQuaternion(1.0, 1.0, 1.0, 0.0); + auto object = get_object(velocity, position, orientation); + { + double velocity_threshold = 40.0; + double angle_threshold = 1.0472; + auto node = get_node(angle_threshold, velocity_threshold); + EXPECT_TRUE(node->isNoise(object)); + } + { + double velocity_threshold = 40.0; + double angle_threshold = -1.0472; + + auto node = get_node(angle_threshold, velocity_threshold); + EXPECT_TRUE(node->isNoise(object)); + } + { + double velocity_threshold = -40.0; + double angle_threshold = 1.0472; + + auto node = get_node(angle_threshold, velocity_threshold); + EXPECT_TRUE(node->isNoise(object)); + } + { + double velocity_threshold = -40.0; + double angle_threshold = -1.0472; + auto node = get_node(angle_threshold, velocity_threshold); + EXPECT_TRUE(node->isNoise(object)); + } + } + + { + auto velocity = tier4_autoware_utils::createVector3(40.0, 30.0, 0.0); + auto position = tier4_autoware_utils::createPoint(1.0, 2.0, 0.0); + auto orientation = tier4_autoware_utils::createQuaternion(1.0, 1.0, 1.0, 0.0); + auto object = get_object(velocity, position, orientation); + { + double velocity_threshold = 40.0; + double angle_threshold = 1.0472; + auto node = get_node(angle_threshold, velocity_threshold); + EXPECT_FALSE(node->isNoise(object)); + } + { + double velocity_threshold = 40.0; + double angle_threshold = -1.0472; + auto node = get_node(angle_threshold, velocity_threshold); + EXPECT_FALSE(node->isNoise(object)); + } + { + double velocity_threshold = -40.0; + double angle_threshold = 1.0472; + auto node = get_node(angle_threshold, velocity_threshold); + EXPECT_FALSE(node->isNoise(object)); + } + { + double velocity_threshold = -40.0; + double angle_threshold = -1.0472; + auto node = get_node(angle_threshold, velocity_threshold); + EXPECT_FALSE(node->isNoise(object)); + } + } + + { + auto velocity = tier4_autoware_utils::createVector3(24.0, 18.0, 0.0); + auto position = tier4_autoware_utils::createPoint(1.0, 0.0, 0.0); + auto orientation = tier4_autoware_utils::createQuaternion(1.0, 1.0, 1.0, 0.0); + auto object = get_object(velocity, position, orientation); + { + double velocity_threshold = 40.0; + double angle_threshold = 1.0472; + auto node = get_node(angle_threshold, velocity_threshold); + EXPECT_FALSE(node->isNoise(object)); + } + { + double velocity_threshold = 40.0; + double angle_threshold = -1.0472; + auto node = get_node(angle_threshold, velocity_threshold); + EXPECT_FALSE(node->isNoise(object)); + } + { + double velocity_threshold = -40.0; + double angle_threshold = 1.0472; + auto node = get_node(angle_threshold, velocity_threshold); + EXPECT_TRUE(node->isNoise(object)); + } + { + double velocity_threshold = -40.0; + double angle_threshold = -1.0472; + auto node = get_node(angle_threshold, velocity_threshold); + EXPECT_TRUE(node->isNoise(object)); + } + } + + { + auto velocity = tier4_autoware_utils::createVector3(24.0, 18.0, 0.0); + auto position = tier4_autoware_utils::createPoint(1.0, 2.0, 0.0); + auto orientation = tier4_autoware_utils::createQuaternion(1.0, 1.0, 1.0, 0.0); + auto object = get_object(velocity, position, orientation); + { + double velocity_threshold = 40.0; + double angle_threshold = 1.0472; + auto node = get_node(angle_threshold, velocity_threshold); + EXPECT_FALSE(node->isNoise(object)); + } + { + double velocity_threshold = 40.0; + double angle_threshold = -1.0472; + auto node = get_node(angle_threshold, velocity_threshold); + EXPECT_FALSE(node->isNoise(object)); + } + { + double velocity_threshold = -40.0; + double angle_threshold = 1.0472; + auto node = get_node(angle_threshold, velocity_threshold); + EXPECT_FALSE(node->isNoise(object)); + } + { + double velocity_threshold = -40.0; + double angle_threshold = -1.0472; + auto node = get_node(angle_threshold, velocity_threshold); + EXPECT_FALSE(node->isNoise(object)); + } + } +} diff --git a/perception/tensorrt_yolox/CMakeLists.txt b/perception/tensorrt_yolox/CMakeLists.txt index 21860854ccd5f..a5498a845e62e 100644 --- a/perception/tensorrt_yolox/CMakeLists.txt +++ b/perception/tensorrt_yolox/CMakeLists.txt @@ -114,4 +114,5 @@ endif() ament_auto_package(INSTALL_TO_SHARE launch + config ) diff --git a/perception/tensorrt_yolox/config/yolox_s_plus_opt.param.yaml b/perception/tensorrt_yolox/config/yolox_s_plus_opt.param.yaml new file mode 100644 index 0000000000000..bc67173442094 --- /dev/null +++ b/perception/tensorrt_yolox/config/yolox_s_plus_opt.param.yaml @@ -0,0 +1,15 @@ +/**: + ros__parameters: + model_path: "$(var data_path)/tensorrt_yolox/$(var model_name).onnx" + label_path: "$(var data_path)/tensorrt_yolox/label.txt" + score_threshold: 0.35 + nms_threshold: 0.7 + precision: "int8" # Operation precision to be used on inference. Valid value is one of: [fp32, fp16, int8]. + calibration_algorithm: "Entropy" # Calibration algorithm to be used for quantization when precision==int8. Valid value is one of: [Entropy, (Legacy | Percentile), MinMax]. + dla_core_id: -1 # If positive ID value is specified, the node assign inference task to the DLA core. + quantize_first_layer: false # If true, set the operating precision for the first (input) layer to be fp16. This option is valid only when precision==int8. + quantize_last_layer: false # If true, set the operating precision for the last (output) layer to be fp16. This option is valid only when precision==int8. + profile_per_layer: false # If true, profiler function will be enabled. Since the profile function may affect execution speed, it is recommended to set this flag true only for development purpose. + clip_value: 6.0 # If positive value is specified, the value of each layer output will be clipped between [0.0, clip_value]. This option is valid only when precision==int8 and used to manually specify the dynamic range instead of using any calibration. + preprocess_on_gpu: true # If true, pre-processing is performed on GPU. + calibration_image_list_path: "" # Path to a file which contains path to images. Those images will be used for int8 quantization. diff --git a/perception/tensorrt_yolox/config/yolox_tiny.param.yaml b/perception/tensorrt_yolox/config/yolox_tiny.param.yaml new file mode 100644 index 0000000000000..e45742a7afb95 --- /dev/null +++ b/perception/tensorrt_yolox/config/yolox_tiny.param.yaml @@ -0,0 +1,15 @@ +/**: + ros__parameters: + model_path: "$(var data_path)/tensorrt_yolox/$(var model_name).onnx" + label_path: "$(var data_path)/tensorrt_yolox/label.txt" + score_threshold: 0.35 + nms_threshold: 0.7 + precision: "fp16" # Operation precision to be used on inference. Valid value is one of: [fp32, fp16, int8]. + calibration_algorithm: "MinMax" # Calibration algorithm to be used for quantization when precision==int8. Valid value is one of: [Entropy, (Legacy | Percentile), MinMax]. + dla_core_id: -1 # If positive ID value is specified, the node assign inference task to the DLA core. + quantize_first_layer: false # If true, set the operating precision for the first (input) layer to be fp16. This option is valid only when precision==int8. + quantize_last_layer: false # If true, set the operating precision for the last (output) layer to be fp16. This option is valid only when precision==int8. + profile_per_layer: false # If true, profiler function will be enabled. Since the profile function may affect execution speed, it is recommended to set this flag true only for development purpose. + clip_value: 0.0 # If positive value is specified, the value of each layer output will be clipped between [0.0, clip_value]. This option is valid only when precision==int8 and used to manually specify the dynamic range instead of using any calibration. + preprocess_on_gpu: true # If true, pre-processing is performed on GPU. + calibration_image_list_path: "" # Path to a file which contains path to images. Those images will be used for int8 quantization. diff --git a/perception/tensorrt_yolox/launch/yolox_s_plus_opt.launch.xml b/perception/tensorrt_yolox/launch/yolox_s_plus_opt.launch.xml index 3f8d7897ab5d3..dd15eda2913ce 100644 --- a/perception/tensorrt_yolox/launch/yolox_s_plus_opt.launch.xml +++ b/perception/tensorrt_yolox/launch/yolox_s_plus_opt.launch.xml @@ -5,30 +5,7 @@ - - - - - - - - - - - - + @@ -40,19 +17,7 @@ - - - - - - - - - - - - - + diff --git a/perception/tensorrt_yolox/launch/yolox_tiny.launch.xml b/perception/tensorrt_yolox/launch/yolox_tiny.launch.xml index 2f08031ea159f..9e5d1c371b13b 100644 --- a/perception/tensorrt_yolox/launch/yolox_tiny.launch.xml +++ b/perception/tensorrt_yolox/launch/yolox_tiny.launch.xml @@ -4,30 +4,7 @@ - - - - - - - - - - - - + @@ -39,19 +16,7 @@ - - - - - - - - - - - - - + diff --git a/perception/tensorrt_yolox/schema/yolox_s_plus_opt.schema.json b/perception/tensorrt_yolox/schema/yolox_s_plus_opt.schema.json new file mode 100644 index 0000000000000..ce1ad6c2d0caf --- /dev/null +++ b/perception/tensorrt_yolox/schema/yolox_s_plus_opt.schema.json @@ -0,0 +1,107 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "Parameters for tensorrt_yolox_s_plus_opt Nodes", + "type": "object", + "definitions": { + "yolox_s_plus_opt": { + "type": "object", + "properties": { + "model_path": { + "type": "string", + "default": "$(var data_path)/tensorrt_yolox/$(var model_name).onnx", + "description": "Path to onnx model." + }, + "label_path": { + "type": "string", + "default": "$(var data_path)/tensorrt_yolox/label.txt", + "description": "Path to label file." + }, + "score_threshold": { + "type": "number", + "default": 0.35, + "minimum": 0.0, + "maximum": 1.0, + "description": "A threshold value of existence probability score, all of objects with score less than this threshold are ignored." + }, + "nms_threshold": { + "type": "number", + "default": 0.7, + "minimum": 0.0, + "maximum": 1.0, + "description": "A threshold value of NMS." + }, + "precision": { + "type": "string", + "default": "int8", + "description": "Operation precision to be used on inference. Valid value is one of: [fp32, fp16, int8]." + }, + "calibration_algorithm": { + "type": "string", + "default": "Entropy", + "description": "Calibration algorithm to be used for quantization when precision==int8. Valid value is one of: [Entropy, (Legacy | Percentile), MinMax]." + }, + "dla_core_id": { + "type": "number", + "default": -1, + "description": "If positive ID value is specified, the node assign inference task to the DLA core." + }, + "quantize_first_layer": { + "type": "boolean", + "default": false, + "description": "If true, set the operating precision for the first (input) layer to be fp16. This option is valid only when precision==int8." + }, + "quantize_last_layer": { + "type": "boolean", + "default": false, + "description": "If true, set the operating precision for the last (output) layer to be fp16. This option is valid only when precision==int8." + }, + "profile_per_layer": { + "type": "boolean", + "default": false, + "description": "If true, profiler function will be enabled. Since the profile function may affect execution speed, it is recommended to set this flag true only for development purpose." + }, + "clip_value": { + "type": "number", + "default": 6.0, + "description": "If positive value is specified, the value of each layer output will be clipped between [0.0, clip_value]. This option is valid only when precision==int8 and used to manually specify the dynamic range instead of using any calibration." + }, + "preprocess_on_gpu": { + "type": "boolean", + "default": true, + "description": "If true, pre-processing is performed on GPU." + }, + "calibration_image_list_path": { + "type": "string", + "default": "", + "description": "Path to a file which contains path to images. Those images will be used for int8 quantization." + } + }, + "required": [ + "model_path", + "label_path", + "score_threshold", + "nms_threshold", + "precision", + "calibration_algorithm", + "dla_core_id", + "quantize_first_layer", + "quantize_last_layer", + "profile_per_layer", + "clip_value", + "preprocess_on_gpu" + ] + } + }, + "properties": { + "/**": { + "type": "object", + "properties": { + "ros__parameters": { + "$ref": "#/definitions/yolox_s_plus_opt" + } + }, + "required": ["ros__parameters"] + } + }, + "required": ["/**"] +} diff --git a/perception/tensorrt_yolox/schema/yolox_tiny.schema.json b/perception/tensorrt_yolox/schema/yolox_tiny.schema.json new file mode 100644 index 0000000000000..f47b28e47a3f8 --- /dev/null +++ b/perception/tensorrt_yolox/schema/yolox_tiny.schema.json @@ -0,0 +1,107 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "Parameters for tensorrt_yolox_tiny Nodes", + "type": "object", + "definitions": { + "yolox_tiny": { + "type": "object", + "properties": { + "model_path": { + "type": "string", + "default": "$(var data_path)/tensorrt_yolox/$(var model_name).onnx", + "description": "Path to onnx model." + }, + "label_path": { + "type": "string", + "default": "$(var data_path)/tensorrt_yolox/label.txt", + "description": "Path to label file." + }, + "score_threshold": { + "type": "number", + "default": 0.35, + "minimum": 0.0, + "maximum": 1.0, + "description": "A threshold value of existence probability score, all of objects with score less than this threshold are ignored." + }, + "nms_threshold": { + "type": "number", + "default": 0.7, + "minimum": 0.0, + "maximum": 1.0, + "description": "A threshold value of NMS." + }, + "precision": { + "type": "string", + "default": "fp16", + "description": "Operation precision to be used on inference. Valid value is one of: [fp32, fp16, int8]." + }, + "calibration_algorithm": { + "type": "string", + "default": "MinMax", + "description": "Calibration algorithm to be used for quantization when precision==int8. Valid value is one of: [Entropy, (Legacy | Percentile), MinMax]." + }, + "dla_core_id": { + "type": "number", + "default": -1, + "description": "If positive ID value is specified, the node assign inference task to the DLA core." + }, + "quantize_first_layer": { + "type": "boolean", + "default": false, + "description": "If true, set the operating precision for the first (input) layer to be fp16. This option is valid only when precision==int8." + }, + "quantize_last_layer": { + "type": "boolean", + "default": false, + "description": "If true, set the operating precision for the last (output) layer to be fp16. This option is valid only when precision==int8." + }, + "profile_per_layer": { + "type": "boolean", + "default": false, + "description": "If true, profiler function will be enabled. Since the profile function may affect execution speed, it is recommended to set this flag true only for development purpose." + }, + "clip_value": { + "type": "number", + "default": 0.0, + "description": "If positive value is specified, the value of each layer output will be clipped between [0.0, clip_value]. This option is valid only when precision==int8 and used to manually specify the dynamic range instead of using any calibration." + }, + "preprocess_on_gpu": { + "type": "boolean", + "default": true, + "description": "If true, pre-processing is performed on GPU." + }, + "calibration_image_list_path": { + "type": "string", + "default": "", + "description": "Path to a file which contains path to images. Those images will be used for int8 quantization." + } + }, + "required": [ + "model_path", + "label_path", + "score_threshold", + "nms_threshold", + "precision", + "calibration_algorithm", + "dla_core_id", + "quantize_first_layer", + "quantize_last_layer", + "profile_per_layer", + "clip_value", + "preprocess_on_gpu" + ] + } + }, + "properties": { + "/**": { + "type": "object", + "properties": { + "ros__parameters": { + "$ref": "#/definitions/yolox_tiny" + } + }, + "required": ["ros__parameters"] + } + }, + "required": ["/**"] +} diff --git a/planning/behavior_path_avoidance_module/include/behavior_path_avoidance_module/data_structs.hpp b/planning/behavior_path_avoidance_module/include/behavior_path_avoidance_module/data_structs.hpp index a536fa1b568cb..223db73e72a4c 100644 --- a/planning/behavior_path_avoidance_module/include/behavior_path_avoidance_module/data_structs.hpp +++ b/planning/behavior_path_avoidance_module/include/behavior_path_avoidance_module/data_structs.hpp @@ -443,9 +443,6 @@ struct AvoidLine : public ShiftLine // Distance from ego to end point in Frenet double end_longitudinal = 0.0; - // for unique_id - UUID id{}; - // for the case the point is created by merge other points std::vector parent_ids{}; diff --git a/planning/behavior_path_avoidance_module/include/behavior_path_avoidance_module/scene.hpp b/planning/behavior_path_avoidance_module/include/behavior_path_avoidance_module/scene.hpp index a74c3a69d7bce..82e2c7af32f8d 100644 --- a/planning/behavior_path_avoidance_module/include/behavior_path_avoidance_module/scene.hpp +++ b/planning/behavior_path_avoidance_module/include/behavior_path_avoidance_module/scene.hpp @@ -404,6 +404,8 @@ class AvoidanceModule : public SceneModuleInterface bool safe_{true}; + std::optional ignore_signal_{std::nullopt}; + std::shared_ptr helper_; std::shared_ptr parameters_; diff --git a/planning/behavior_path_avoidance_module/include/behavior_path_avoidance_module/utils.hpp b/planning/behavior_path_avoidance_module/include/behavior_path_avoidance_module/utils.hpp index 02d8d68cf7a56..2d61571392eef 100644 --- a/planning/behavior_path_avoidance_module/include/behavior_path_avoidance_module/utils.hpp +++ b/planning/behavior_path_avoidance_module/include/behavior_path_avoidance_module/utils.hpp @@ -176,7 +176,7 @@ double calcDistanceToAvoidStartLine( const std::shared_ptr & planner_data, const std::shared_ptr & parameters); -TurnSignalInfo calcTurnSignalInfo( +std::pair calcTurnSignalInfo( const ShiftedPath & path, const ShiftLine & shift_line, const double current_shift_length, const AvoidancePlanningData & data, const std::shared_ptr & planner_data); } // namespace behavior_path_planner::utils::avoidance diff --git a/planning/behavior_path_avoidance_module/src/scene.cpp b/planning/behavior_path_avoidance_module/src/scene.cpp index 75529c35c2af5..27cd15cc525df 100644 --- a/planning/behavior_path_avoidance_module/src/scene.cpp +++ b/planning/behavior_path_avoidance_module/src/scene.cpp @@ -918,12 +918,26 @@ BehaviorModuleOutput AvoidanceModule::plan() BehaviorModuleOutput output; + const auto is_ignore_signal = [this](const UUID & uuid) { + if (!ignore_signal_.has_value()) { + return false; + } + + return ignore_signal_.value() == uuid; + }; + + const auto update_ignore_signal = [this](const UUID & uuid, const bool is_ignore) { + ignore_signal_ = is_ignore ? std::make_optional(uuid) : std::nullopt; + }; + // turn signal info if (path_shifter_.getShiftLines().empty()) { output.turn_signal_info = getPreviousModuleOutput().turn_signal_info; + } else if (is_ignore_signal(path_shifter_.getShiftLines().front().id)) { + output.turn_signal_info = getPreviousModuleOutput().turn_signal_info; } else { const auto original_signal = getPreviousModuleOutput().turn_signal_info; - const auto new_signal = utils::avoidance::calcTurnSignalInfo( + const auto [new_signal, is_ignore] = utils::avoidance::calcTurnSignalInfo( linear_shift_path, path_shifter_.getShiftLines().front(), helper_->getEgoShift(), avoid_data_, planner_data_); const auto current_seg_idx = planner_data_->findEgoSegmentIndex(spline_shift_path.path.points); @@ -931,6 +945,7 @@ BehaviorModuleOutput AvoidanceModule::plan() spline_shift_path.path, getEgoPose(), current_seg_idx, original_signal, new_signal, planner_data_->parameters.ego_nearest_dist_threshold, planner_data_->parameters.ego_nearest_yaw_threshold); + update_ignore_signal(path_shifter_.getShiftLines().front().id, is_ignore); } // sparse resampling for computational cost diff --git a/planning/behavior_path_avoidance_module/src/utils.cpp b/planning/behavior_path_avoidance_module/src/utils.cpp index 6a44350dd48c6..df775ea6b2c0a 100644 --- a/planning/behavior_path_avoidance_module/src/utils.cpp +++ b/planning/behavior_path_avoidance_module/src/utils.cpp @@ -250,16 +250,37 @@ void pushUniqueVector(T & base_vector, const T & additional_vector) base_vector.insert(base_vector.end(), additional_vector.begin(), additional_vector.end()); } +bool isAvoidShift( + const double start_shift_length, const double end_shift_length, const double threshold) +{ + return std::abs(start_shift_length) < threshold && std::abs(end_shift_length) > threshold; +} + +bool isReturnShift( + const double start_shift_length, const double end_shift_length, const double threshold) +{ + return std::abs(start_shift_length) > threshold && std::abs(end_shift_length) < threshold; +} + +bool isLeftMiddleShift( + const double start_shift_length, const double end_shift_length, const double threshold) +{ + return start_shift_length > threshold && end_shift_length > threshold; +} + +bool isRightMiddleShift( + const double start_shift_length, const double end_shift_length, const double threshold) +{ + return start_shift_length < threshold && end_shift_length < threshold; +} + bool existShiftSideLane( const double start_shift_length, const double end_shift_length, const bool no_left_lanes, - const bool no_right_lanes) + const bool no_right_lanes, const double threshold) { - constexpr double THRESHOLD = 0.1; const auto relative_shift_length = end_shift_length - start_shift_length; - const auto avoid_shift = - std::abs(start_shift_length) < THRESHOLD && std::abs(end_shift_length) > THRESHOLD; - if (avoid_shift) { + if (isAvoidShift(start_shift_length, end_shift_length, threshold)) { // Left avoid. But there is no adjacent lane. No need blinker. if (relative_shift_length > 0.0 && no_left_lanes) { return false; @@ -271,9 +292,7 @@ bool existShiftSideLane( } } - const auto return_shift = - std::abs(start_shift_length) > THRESHOLD && std::abs(end_shift_length) < THRESHOLD; - if (return_shift) { + if (isReturnShift(start_shift_length, end_shift_length, threshold)) { // Right return. But there is no adjacent lane. No need blinker. if (relative_shift_length > 0.0 && no_right_lanes) { return false; @@ -285,8 +304,7 @@ bool existShiftSideLane( } } - const auto left_middle_shift = start_shift_length > THRESHOLD && end_shift_length > THRESHOLD; - if (left_middle_shift) { + if (isLeftMiddleShift(start_shift_length, end_shift_length, threshold)) { // Left avoid. But there is no adjacent lane. No need blinker. if (relative_shift_length > 0.0 && no_left_lanes) { return false; @@ -298,8 +316,7 @@ bool existShiftSideLane( } } - const auto right_middle_shift = start_shift_length < THRESHOLD && end_shift_length < THRESHOLD; - if (right_middle_shift) { + if (isRightMiddleShift(start_shift_length, end_shift_length, threshold)) { // Right avoid. But there is no adjacent lane. No need blinker. if (relative_shift_length < 0.0 && no_right_lanes) { return false; @@ -314,6 +331,23 @@ bool existShiftSideLane( return true; } +bool isNearEndOfShift( + const double start_shift_length, const double end_shift_length, const Point & ego_pos, + const lanelet::ConstLanelets & original_lanes, const double threshold) +{ + using boost::geometry::within; + using lanelet::utils::to2D; + using lanelet::utils::conversion::toLaneletPoint; + + if (!isReturnShift(start_shift_length, end_shift_length, threshold)) { + return false; + } + + return std::any_of(original_lanes.begin(), original_lanes.end(), [&ego_pos](const auto & lane) { + return within(to2D(toLaneletPoint(ego_pos)), lane.polygon2d().basicPolygon()); + }); +} + bool straddleRoadBound( const ShiftedPath & path, const ShiftLine & shift_line, const lanelet::ConstLanelets & lanes, const vehicle_info_util::VehicleInfo & vehicle_info) @@ -2323,7 +2357,7 @@ double calcDistanceToReturnDeadLine( return distance_to_return_dead_line; } -TurnSignalInfo calcTurnSignalInfo( +std::pair calcTurnSignalInfo( const ShiftedPath & path, const ShiftLine & shift_line, const double current_shift_length, const AvoidancePlanningData & data, const std::shared_ptr & planner_data) { @@ -2335,22 +2369,22 @@ TurnSignalInfo calcTurnSignalInfo( if (shift_line.start_idx + 1 > path.shift_length.size()) { RCLCPP_WARN(rclcpp::get_logger(__func__), "index inconsistency."); - return {}; + return std::make_pair(TurnSignalInfo{}, true); } if (shift_line.start_idx + 1 > path.path.points.size()) { RCLCPP_WARN(rclcpp::get_logger(__func__), "index inconsistency."); - return {}; + return std::make_pair(TurnSignalInfo{}, true); } if (shift_line.end_idx + 1 > path.shift_length.size()) { RCLCPP_WARN(rclcpp::get_logger(__func__), "index inconsistency."); - return {}; + return std::make_pair(TurnSignalInfo{}, true); } if (shift_line.end_idx + 1 > path.path.points.size()) { RCLCPP_WARN(rclcpp::get_logger(__func__), "index inconsistency."); - return {}; + return std::make_pair(TurnSignalInfo{}, true); } const auto start_shift_length = path.shift_length.at(shift_line.start_idx); @@ -2359,12 +2393,12 @@ TurnSignalInfo calcTurnSignalInfo( // If shift length is shorter than the threshold, it does not need to turn on blinkers if (std::fabs(relative_shift_length) < p.turn_signal_shift_length_threshold) { - return {}; + return std::make_pair(TurnSignalInfo{}, true); } // If the vehicle does not shift anymore, we turn off the blinker if (std::fabs(path.shift_length.at(shift_line.end_idx) - current_shift_length) < THRESHOLD) { - return {}; + return std::make_pair(TurnSignalInfo{}, true); } const auto get_command = [](const auto & shift_length) { @@ -2379,7 +2413,7 @@ TurnSignalInfo calcTurnSignalInfo( p.vehicle_info.max_longitudinal_offset_m; if (signal_prepare_distance < ego_front_to_shift_start) { - return {}; + return std::make_pair(TurnSignalInfo{}, false); } const auto blinker_start_pose = path.path.points.at(shift_line.start_idx).point.pose; @@ -2396,12 +2430,12 @@ TurnSignalInfo calcTurnSignalInfo( turn_signal_info.turn_signal.command = get_command(relative_shift_length); if (!p.turn_signal_on_swerving) { - return turn_signal_info; + return std::make_pair(turn_signal_info, false); } lanelet::ConstLanelet lanelet; if (!rh->getClosestLaneletWithinRoute(shift_line.end, &lanelet)) { - return {}; + return std::make_pair(TurnSignalInfo{}, true); } const auto left_same_direction_lane = rh->getLeftLanelet(lanelet, true, true); @@ -2412,14 +2446,25 @@ TurnSignalInfo calcTurnSignalInfo( const auto has_right_lane = right_same_direction_lane.has_value() || !right_opposite_lanes.empty(); - if (!existShiftSideLane(start_shift_length, end_shift_length, !has_left_lane, !has_right_lane)) { - return {}; + if (!existShiftSideLane( + start_shift_length, end_shift_length, !has_left_lane, !has_right_lane, + p.turn_signal_shift_length_threshold)) { + return std::make_pair(TurnSignalInfo{}, true); } if (!straddleRoadBound(path, shift_line, data.current_lanelets, p.vehicle_info)) { - return {}; + return std::make_pair(TurnSignalInfo{}, true); + } + + constexpr double STOPPED_THRESHOLD = 0.1; // [m/s] + if (ego_speed < STOPPED_THRESHOLD) { + if (isNearEndOfShift( + start_shift_length, end_shift_length, ego_pose.position, data.current_lanelets, + p.turn_signal_shift_length_threshold)) { + return std::make_pair(TurnSignalInfo{}, true); + } } - return turn_signal_info; + return std::make_pair(turn_signal_info, false); } } // namespace behavior_path_planner::utils::avoidance diff --git a/planning/behavior_path_planner_common/include/behavior_path_planner_common/utils/path_shifter/path_shifter.hpp b/planning/behavior_path_planner_common/include/behavior_path_planner_common/utils/path_shifter/path_shifter.hpp index 165a11ebb54b4..67f581123057e 100644 --- a/planning/behavior_path_planner_common/include/behavior_path_planner_common/utils/path_shifter/path_shifter.hpp +++ b/planning/behavior_path_planner_common/include/behavior_path_planner_common/utils/path_shifter/path_shifter.hpp @@ -17,9 +17,11 @@ #include #include +#include #include #include +#include #include #include @@ -31,9 +33,13 @@ using autoware_auto_planning_msgs::msg::PathPointWithLaneId; using autoware_auto_planning_msgs::msg::PathWithLaneId; using geometry_msgs::msg::Point; using geometry_msgs::msg::Pose; +using tier4_autoware_utils::generateUUID; +using unique_identifier_msgs::msg::UUID; struct ShiftLine { + ShiftLine() : id(generateUUID()) {} + Pose start{}; // shift start point in absolute coordinate Pose end{}; // shift start point in absolute coordinate @@ -45,6 +51,9 @@ struct ShiftLine size_t start_idx{}; // associated start-point index for the reference path size_t end_idx{}; // associated end-point index for the reference path + + // for unique_id + UUID id{}; }; using ShiftLineArray = std::vector; diff --git a/planning/route_handler/include/route_handler/route_handler.hpp b/planning/route_handler/include/route_handler/route_handler.hpp index 7f7961f438284..83c814b70f0a5 100644 --- a/planning/route_handler/include/route_handler/route_handler.hpp +++ b/planning/route_handler/include/route_handler/route_handler.hpp @@ -327,6 +327,7 @@ class RouteHandler lanelet::ConstLanelets getShoulderLanelets() const; bool isShoulderLanelet(const lanelet::ConstLanelet & lanelet) const; bool isRouteLanelet(const lanelet::ConstLanelet & lanelet) const; + lanelet::ConstLanelets getPreferredLanelets() const; // for path PathWithLaneId getCenterLinePath( diff --git a/planning/route_handler/src/route_handler.cpp b/planning/route_handler/src/route_handler.cpp index 90c44d9eaecd0..68be0ac33e934 100644 --- a/planning/route_handler/src/route_handler.cpp +++ b/planning/route_handler/src/route_handler.cpp @@ -433,6 +433,11 @@ lanelet::ConstLanelets RouteHandler::getRouteLanelets() const return route_lanelets_; } +lanelet::ConstLanelets RouteHandler::getPreferredLanelets() const +{ + return preferred_lanelets_; +} + Pose RouteHandler::getStartPose() const { if (!route_ptr_) { diff --git a/sensing/pointcloud_preprocessor/CMakeLists.txt b/sensing/pointcloud_preprocessor/CMakeLists.txt index c5f15ec4e49d5..219f43e48730a 100644 --- a/sensing/pointcloud_preprocessor/CMakeLists.txt +++ b/sensing/pointcloud_preprocessor/CMakeLists.txt @@ -211,6 +211,7 @@ ament_export_targets(export_${PROJECT_NAME}) ament_auto_package(INSTALL_TO_SHARE launch + config ) diff --git a/sensing/pointcloud_preprocessor/config/blockage_diagnostics_param_file.yaml b/sensing/pointcloud_preprocessor/config/blockage_diagnostics_param_file.yaml new file mode 100644 index 0000000000000..c932e7f62d5bc --- /dev/null +++ b/sensing/pointcloud_preprocessor/config/blockage_diagnostics_param_file.yaml @@ -0,0 +1,14 @@ +/**: + ros__parameters: + blockage_ratio_threshold: 0.1 + blockage_count_threshold: 50 + blockage_buffering_frames: 2 + blockage_buffering_interval: 1 + dust_ratio_threshold: 0.2 + dust_count_threshold: 10 + dust_kernel_size: 2 + dust_buffering_frames: 10 + dust_buffering_interval: 1 + max_distance_range: 200.0 + horizontal_resolution: 0.4 + blockage_kernel: 10 diff --git a/sensing/pointcloud_preprocessor/docs/blockage_diag.md b/sensing/pointcloud_preprocessor/docs/blockage_diag.md index 32e5a5869109d..082ae180fa3c9 100644 --- a/sensing/pointcloud_preprocessor/docs/blockage_diag.md +++ b/sensing/pointcloud_preprocessor/docs/blockage_diag.md @@ -58,14 +58,17 @@ This implementation inherits `pointcloud_preprocessor::Filter` class, please ref | `horizontal_ring_id` | int | The id of horizontal ring of the LiDAR | | `angle_range` | vector | The effective range of LiDAR | | `vertical_bins` | int | The LiDAR channel number | -| `model` | string | The LiDAR model | +| `is_channel_order_top2down` | bool | If the lidar channels are indexed from top to down | | `blockage_buffering_frames` | int | The number of buffering about blockage detection [range:1-200] | | `blockage_buffering_interval` | int | The interval of buffering about blockage detection | | `dust_ratio_threshold` | float | The threshold of dusty area ratio | | `dust_count_threshold` | int | The threshold of number continuous frames include dusty area | +| `blockage_kernel` | int | The kernel size of morphology processing the detected blockage area | | `dust_kernel_size` | int | The kernel size of morphology processing in dusty area detection | | `dust_buffering_frames` | int | The number of buffering about dusty area detection [range:1-200] | | `dust_buffering_interval` | int | The interval of buffering about dusty area detection | +| `max_distance_range` | double | Maximum view range for the LiDAR | +| `horizontal_resolution` | double | The horizontal resolution of depth map image [deg/pixel] | ## Assumptions / Known limits diff --git a/sensing/pointcloud_preprocessor/include/pointcloud_preprocessor/blockage_diag/blockage_diag_nodelet.hpp b/sensing/pointcloud_preprocessor/include/pointcloud_preprocessor/blockage_diag/blockage_diag_nodelet.hpp index 66e14c418b52c..c1cf1e59f0343 100644 --- a/sensing/pointcloud_preprocessor/include/pointcloud_preprocessor/blockage_diag/blockage_diag_nodelet.hpp +++ b/sensing/pointcloud_preprocessor/include/pointcloud_preprocessor/blockage_diag/blockage_diag_nodelet.hpp @@ -33,6 +33,8 @@ #include #endif +#include + #include #include @@ -80,7 +82,7 @@ class BlockageDiagComponent : public pointcloud_preprocessor::Filter int ground_blockage_count_ = 0; int sky_blockage_count_ = 0; int blockage_count_threshold_; - std::string lidar_model_; + bool is_channel_order_top2down_; int blockage_buffering_frames_; int blockage_buffering_interval_; int dust_kernel_size_; @@ -89,6 +91,10 @@ class BlockageDiagComponent : public pointcloud_preprocessor::Filter int dust_buffering_frame_counter_ = 0; int dust_count_threshold_; int dust_frame_count_ = 0; + double max_distance_range_{200.0}; + double horizontal_resolution_{0.4}; + boost::circular_buffer no_return_mask_buffer{1}; + boost::circular_buffer dust_mask_buffer{1}; public: PCL_MAKE_ALIGNED_OPERATOR_NEW diff --git a/sensing/pointcloud_preprocessor/launch/blockage_diag.launch.xml b/sensing/pointcloud_preprocessor/launch/blockage_diag.launch.xml index 8fa5796e2802d..5a93cb950b827 100644 --- a/sensing/pointcloud_preprocessor/launch/blockage_diag.launch.xml +++ b/sensing/pointcloud_preprocessor/launch/blockage_diag.launch.xml @@ -1,37 +1,18 @@ - - - - - - - - - - - - + + - - - - - - - - - - - + + diff --git a/sensing/pointcloud_preprocessor/src/blockage_diag/blockage_diag_nodelet.cpp b/sensing/pointcloud_preprocessor/src/blockage_diag/blockage_diag_nodelet.cpp index 0dd7088f80262..17085ec0a3120 100644 --- a/sensing/pointcloud_preprocessor/src/blockage_diag/blockage_diag_nodelet.cpp +++ b/sensing/pointcloud_preprocessor/src/blockage_diag/blockage_diag_nodelet.cpp @@ -16,8 +16,6 @@ #include "autoware_point_types/types.hpp" -#include - #include #include @@ -35,7 +33,7 @@ BlockageDiagComponent::BlockageDiagComponent(const rclcpp::NodeOptions & options blockage_ratio_threshold_ = declare_parameter("blockage_ratio_threshold"); vertical_bins_ = declare_parameter("vertical_bins"); angle_range_deg_ = declare_parameter>("angle_range"); - lidar_model_ = declare_parameter("model"); + is_channel_order_top2down_ = declare_parameter("is_channel_order_top2down"); blockage_count_threshold_ = declare_parameter("blockage_count_threshold"); blockage_buffering_frames_ = declare_parameter("blockage_buffering_frames"); blockage_buffering_interval_ = declare_parameter("blockage_buffering_interval"); @@ -44,6 +42,17 @@ BlockageDiagComponent::BlockageDiagComponent(const rclcpp::NodeOptions & options dust_kernel_size_ = declare_parameter("dust_kernel_size"); dust_buffering_frames_ = declare_parameter("dust_buffering_frames"); dust_buffering_interval_ = declare_parameter("dust_buffering_interval"); + max_distance_range_ = declare_parameter("max_distance_range"); + horizontal_resolution_ = declare_parameter("horizontal_resolution"); + blockage_kernel_ = declare_parameter("blockage_kernel"); + } + dust_mask_buffer.set_capacity(dust_buffering_frames_); + no_return_mask_buffer.set_capacity(blockage_buffering_frames_); + if (vertical_bins_ <= horizontal_ring_id_) { + RCLCPP_ERROR( + this->get_logger(), + "The horizontal_ring_id should be smaller than vertical_bins. Skip blockage diag!"); + return; } updater_.setHardwareID("blockage_diag"); @@ -150,24 +159,17 @@ void BlockageDiagComponent::filter( std::scoped_lock lock(mutex_); int vertical_bins = vertical_bins_; int ideal_horizontal_bins; - float distance_coefficient = 327.67f; - float horizontal_resolution_ = 0.4f; - if (lidar_model_ == "Pandar40P") { - distance_coefficient = 327.67f; - horizontal_resolution_ = 0.4f; - } else if (lidar_model_ == "PandarQT") { - distance_coefficient = 3276.75f; - horizontal_resolution_ = 0.6f; + double compensate_angle = 0.0; + // Check the case when angle_range_deg_[1] exceed 360 and shifted the range to 0~360 + if (angle_range_deg_[0] > angle_range_deg_[1]) { + compensate_angle = 360.0; } - ideal_horizontal_bins = - static_cast((angle_range_deg_[1] - angle_range_deg_[0]) / horizontal_resolution_); + ideal_horizontal_bins = static_cast( + (angle_range_deg_[1] + compensate_angle - angle_range_deg_[0]) / horizontal_resolution_); pcl::PointCloud::Ptr pcl_input(new pcl::PointCloud); pcl::fromROSMsg(*input, *pcl_input); - std::vector horizontal_bin_reference(ideal_horizontal_bins); - std::vector> each_ring_pointcloud(vertical_bins); cv::Mat full_size_depth_map( cv::Size(ideal_horizontal_bins, vertical_bins), CV_16UC1, cv::Scalar(0)); - cv::Mat lidar_depth_map(cv::Size(ideal_horizontal_bins, vertical_bins), CV_16UC1, cv::Scalar(0)); cv::Mat lidar_depth_map_8u( cv::Size(ideal_horizontal_bins, vertical_bins), CV_8UC1, cv::Scalar(0)); if (pcl_input->points.empty()) { @@ -184,24 +186,23 @@ void BlockageDiagComponent::filter( sky_blockage_range_deg_[0] = angle_range_deg_[0]; sky_blockage_range_deg_[1] = angle_range_deg_[1]; } else { - for (int i = 0; i < ideal_horizontal_bins; ++i) { - horizontal_bin_reference.at(i) = angle_range_deg_[0] + i * horizontal_resolution_; - } for (const auto p : pcl_input->points) { - for (int horizontal_bin = 0; - horizontal_bin < static_cast(horizontal_bin_reference.size()); horizontal_bin++) { - if ( - (p.azimuth / 100 > - (horizontal_bin_reference.at(horizontal_bin) - horizontal_resolution_ / 2)) && - (p.azimuth / 100 <= - (horizontal_bin_reference.at(horizontal_bin) + horizontal_resolution_ / 2))) { - if (lidar_model_ == "Pandar40P") { - full_size_depth_map.at(p.ring, horizontal_bin) = - UINT16_MAX - distance_coefficient * p.distance; - } else if (lidar_model_ == "PandarQT") { - full_size_depth_map.at(vertical_bins - p.ring - 1, horizontal_bin) = - UINT16_MAX - distance_coefficient * p.distance; - } + double azimuth_deg = p.azimuth / 100.; + if ( + ((azimuth_deg > angle_range_deg_[0]) && + (azimuth_deg <= angle_range_deg_[1] + compensate_angle)) || + ((azimuth_deg + compensate_angle > angle_range_deg_[0]) && + (azimuth_deg < angle_range_deg_[1]))) { + double current_angle_range = (azimuth_deg + compensate_angle - angle_range_deg_[0]); + int horizontal_bin_index = static_cast(current_angle_range / horizontal_resolution_) % + static_cast(360.0 / horizontal_resolution_); + uint16_t depth_intensity = + UINT16_MAX * (1.0 - std::min(p.distance / max_distance_range_, 1.0)); + if (is_channel_order_top2down_) { + full_size_depth_map.at(p.ring, horizontal_bin_index) = depth_intensity; + } else { + full_size_depth_map.at(vertical_bins - p.ring - 1, horizontal_bin_index) = + depth_intensity; } } } @@ -215,7 +216,6 @@ void BlockageDiagComponent::filter( cv::Point(blockage_kernel_, blockage_kernel_)); cv::erode(no_return_mask, erosion_dst, blockage_element); cv::dilate(erosion_dst, no_return_mask, blockage_element); - static boost::circular_buffer no_return_mask_buffer(blockage_buffering_frames_); cv::Mat time_series_blockage_result( cv::Size(ideal_horizontal_bins, vertical_bins), CV_8UC1, cv::Scalar(0)); cv::Mat time_series_blockage_mask( @@ -250,8 +250,13 @@ void BlockageDiagComponent::filter( ground_blockage_ratio_ = static_cast(cv::countNonZero(ground_no_return_mask)) / static_cast(ideal_horizontal_bins * (vertical_bins - horizontal_ring_id_)); - sky_blockage_ratio_ = static_cast(cv::countNonZero(sky_no_return_mask)) / - static_cast(ideal_horizontal_bins * horizontal_ring_id_); + + if (horizontal_ring_id_ == 0) { + sky_blockage_ratio_ = 0.0f; + } else { + sky_blockage_ratio_ = static_cast(cv::countNonZero(sky_no_return_mask)) / + static_cast(ideal_horizontal_bins * horizontal_ring_id_); + } if (ground_blockage_ratio_ > blockage_ratio_threshold_) { cv::Rect ground_blockage_bb = cv::boundingRect(ground_no_return_mask); @@ -295,7 +300,6 @@ void BlockageDiagComponent::filter( cv::inRange(single_dust_ground_img, 254, 255, single_dust_ground_img); cv::Mat ground_mask(cv::Size(ideal_horizontal_bins, horizontal_ring_id_), CV_8UC1); cv::vconcat(sky_blank, single_dust_ground_img, single_dust_img); - static boost::circular_buffer dust_mask_buffer(dust_buffering_frames_); cv::Mat binarized_dust_mask_( cv::Size(ideal_horizontal_bins, vertical_bins), CV_8UC1, cv::Scalar(0)); cv::Mat multi_frame_dust_mask( @@ -405,8 +409,8 @@ rcl_interfaces::msg::SetParametersResult BlockageDiagComponent::paramCallback( RCLCPP_DEBUG( get_logger(), "Setting new blockage_count_threshold to: %d.", blockage_count_threshold_); } - if (get_param(p, "model", lidar_model_)) { - RCLCPP_DEBUG(get_logger(), "Setting new lidar model to: %s. ", lidar_model_.c_str()); + if (get_param(p, "is_channel_order_top2down", is_channel_order_top2down_)) { + RCLCPP_DEBUG(get_logger(), "Setting new lidar model to: %d. ", is_channel_order_top2down_); } if (get_param(p, "angle_range", angle_range_deg_)) { RCLCPP_DEBUG( diff --git a/system/default_ad_api/src/interface.cpp b/system/default_ad_api/src/interface.cpp index 65d16010951a4..0b90e1c4c79a7 100644 --- a/system/default_ad_api/src/interface.cpp +++ b/system/default_ad_api/src/interface.cpp @@ -21,7 +21,7 @@ InterfaceNode::InterfaceNode(const rclcpp::NodeOptions & options) : Node("interf { const auto on_interface_version = [](auto, auto res) { res->major = 1; - res->minor = 0; + res->minor = 1; res->patch = 0; }; diff --git a/system/default_ad_api/test/node/interface_version.py b/system/default_ad_api/test/node/interface_version.py index 19be3dc714c22..4694f3af642ce 100644 --- a/system/default_ad_api/test/node/interface_version.py +++ b/system/default_ad_api/test/node/interface_version.py @@ -30,7 +30,7 @@ if response.major != 1: exit(1) -if response.minor != 0: +if response.minor != 1: exit(1) if response.patch != 0: exit(1)