From 40d7a98ff13137b0131871c42a0d2418f96e97bc Mon Sep 17 00:00:00 2001 From: Vishal Chauhan <40782713+vish0012@users.noreply.github.com> Date: Fri, 14 Feb 2025 15:02:24 +0900 Subject: [PATCH 1/3] feat(autoware_traffic_light_map_based_detector): created the schema file,updated the readme file and deleted the default parameter in node files code (#10107) * feat(autoware_traffic_light_map_based_detector): Created the schema file,updated the readme file and deleted the default parameter in node files code Signed-off-by: vish0012 * style(pre-commit): autofix * move params from launch to param Signed-off-by: MasatoSaeki * chore Signed-off-by: MasatoSaeki --------- Signed-off-by: vish0012 Signed-off-by: MasatoSaeki Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: MasatoSaeki --- ...traffic_light_map_based_detector.launch.py | 3 - .../README.md | 14 +-- ...raffic_light_map_based_detector.param.yaml | 2 + ...raffic_light_map_based_detector.launch.xml | 7 -- ...affic_light_map_based_detector.schema.json | 95 +++++++++++++++++++ .../traffic_light_map_based_detector_node.cpp | 23 +++-- 6 files changed, 109 insertions(+), 35 deletions(-) create mode 100644 perception/autoware_traffic_light_map_based_detector/schema/traffic_light_map_based_detector.schema.json diff --git a/launch/tier4_perception_launch/launch/traffic_light_recognition/traffic_light_map_based_detector.launch.py b/launch/tier4_perception_launch/launch/traffic_light_recognition/traffic_light_map_based_detector.launch.py index e38c05f9caa3e..defc4a534072b 100644 --- a/launch/tier4_perception_launch/launch/traffic_light_recognition/traffic_light_map_based_detector.launch.py +++ b/launch/tier4_perception_launch/launch/traffic_light_recognition/traffic_light_map_based_detector.launch.py @@ -40,9 +40,6 @@ def create_traffic_light_map_based_detector(namespace, context): "input/camera_info": f"/sensing/camera/{namespace}/camera_info", "expect/rois": "expect/rois", "output/rois": output_rois, - # This parameter should be configured differently for each camera considering their delay. - "min_timestamp_offset": "-0.3", - "max_timestamp_offset": "0.0", }.items() group = GroupAction( diff --git a/perception/autoware_traffic_light_map_based_detector/README.md b/perception/autoware_traffic_light_map_based_detector/README.md index 6ef54d448b415..01b6357c3377d 100644 --- a/perception/autoware_traffic_light_map_based_detector/README.md +++ b/perception/autoware_traffic_light_map_based_detector/README.md @@ -29,16 +29,4 @@ If the node receives no route information, it looks at them within a radius of ` ## Node parameters -| Parameter | Type | Description | -| ------------------------------------------ | ------ | ----------------------------------------------------------------------------------------------- | -| `max_vibration_pitch` | double | Maximum error in pitch direction. If -5~+5, it will be 10. | -| `max_vibration_yaw` | double | Maximum error in yaw direction. If -5~+5, it will be 10. | -| `max_vibration_height` | double | Maximum error in height direction. If -5~+5, it will be 10. | -| `max_vibration_width` | double | Maximum error in width direction. If -5~+5, it will be 10. | -| `max_vibration_depth` | double | Maximum error in depth direction. If -5~+5, it will be 10. | -| `max_detection_range` | double | Maximum detection range in meters. Must be positive. | -| `min_timestamp_offset` | double | Minimum timestamp offset when searching for corresponding tf. | -| `max_timestamp_offset` | double | Maximum timestamp offset when searching for corresponding tf. | -| `timestamp_sample_len` | double | Sampling length between min_timestamp_offset and max_timestamp_offset. | -| `car_traffic_light_max_angle_range` | double | Maximum angle between the vehicular traffic light and the camera in degrees. Must be positive. | -| `pedestrian_traffic_light_max_angle_range` | double | Maximum angle between the pedestrian traffic light and the camera in degrees. Must be positive. | +{{ json_to_markdown("perception/autoware_traffic_light_map_based_detector/schema/traffic_light_map_based_detector.schema.json") }} diff --git a/perception/autoware_traffic_light_map_based_detector/config/traffic_light_map_based_detector.param.yaml b/perception/autoware_traffic_light_map_based_detector/config/traffic_light_map_based_detector.param.yaml index 801e6b1bc8558..10e22b7d82bab 100644 --- a/perception/autoware_traffic_light_map_based_detector/config/traffic_light_map_based_detector.param.yaml +++ b/perception/autoware_traffic_light_map_based_detector/config/traffic_light_map_based_detector.param.yaml @@ -6,6 +6,8 @@ max_vibration_width: 0.5 # -0.25 ~ 0.25 m max_vibration_depth: 0.5 # -0.25 ~ 0.25 m max_detection_range: 200.0 + min_timestamp_offset: -0.3 + max_timestamp_offset: 0.0 timestamp_sample_len: 0.02 car_traffic_light_max_angle_range: 40.0 pedestrian_traffic_light_max_angle_range: 80.0 diff --git a/perception/autoware_traffic_light_map_based_detector/launch/traffic_light_map_based_detector.launch.xml b/perception/autoware_traffic_light_map_based_detector/launch/traffic_light_map_based_detector.launch.xml index 39026c85c1cef..3e0d4651bf3b4 100644 --- a/perception/autoware_traffic_light_map_based_detector/launch/traffic_light_map_based_detector.launch.xml +++ b/perception/autoware_traffic_light_map_based_detector/launch/traffic_light_map_based_detector.launch.xml @@ -5,11 +5,6 @@ - - - - - @@ -19,7 +14,5 @@ - - diff --git a/perception/autoware_traffic_light_map_based_detector/schema/traffic_light_map_based_detector.schema.json b/perception/autoware_traffic_light_map_based_detector/schema/traffic_light_map_based_detector.schema.json new file mode 100644 index 0000000000000..77191ab8b0eaa --- /dev/null +++ b/perception/autoware_traffic_light_map_based_detector/schema/traffic_light_map_based_detector.schema.json @@ -0,0 +1,95 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "autoware_traffic_light_map_based_detector parameter", + "type": "object", + "definitions": { + "traffic_light_map_based_detector": { + "type": "object", + "properties": { + "max_vibration_pitch": { + "type": "number", + "description": "Maximum error in pitch direction. If -5~+5, it will be 10.", + "default": 0.01745329251 + }, + "max_vibration_yaw": { + "type": "number", + "description": "Maximum error in yaw direction. If -5~+5, it will be 10.", + "default": 0.01745329251 + }, + "max_vibration_height": { + "type": "number", + "description": "Maximum error in height direction. If -5~+5, it will be 10.", + "default": 0.5 + }, + "max_vibration_width": { + "type": "number", + "description": "Maximum error in width direction. If -5~+5, it will be 10.", + "default": 0.5 + }, + "max_vibration_depth": { + "type": "number", + "description": "Maximum error in depth direction. If -5~+5, it will be 10.", + "default": 0.5 + }, + "max_detection_range": { + "type": "number", + "description": "Maximum detection range in meters. Must be positive.", + "default": 200.0 + }, + "min_timestamp_offset": { + "type": "number", + "description": "Minimum timestamp offset when searching for corresponding tf.", + "default": -0.3 + }, + "max_timestamp_offset": { + "type": "number", + "description": "Maximum timestamp offset when searching for corresponding tf.", + "default": 0.0 + }, + "timestamp_sample_len": { + "type": "number", + "description": "Sampling length between min_timestamp_offset and max_timestamp_offset.", + "default": 0.02 + }, + "car_traffic_light_max_angle_range": { + "type": "number", + "description": "Maximum angle range for detecting car traffic lights (degrees).", + "default": 40.0 + }, + "pedestrian_traffic_light_max_angle_range": { + "type": "number", + "description": "Maximum angle range for detecting pedestrian traffic lights (degrees).", + "default": 80.0 + } + }, + "required": [ + "max_vibration_pitch", + "max_vibration_yaw", + "max_vibration_height", + "max_vibration_width", + "max_vibration_depth", + "max_detection_range", + "min_timestamp_offset", + "max_timestamp_offset", + "timestamp_sample_len", + "car_traffic_light_max_angle_range", + "pedestrian_traffic_light_max_angle_range" + ], + "additionalProperties": false + } + }, + "properties": { + "/**": { + "type": "object", + "properties": { + "ros__parameters": { + "$ref": "#/definitions/traffic_light_map_based_detector" + } + }, + "required": ["ros__parameters"], + "additionalProperties": false + } + }, + "required": ["/**"], + "additionalProperties": false +} diff --git a/perception/autoware_traffic_light_map_based_detector/src/traffic_light_map_based_detector_node.cpp b/perception/autoware_traffic_light_map_based_detector/src/traffic_light_map_based_detector_node.cpp index 5e74d77df644f..6171e85223c27 100644 --- a/perception/autoware_traffic_light_map_based_detector/src/traffic_light_map_based_detector_node.cpp +++ b/perception/autoware_traffic_light_map_based_detector/src/traffic_light_map_based_detector_node.cpp @@ -132,20 +132,19 @@ MapBasedDetector::MapBasedDetector(const rclcpp::NodeOptions & node_options) { using std::placeholders::_1; - // parameter declaration needs default values: are 0.0 goof defaults for this? - config_.max_vibration_pitch = declare_parameter("max_vibration_pitch", 0.0); - config_.max_vibration_yaw = declare_parameter("max_vibration_yaw", 0.0); - config_.max_vibration_height = declare_parameter("max_vibration_height", 0.0); - config_.max_vibration_width = declare_parameter("max_vibration_width", 0.0); - config_.max_vibration_depth = declare_parameter("max_vibration_depth", 0.0); - config_.min_timestamp_offset = declare_parameter("min_timestamp_offset", 0.0); - config_.max_timestamp_offset = declare_parameter("max_timestamp_offset", 0.0); - config_.timestamp_sample_len = declare_parameter("timestamp_sample_len", 0.01); - config_.max_detection_range = declare_parameter("max_detection_range", 200.0); + config_.max_vibration_pitch = this->declare_parameter("max_vibration_pitch"); + config_.max_vibration_yaw = this->declare_parameter("max_vibration_yaw"); + config_.max_vibration_height = this->declare_parameter("max_vibration_height"); + config_.max_vibration_width = this->declare_parameter("max_vibration_width"); + config_.max_vibration_depth = this->declare_parameter("max_vibration_depth"); + config_.min_timestamp_offset = this->declare_parameter("min_timestamp_offset"); + config_.max_timestamp_offset = this->declare_parameter("max_timestamp_offset"); + config_.timestamp_sample_len = this->declare_parameter("timestamp_sample_len"); + config_.max_detection_range = this->declare_parameter("max_detection_range"); config_.car_traffic_light_max_angle_range = - declare_parameter("car_traffic_light_max_angle_range", 40.0); + this->declare_parameter("car_traffic_light_max_angle_range"); config_.pedestrian_traffic_light_max_angle_range = - declare_parameter("pedestrian_traffic_light_max_angle_range", 80.0); + this->declare_parameter("pedestrian_traffic_light_max_angle_range"); if (config_.max_detection_range <= 0) { RCLCPP_ERROR_STREAM( From 110e4cffcc56ec54e694b02fea89cef62ed9ad74 Mon Sep 17 00:00:00 2001 From: Takahisa Ishikawa Date: Fri, 14 Feb 2025 15:10:55 +0900 Subject: [PATCH 2/3] feat(distortion_corrector_node): replace imu and twist callback with polling subscriber (#10057) * fix(distortion_corrector_node): replace imu and twist callback with polling subscriber Changed to read data in bulk using take to reduce subscription callback overhead. Especially effective when the frequency of imu or twist is high, such as 100Hz. Signed-off-by: Takahisa.Ishikawa * fix(distortion_corrector_node): include vector header for cpplint check Signed-off-by: Takahisa.Ishikawa --------- Signed-off-by: Takahisa.Ishikawa Co-authored-by: Takahisa.Ishikawa Co-authored-by: Yi-Hsiang Fang (Vivid) <146902905+vividf@users.noreply.github.com> --- .../distortion_corrector_node.hpp | 11 ++-- .../distortion_corrector_node.cpp | 50 ++++++++++--------- 2 files changed, 33 insertions(+), 28 deletions(-) diff --git a/sensing/autoware_pointcloud_preprocessor/include/autoware/pointcloud_preprocessor/distortion_corrector/distortion_corrector_node.hpp b/sensing/autoware_pointcloud_preprocessor/include/autoware/pointcloud_preprocessor/distortion_corrector/distortion_corrector_node.hpp index b96774c37f621..0188c1af97ab7 100644 --- a/sensing/autoware_pointcloud_preprocessor/include/autoware/pointcloud_preprocessor/distortion_corrector/distortion_corrector_node.hpp +++ b/sensing/autoware_pointcloud_preprocessor/include/autoware/pointcloud_preprocessor/distortion_corrector/distortion_corrector_node.hpp @@ -18,6 +18,7 @@ #include "autoware/pointcloud_preprocessor/distortion_corrector/distortion_corrector.hpp" #include +#include #include #include @@ -40,8 +41,11 @@ class DistortionCorrectorComponent : public rclcpp::Node explicit DistortionCorrectorComponent(const rclcpp::NodeOptions & options); private: - rclcpp::Subscription::SharedPtr twist_sub_; - rclcpp::Subscription::SharedPtr imu_sub_; + autoware::universe_utils::InterProcessPollingSubscriber< + geometry_msgs::msg::TwistWithCovarianceStamped, + autoware::universe_utils::polling_policy::All>::SharedPtr twist_sub_; + autoware::universe_utils::InterProcessPollingSubscriber< + sensor_msgs::msg::Imu, autoware::universe_utils::polling_policy::All>::SharedPtr imu_sub_; rclcpp::Subscription::SharedPtr pointcloud_sub_; rclcpp::Publisher::SharedPtr undistorted_pointcloud_pub_; @@ -59,9 +63,6 @@ class DistortionCorrectorComponent : public rclcpp::Node std::unique_ptr distortion_corrector_; void pointcloud_callback(PointCloud2::UniquePtr pointcloud_msg); - void twist_callback( - const geometry_msgs::msg::TwistWithCovarianceStamped::ConstSharedPtr twist_msg); - void imu_callback(const sensor_msgs::msg::Imu::ConstSharedPtr imu_msg); }; } // namespace autoware::pointcloud_preprocessor diff --git a/sensing/autoware_pointcloud_preprocessor/src/distortion_corrector/distortion_corrector_node.cpp b/sensing/autoware_pointcloud_preprocessor/src/distortion_corrector/distortion_corrector_node.cpp index cc05a6cc2765c..4c0227de7c701 100644 --- a/sensing/autoware_pointcloud_preprocessor/src/distortion_corrector/distortion_corrector_node.cpp +++ b/sensing/autoware_pointcloud_preprocessor/src/distortion_corrector/distortion_corrector_node.cpp @@ -19,6 +19,7 @@ #include #include #include +#include namespace autoware::pointcloud_preprocessor { @@ -28,8 +29,8 @@ DistortionCorrectorComponent::DistortionCorrectorComponent(const rclcpp::NodeOpt { // initialize debug tool - using autoware::universe_utils::DebugPublisher; - using autoware::universe_utils::StopWatch; + using universe_utils::DebugPublisher; + using universe_utils::StopWatch; stop_watch_ptr_ = std::make_unique>(); debug_publisher_ = std::make_unique(this, "distortion_corrector"); stop_watch_ptr_->tic("cyclic_time"); @@ -52,13 +53,18 @@ DistortionCorrectorComponent::DistortionCorrectorComponent(const rclcpp::NodeOpt "~/output/pointcloud", rclcpp::SensorDataQoS(), pub_options); } + // Twist queue size needs to be larger than 'twist frequency' / 'pointcloud frequency'. + // To avoid individual tuning, a sufficiently large value is hard-coded. + // With 100, it can handle twist updates up to 1000Hz if the pointcloud is 10Hz. + const uint16_t TWIST_QUEUE_SIZE = 100; + // Subscriber - twist_sub_ = this->create_subscription( - "~/input/twist", 10, - std::bind(&DistortionCorrectorComponent::twist_callback, this, std::placeholders::_1)); - imu_sub_ = this->create_subscription( - "~/input/imu", 10, - std::bind(&DistortionCorrectorComponent::imu_callback, this, std::placeholders::_1)); + twist_sub_ = universe_utils::InterProcessPollingSubscriber< + geometry_msgs::msg::TwistWithCovarianceStamped, universe_utils::polling_policy::All>:: + create_subscription(this, "~/input/twist", rclcpp::QoS(TWIST_QUEUE_SIZE)); + imu_sub_ = universe_utils::InterProcessPollingSubscriber< + sensor_msgs::msg::Imu, universe_utils::polling_policy::All>:: + create_subscription(this, "~/input/imu", rclcpp::QoS(TWIST_QUEUE_SIZE)); pointcloud_sub_ = this->create_subscription( "~/input/pointcloud", rclcpp::SensorDataQoS(), std::bind(&DistortionCorrectorComponent::pointcloud_callback, this, std::placeholders::_1)); @@ -72,21 +78,6 @@ DistortionCorrectorComponent::DistortionCorrectorComponent(const rclcpp::NodeOpt } } -void DistortionCorrectorComponent::twist_callback( - const geometry_msgs::msg::TwistWithCovarianceStamped::ConstSharedPtr twist_msg) -{ - distortion_corrector_->process_twist_message(twist_msg); -} - -void DistortionCorrectorComponent::imu_callback(const sensor_msgs::msg::Imu::ConstSharedPtr imu_msg) -{ - if (!use_imu_) { - return; - } - - distortion_corrector_->process_imu_message(base_frame_, imu_msg); -} - void DistortionCorrectorComponent::pointcloud_callback(PointCloud2::UniquePtr pointcloud_msg) { stop_watch_ptr_->toc("processing_time", true); @@ -97,6 +88,19 @@ void DistortionCorrectorComponent::pointcloud_callback(PointCloud2::UniquePtr po return; } + std::vector twist_msgs = + twist_sub_->takeData(); + for (const auto & msg : twist_msgs) { + distortion_corrector_->process_twist_message(msg); + } + + if (use_imu_) { + std::vector imu_msgs = imu_sub_->takeData(); + for (const auto & msg : imu_msgs) { + distortion_corrector_->process_imu_message(base_frame_, msg); + } + } + distortion_corrector_->set_pointcloud_transform(base_frame_, pointcloud_msg->header.frame_id); distortion_corrector_->initialize(); From 1180c8d02ca9ff80151d49d4d8f2a55dc537e03f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mete=20Fatih=20C=C4=B1r=C4=B1t?= Date: Fri, 14 Feb 2025 15:47:38 +0900 Subject: [PATCH 3/3] feat!: move autoware_testing from universe to core (#10117) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mete Fatih Cırıt --- common/autoware_testing/CHANGELOG.rst | 399 ------------------ common/autoware_testing/CMakeLists.txt | 13 - .../autoware_testing-extras.cmake | 17 - .../autoware_testing/__init__.py | 0 .../autoware_testing/smoke_test.py | 120 ------ .../cmake/add_smoke_test.cmake | 56 --- .../design/autoware_testing-design.md | 66 --- common/autoware_testing/package.xml | 28 -- .../resource/autoware_testing | 0 common/autoware_testing/setup.cfg | 4 - common/autoware_testing/setup.py | 23 - 11 files changed, 726 deletions(-) delete mode 100644 common/autoware_testing/CHANGELOG.rst delete mode 100644 common/autoware_testing/CMakeLists.txt delete mode 100644 common/autoware_testing/autoware_testing-extras.cmake delete mode 100644 common/autoware_testing/autoware_testing/__init__.py delete mode 100644 common/autoware_testing/autoware_testing/smoke_test.py delete mode 100644 common/autoware_testing/cmake/add_smoke_test.cmake delete mode 100644 common/autoware_testing/design/autoware_testing-design.md delete mode 100644 common/autoware_testing/package.xml delete mode 100644 common/autoware_testing/resource/autoware_testing delete mode 100644 common/autoware_testing/setup.cfg delete mode 100644 common/autoware_testing/setup.py diff --git a/common/autoware_testing/CHANGELOG.rst b/common/autoware_testing/CHANGELOG.rst deleted file mode 100644 index 5ee6a2c9556de..0000000000000 --- a/common/autoware_testing/CHANGELOG.rst +++ /dev/null @@ -1,399 +0,0 @@ -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -Changelog for package autoware_testing -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -0.41.0 (2025-01-29) -------------------- - -0.40.0 (2024-12-12) -------------------- -* Revert "chore(package.xml): bump version to 0.39.0 (`#9587 `_)" - This reverts commit c9f0f2688c57b0f657f5c1f28f036a970682e7f5. -* fix: fix ticket links in CHANGELOG.rst (`#9588 `_) -* chore(package.xml): bump version to 0.39.0 (`#9587 `_) - * chore(package.xml): bump version to 0.39.0 - * fix: fix ticket links in CHANGELOG.rst - * fix: remove unnecessary diff - --------- - Co-authored-by: Yutaka Kondo -* fix: fix ticket links in CHANGELOG.rst (`#9588 `_) -* 0.39.0 -* update changelog -* fix: fix ticket links to point to https://github.com/autowarefoundation/autoware.universe (`#9304 `_) -* fix: fix ticket links to point to https://github.com/autowarefoundation/autoware.universe (`#9304 `_) -* chore(package.xml): bump version to 0.38.0 (`#9266 `_) (`#9284 `_) - * unify package.xml version to 0.37.0 - * remove system_monitor/CHANGELOG.rst - * add changelog - * 0.38.0 - --------- -* Contributors: Esteve Fernandez, Fumiya Watanabe, Ryohsuke Mitsudome, Yutaka Kondo - -0.39.0 (2024-11-25) -------------------- -* fix: fix ticket links to point to https://github.com/autowarefoundation/autoware.universe (`#9304 `_) -* fix: fix ticket links to point to https://github.com/autowarefoundation/autoware.universe (`#9304 `_) -* chore(package.xml): bump version to 0.38.0 (`#9266 `_) (`#9284 `_) - * unify package.xml version to 0.37.0 - * remove system_monitor/CHANGELOG.rst - * add changelog - * 0.38.0 - --------- -* Contributors: Esteve Fernandez, Yutaka Kondo - -0.38.0 (2024-11-08) -------------------- -* unify package.xml version to 0.37.0 -* Contributors: Yutaka Kondo - -0.26.0 (2024-04-03) -------------------- -* chore: add maintainer (`#4234 `_) - * chore: add maintainer - * Update evaluator/localization_evaluator/package.xml - Co-authored-by: kminoda <44218668+kminoda@users.noreply.github.com> - --------- - Co-authored-by: kminoda <44218668+kminoda@users.noreply.github.com> -* fix(smoke_test): fix smoke test failing with big nodes (`#3287 `_) - * fix(smoke_test): fix smoke test failing with big nodes - * style(pre-commit): autofix - * minor style changes and comment removal - * moved params to right files - * added smoke test support for multiple tests with different params - added general support for multiple smoke tests for one node with different params and added tests for trajectory_follower_node with different controllers - * style(pre-commit): autofix - * Parameters structure copied from autoware launch - * Fixed GTests and Readme - --------- - Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> - Co-authored-by: Takamasa Horibe -* build: mark autoware_cmake as (`#3616 `_) - * build: mark autoware_cmake as - with , autoware_cmake is automatically exported with ament_target_dependencies() (unecessary) - * style(pre-commit): autofix - * chore: fix pre-commit errors - --------- - Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> - Co-authored-by: Kenji Miyake -* build(autoware_testing): add missing dependencies (`#3093 `_) -* ci(pre-commit): autoupdate (`#2819 `_) - Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> -* docs: update link style and fix typos (`#950 `_) - * feat(state_rviz_plugin): add GateMode and PathChangeApproval Button (`#894 `_) - * feat(state_rviz_plugin): add GateMode and PathChangeApproval Button - * ci(pre-commit): autofix - Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> - * docs: update link style - * chore: fix link - * feat(map_tf_generator): accelerate the 'viewer' coordinate calculation (`#890 `_) - * add random point sampling function to quickly calculate the 'viewer' coordinate - Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> - Co-authored-by: Kenji Miyake <31987104+kenji-miyake@users.noreply.github.com> - * docs(obstacle_stop_planner): update documentation (`#880 `_) - * docs(tier4_traffic_light_rviz_plugin): update documentation (`#905 `_) - * fix(accel_brake_map_calibrator): rviz panel type (`#895 `_) - * fixed panel type - * modified instruction for rosbag replay case - * modified update_map_dir service name - * fix(behavior velocity planner): skipping emplace back stop reason if it is empty (`#898 `_) - * skipping emplace back stop reason if it is empty - * add braces - * ci(pre-commit): autofix - Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> - Co-authored-by: Takagi, Isamu <43976882+isamu-takagi@users.noreply.github.com> - * feat(behavior_path_planner): weakened noise filtering of drivable area (`#838 `_) - * feat(behavior_path_planner): Weakened noise filtering of drivable area - * fix lanelet's longitudinal disconnection - * add comments of erode/dilate process - * refactor(vehicle-cmd-gate): using namespace for msgs (`#913 `_) - * refactor(vehicle-cmd-gate): using namespace for msgs - * for clang - * feat(pose_initializer): introduce an array copy function (`#900 `_) - Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> - * feat: add lidar point filter when debug (`#865 `_) - * feat: add lidar point filter when debug - * ci(pre-commit): autofix - Co-authored-by: suchang - Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> - * feat(component_interface_utils): add interface classes (`#899 `_) - * feat(component_interface_utils): add interface classes - * feat(default_ad_api): apply the changes of interface utils - * fix(component_interface_utils): remove old comment - * fix(component_interface_utils): add client log - * fix(component_interface_utils): remove unimplemented message - * docs(component_interface_utils): add design policy - * docs(component_interface_utils): add comment - * refactor(vehicle_cmd_gate): change namespace in launch file (`#927 `_) - Co-authored-by: Berkay - * feat: visualize lane boundaries (`#923 `_) - * feat: visualize lane boundaries - * fix: start_bound - * ci(pre-commit): autofix - Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> - * fix(system_monitor): fix truncation warning in strncpy (`#872 `_) - * fix(system_monitor): fix truncation warning in strncpy - * Use std::string constructor to copy char array - * Fixed typo - * fix(behavior_velocity_planner.stopline): extend following and previous search range to avoid no collision (`#917 `_) - * fix: extend following and previous search range to avoid no collision - * chore: add debug marker - * fix: simplify logic - * chore: update debug code - * fix: delete space - * fix: some fix - * ci(pre-commit): autofix - * fix: delete debug code - Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> - * docs(surround obstacle checker): update documentation (`#878 `_) - * docs(surround_obstacle_checker): update pub/sub topics & params - * docs(surround_obstacle_checker): remove unused files - * docs(surround_obstacke_checker): update purpose - * feat(tier4_autoware_utils): add vehicle state checker (`#896 `_) - * feat(tier4_autoware_utils): add vehicle state checker - * fix(tier4_autoware_utils): use absolute value - * feat(tier4_autoware_utils): divide into two classies - * test(tier4_autoware_utils): add unit test for vehicle_state checker - * fix(tier4_autoware_utils): impl class inheritance - * docs(tier4_autoware_utils): add vehicle_state_checker document - * fix(tier4_autoware_utils): into same loop - * fix(tier4_autoware_utils): fix variables name - * fix(tier4_autoware_utils): remove redundant codes - * fix(motion_velocity_smoother): fix overwriteStopPoint using backward point (`#816 `_) - * fix(motion_velocity_smoother): fix overwriteStopPoint using backward point - * Modify overwriteStopPoint input and output - * feat(obstacle_avoidance_planner): explicitly insert zero velocity (`#906 `_) - * feat(obstacle_avoidance_planner) fix bug of stop line unalignment - * fix bug of unsorted output points - * move calcVelocity in node.cpp - * fix build error - * feat(behavior_velocity): find occlusion more efficiently (`#829 `_) - * fix(system_monitor): add some smart information to diagnostics (`#708 `_) - * feat(obstacle_avoidance_planner): dealt with close lane change (`#921 `_) - * feat(obstacle_avoidance_planner): dealt with close lane change - * fix bug of right lane change - * feat(obstacle_avoidance_planner): some fix for narrow driving (`#916 `_) - * use car like constraints in mpt - * use not widest bounds for the first bounds - * organized params - * fix format - * prepare rear_drive and uniform_circle constraints - * fix param callback - * update config - * remove unnecessary files - * update tier4_planning_launch params - * chore(obstacle_avoidance_planner): removed obsolete obstacle_avoidance_planner doc in Japanese (`#919 `_) - * chore(behavior_velocity_planner.stopline): add debug marker for stopline collision check (`#932 `_) - * chore(behavior_velocity_planner.stopline): add debug marker for stopline collision check - * feat: use marker helper - * feat(map_loader): visualize center line by points (`#931 `_) - * feat: visualize center line points - * fix: delete space - * feat: visualize center line by arrow - * revert insertMarkerArray - * fix: delete space - * feat: add RTC interface (`#765 `_) - * feature(rtc_interface): add files - * feature(rtc_interface): implement functions - * feature(rtc_interface): reimprement functions to use CooperateCommands and write README.md - * feature(rtc_interface): fix README - * feature(rtc_interface): add getModuleType() - * feature(rtc_interface): fix definition of constructor - * feature(rtc_interface): fix time stamp - * feature(rtc_interface): fix README - * feature(rtc_interface): add isRegistered and clearCooperateStatus - * ci(pre-commit): autofix - Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> - * chore: sync files (`#911 `_) - Co-authored-by: kenji-miyake - * fix: replace boost::mutex::scoped_lock to std::scoped_lock (`#907 `_) - * fix: replace boost::mutex::scoped_lock to std::scoped_lock - * fix: replace boost::mutex to std::mutex - * feat(tensorrt_yolo): add multi gpu support to tensorrt_yolo node (`#885 `_) - * feat(tensorrt_yolo): add multi gpu support to tensorrt_yolo node - * feat(tensorrt_yolo): update arg - Co-authored-by: Kaan Colak - * feat(tier4_planning_launch): create parameter yaml for behavior_velocity_planner (`#887 `_) - * feat(tier4_planning_launch): create parameter yaml for behavior_velocity_planner - * Update launch/tier4_planning_launch/config/scenario_planning/lane_driving/behavior_planning/behavior_velocity_planner/behavior_velocity_planner.param.yaml - Co-authored-by: taikitanaka3 <65527974+taikitanaka3@users.noreply.github.com> - * feat: add param.yaml in behavior_velocity_planner package - * some fix - Co-authored-by: taikitanaka3 <65527974+taikitanaka3@users.noreply.github.com> - * fix(map_loader): use std::filesystem to load pcd files in pointcloud_map_loader (`#942 `_) - * fix(map_loader): use std::filesystem to load pcd files in pointcloud_map_loader - * fix(map_loader): remove c_str - * fix(map_loader): replace c_str to string - * fix: relative link - * fix: relative links - * fix: relative links - * fix: relative links - * fix: typo - * fix relative links - * docs: ignore rare unknown words - * ci(pre-commit): autofix - * docs: ignore unknown words one by one - * ci(pre-commit): autofix - Co-authored-by: Hiroki OTA - Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> - Co-authored-by: Takeshi Ishita - Co-authored-by: Kenji Miyake <31987104+kenji-miyake@users.noreply.github.com> - Co-authored-by: Satoshi OTA <44889564+satoshi-ota@users.noreply.github.com> - Co-authored-by: Mamoru Sobue - Co-authored-by: TakumiKozaka-T4 <70260442+TakumiKozaka-T4@users.noreply.github.com> - Co-authored-by: Takagi, Isamu <43976882+isamu-takagi@users.noreply.github.com> - Co-authored-by: Takayuki Murooka - Co-authored-by: Takamasa Horibe - Co-authored-by: storrrrrrrrm <103425473+storrrrrrrrm@users.noreply.github.com> - Co-authored-by: suchang - Co-authored-by: Berkay - Co-authored-by: Berkay - Co-authored-by: ito-san <57388357+ito-san@users.noreply.github.com> - Co-authored-by: Kosuke Takeuchi - Co-authored-by: taikitanaka3 <65527974+taikitanaka3@users.noreply.github.com> - Co-authored-by: kk-inoue-esol <76925382+kk-inoue-esol@users.noreply.github.com> - Co-authored-by: Fumiya Watanabe - Co-authored-by: awf-autoware-bot[bot] <94889083+awf-autoware-bot[bot]@users.noreply.github.com> - Co-authored-by: kenji-miyake - Co-authored-by: RyuYamamoto - Co-authored-by: Kaan Çolak - Co-authored-by: Kaan Colak - Co-authored-by: Kenji Miyake -* test(autoware_testing): fix smoke_test (`#479 `_) - * fix(autoware_testing): fix smoke_test - * restore smoke_test for trajectory_follower_nodes - * add support multiple parameter files - * ci(pre-commit): autofix - * minor fix - Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> -* chore: upgrade cmake_minimum_required to 3.14 (`#856 `_) -* refactor: use autoware cmake (`#849 `_) - * remove autoware_auto_cmake - * add build_depend of autoware_cmake - * use autoware_cmake in CMakeLists.txt - * fix bugs - * fix cmake lint errors -* chore: remove license notations from CMakeLists.txt (`#846 `_) -* chore: remove bad chars (`#845 `_) -* docs(autoware_testing): fix link (`#741 `_) - * docs(autoware_testing): fix link - * fix typo - Co-authored-by: Kenji Miyake <31987104+kenji-miyake@users.noreply.github.com> -* ci(pre-commit): clear the exclude option (`#426 `_) - * ci(pre-commit): remove unnecessary excludes - * ci(pre-commit): autofix - * ci(pre-commit): autofix - * address pre-commit for Markdown files - * fix Python imports - * address cpplint errors - * fix broken package.xml - * rename ROS parameter files - * fix build - * use autoware_lint_common - Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> -* feat: add autoware auto dependencies (`#185 `_) - * Back port .auto control packages (`#571 `_) - * Implement Lateral and Longitudinal Control Muxer - * [`#570 `_] Porting wf_simulator - * [`#1189 `_] Deactivate flaky test in 'trajectory_follower_nodes' - * [`#1189 `_] Fix flacky test in 'trajectory_follower_nodes/latlon_muxer' - * [`#1057 `_] Add osqp_interface package - * [`#1057 `_] Add library code for MPC-based lateral control - * [`#1271 `_] Use std::abs instead of abs - * [`#1057 `_] Implement Lateral Controller for Cargo ODD - * [`#1246 `_] Resolve "Test case names currently use snake_case but should be CamelCase" - * [`#1325 `_] Deactivate flaky smoke test in 'trajectory_follower_nodes' - * [`#1058 `_] Add library code of longitudinal controller - * Fix build error for trajectory follower - * Fix build error for trajectory follower nodes - * [`#1272 `_] Add AckermannControlCommand support to simple_planning_simulator - * [`#1058 `_] Add Longitudinal Controller node - * [`#1058 `_] Rename velocity_controller -> longitudinal_controller - * [`#1058 `_] Update CMakeLists.txt for the longitudinal_controller_node - * [`#1058 `_] Add smoke test python launch file - * [`#1058 `_] Use LowPassFilter1d from trajectory_follower - * [`#1058 `_] Use autoware_auto_msgs - * [`#1058 `_] Changes for .auto (debug msg tmp fix, common func, tf listener) - * [`#1058 `_] Remove unused parameters - * [`#1058 `_] Fix ros test - * [`#1058 `_] Rm default params from declare_parameters + use autoware types - * [`#1058 `_] Use default param file to setup NodeOptions in the ros test - * [`#1058 `_] Fix docstring - * [`#1058 `_] Replace receiving a Twist with a VehicleKinematicState - * [`#1058 `_] Change class variables format to m\_ prefix - * [`#1058 `_] Fix plugin name of LongitudinalController in CMakeLists.txt - * [`#1058 `_] Fix copyright dates - * [`#1058 `_] Reorder includes - * [`#1058 `_] Add some tests (~89% coverage without disabling flaky tests) - * [`#1058 `_] Add more tests (90+% coverage without disabling flaky tests) - * [`#1058 `_] Use Float32MultiArrayDiagnostic message for debug and slope - * [`#1058 `_] Calculate wheel_base value from vehicle parameters - * [`#1058 `_] Cleanup redundant logger setting in tests - * [`#1058 `_] Set ROS_DOMAIN_ID when running tests to prevent CI failures - * [`#1058 `_] Remove TF listener and use published vehicle state instead - * [`#1058 `_] Change smoke tests to use autoware_testing - * [`#1058 `_] Add plotjuggler cfg for both lateral and longitudinal control - * [`#1058 `_] Improve design documents - * [`#1058 `_] Disable flaky test - * [`#1058 `_] Properly transform vehicle state in longitudinal node - * [`#1058 `_] Fix TF buffer of lateral controller - * [`#1058 `_] Tuning of lateral controller for LGSVL - * [`#1058 `_] Fix formating - * [`#1058 `_] Fix /tf_static sub to be transient_local - * [`#1058 `_] Fix yaw recalculation of reverse trajs in the lateral controller - * modify trajectory_follower for galactic build - * [`#1379 `_] Update trajectory_follower - * [`#1379 `_] Update simple_planning_simulator - * [`#1379 `_] Update trajectory_follower_nodes - * apply trajectory msg modification in control - * move directory - * remote control/trajectory_follower level dorectpry - * remove .iv trajectory follower - * use .auto trajectory_follower - * remove .iv simple_planning_simulator & osqp_interface - * use .iv simple_planning_simulator & osqp_interface - * add tmp_autoware_auto_dependencies - * tmporally add autoware_auto_msgs - * apply .auto message split - * fix build depend - * fix packages using osqp - * fix autoware_auto_geometry - * ignore lint of some packages - * ignore ament_lint of some packages - * ignore lint/pre-commit of trajectory_follower_nodes - * disable unit tests of some packages - Co-authored-by: Maxime CLEMENT - Co-authored-by: Joshua Whitley - Co-authored-by: Igor Bogoslavskyi - Co-authored-by: MIURA Yasuyuki - Co-authored-by: wep21 - Co-authored-by: tomoya.kimura - * Port parking planner packages from .Auto (`#600 `_) - * Copy code of 'vehicle_constants_manager' - * Fix vehicle_constants_manager for ROS galactic - * Rm .iv costmap_generator freespace_planner freespace_planning_aglorihtms - * Add astar_search (from .Auto) - * Copy freespace_planner from .Auto - * Update freespace_planner for .IV - * Copy costmap_generator from .Auto - * Copy and update had_map_utils from .Auto - * Update costmap_generator - * Copy costmap_generator_nodes - * Update costmap_generator_nodes - * Comment out all tests - * Move vehicle_constant_managers to tmp_autoware_auto_dependencies - * ignore pre-commit for back-ported packages - * ignore testing - Co-authored-by: Takamasa Horibe - * fix: fix pre-commit - * fix: fix markdownlint - * fix: fix cpplint - * feat: remove autoware_auto_dependencies - Co-authored-by: Takamasa Horibe - Co-authored-by: Maxime CLEMENT - Co-authored-by: Joshua Whitley - Co-authored-by: Igor Bogoslavskyi - Co-authored-by: MIURA Yasuyuki - Co-authored-by: wep21 - Co-authored-by: tomoya.kimura - Co-authored-by: Maxime CLEMENT <78338830+maxime-clem@users.noreply.github.com> -* Contributors: Esteve Fernandez, Keisuke Shima, Kenji Miyake, Mateusz Palczuk, Satoshi OTA, Shumpei Wakabayashi, Takeshi Miura, Vincent Richard, pre-commit-ci[bot] diff --git a/common/autoware_testing/CMakeLists.txt b/common/autoware_testing/CMakeLists.txt deleted file mode 100644 index 5e45119c1abee..0000000000000 --- a/common/autoware_testing/CMakeLists.txt +++ /dev/null @@ -1,13 +0,0 @@ -cmake_minimum_required(VERSION 3.14) -project(autoware_testing) - -find_package(autoware_cmake REQUIRED) -autoware_package() - -list(APPEND ${PROJECT_NAME}_CONFIG_EXTRAS - "autoware_testing-extras.cmake" -) - -ament_auto_package( - INSTALL_TO_SHARE cmake autoware_testing -) diff --git a/common/autoware_testing/autoware_testing-extras.cmake b/common/autoware_testing/autoware_testing-extras.cmake deleted file mode 100644 index 24588de52f5d1..0000000000000 --- a/common/autoware_testing/autoware_testing-extras.cmake +++ /dev/null @@ -1,17 +0,0 @@ -# Copyright 2021 The Autoware Foundation -# -# 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. - -find_package(ros_testing REQUIRED) - -include("${autoware_testing_DIR}/add_smoke_test.cmake") diff --git a/common/autoware_testing/autoware_testing/__init__.py b/common/autoware_testing/autoware_testing/__init__.py deleted file mode 100644 index e69de29bb2d1d..0000000000000 diff --git a/common/autoware_testing/autoware_testing/smoke_test.py b/common/autoware_testing/autoware_testing/smoke_test.py deleted file mode 100644 index 1c4aa13b2c0b5..0000000000000 --- a/common/autoware_testing/autoware_testing/smoke_test.py +++ /dev/null @@ -1,120 +0,0 @@ -# Copyright 2021 the Autoware Foundation -# -# 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. -# -# Developed by Robotec.ai. - -import os -import shlex -import time -import unittest - -from ament_index_python import get_package_share_directory -from launch import LaunchDescription -from launch.actions import DeclareLaunchArgument -from launch.actions import OpaqueFunction -from launch.substitutions import LaunchConfiguration -from launch_ros.actions import Node -import launch_testing -import pytest -import rclpy - - -def resolve_node(context, *args, **kwargs): - parameters = [ - os.path.join( - get_package_share_directory(LaunchConfiguration("arg_package").perform(context)), - "param", - file_name, - ) - for file_name in shlex.split(LaunchConfiguration("arg_param_filenames").perform(context)) - ] - - parameters_test = [ - os.path.join( - get_package_share_directory(LaunchConfiguration("arg_package").perform(context)), - "test", - file_name, - ) - for file_name in shlex.split( - LaunchConfiguration("arg_test_param_filenames").perform(context) - ) - ] - - parameters.extend(parameters_test) - - smoke_test_node = Node( - package=LaunchConfiguration("arg_package"), - executable=LaunchConfiguration("arg_package_exe"), - namespace="test", - parameters=parameters, - arguments=shlex.split(LaunchConfiguration("arg_executable_arguments").perform(context)), - ) - return [smoke_test_node] - - -@pytest.mark.launch_test -def generate_test_description(): - arg_package = DeclareLaunchArgument( - "arg_package", default_value=["default"], description="Package containing tested executable" - ) - arg_package_exe = DeclareLaunchArgument( - "arg_package_exe", default_value=["default"], description="Tested executable" - ) - arg_param_filenames = DeclareLaunchArgument( - "arg_param_filenames", default_value=["test.param.yaml"], description="Test param file" - ) - arg_test_param_filenames = DeclareLaunchArgument( - "arg_test_param_filenames", - default_value=["test.param.yaml"], - description="Test only param file", - ) - arg_executable_arguments = DeclareLaunchArgument( - "arg_executable_arguments", default_value=[""], description="Tested executable arguments" - ) - - return LaunchDescription( - [ - arg_package, - arg_package_exe, - arg_param_filenames, - arg_test_param_filenames, - arg_executable_arguments, - OpaqueFunction(function=resolve_node), - launch_testing.actions.ReadyToTest(), - ] - ) - - -class DummyTest(unittest.TestCase): - def test_wait_for_node_ready(self): - """Waiting for the node is ready.""" - rclpy.init() - test_node = rclpy.create_node("test_node") - # Wait until both dummy node "test_node" and real tested node are registered and then kill - # both of them, if tested node does not register within `timeout` seconds test will fail - start_time = time.time() - timeout = 2 # seconds - timeout_msg = "Smoke test timeout has been reached ({}s)".format(timeout) - print("waiting for Nodes to be ready") - while len(test_node.get_node_names()) < 2: - assert time.time() - start_time < timeout, timeout_msg - time.sleep(0.1) - rclpy.shutdown() - - -@launch_testing.post_shutdown_test() -class TestProcessOutput(unittest.TestCase): - def test_exit_code(self, proc_output, proc_info): - # Check that process exits with code 0 - launch_testing.asserts.assertExitCodes(proc_info) diff --git a/common/autoware_testing/cmake/add_smoke_test.cmake b/common/autoware_testing/cmake/add_smoke_test.cmake deleted file mode 100644 index 7f1f6e04b8c2a..0000000000000 --- a/common/autoware_testing/cmake/add_smoke_test.cmake +++ /dev/null @@ -1,56 +0,0 @@ -# Copyright 2021 The Autoware Foundation -# -# 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. -# -# Developed by Robotec.ai - -# Add a smoke test -# :param package_name: name of the package to smoke test -# :type package_name: string -# :param package_exec: package executable to run during smoke test -# :type executable_name: string -# :param PARAM_FILENAMES: yaml filenames containing test parameters -# :type PARAM_FILENAMES: string -# :param EXECUTABLE_ARGUMENTS: arguments passed to tested executable -# :type EXECUTABLE_ARGUMENTS: string - -function(add_smoke_test package_name executable_name) - cmake_parse_arguments(PARSE_ARGV 2 smoke_test "" "PARAM_FILENAMES;TEST_PARAM_FILENAMES; -EXECUTABLE_ARGUMENTS;TARGET_INFIX" "") - - set(ARGUMENTS "arg_package:=${package_name}" "arg_package_exe:=${executable_name}") - - set(TARGET_INFIX "") # OPTIONAL infix to distinguish multiple smoke tests for one node - if(smoke_test_TARGET_INFIX) - set(TARGET_INFIX "_${smoke_test_TARGET_INFIX}") - endif() - - if(smoke_test_PARAM_FILENAMES) - list(APPEND ARGUMENTS "arg_param_filenames:=${smoke_test_PARAM_FILENAMES}") - endif() - - if(smoke_test_TEST_PARAM_FILENAMES) - list(APPEND ARGUMENTS "arg_test_param_filenames:=${smoke_test_TEST_PARAM_FILENAMES}") - endif() - - if(smoke_test_EXECUTABLE_ARGUMENTS) - list(APPEND ARGUMENTS "arg_executable_arguments:=${smoke_test_EXECUTABLE_ARGUMENTS}") - endif() - - add_ros_test( - ${autoware_testing_DIR}/../autoware_testing/smoke_test.py - TARGET "${executable_name}${TARGET_INFIX}_smoke_test" - ARGS "${ARGUMENTS}" - TIMEOUT "30" - ) -endfunction() diff --git a/common/autoware_testing/design/autoware_testing-design.md b/common/autoware_testing/design/autoware_testing-design.md deleted file mode 100644 index e50f7c801a62f..0000000000000 --- a/common/autoware_testing/design/autoware_testing-design.md +++ /dev/null @@ -1,66 +0,0 @@ -# autoware_testing - -This is the design document for the `autoware_testing` package. - -## Purpose / Use cases - -The package aims to provide a unified way to add standard testing functionality to the package, currently supporting: - -- Smoke testing (`add_smoke_test`): launch a node with default configuration and ensure that it starts up and does not crash. - -## Design - -Uses `ros_testing` (which is an extension of `launch_testing`) and provides some parametrized, reusable standard tests to run. - -## Assumptions / Known limits - -Parametrization is limited to package, executable names, parameters filename and executable arguments. Test namespace is set as 'test'. -Parameters file for the package is expected to be in `param` directory inside package. - -## Inputs / Outputs / API - -To add a smoke test to your package tests, add test dependency on `autoware_testing` to `package.xml` - -```xml -autoware_testing -``` - -and add the following two lines to `CMakeLists.txt` in the `IF (BUILD_TESTING)` section: - -```cmake -find_package(autoware_testing REQUIRED) -add_smoke_test( [PARAM_FILENAME ] [EXECUTABLE_ARGUMENTS ]) -``` - -Where - -`` - [required] tested node package name. - -`` - [required] tested node executable name. - -`` - [optional] param filename. Default value is `test.param.yaml`. Required mostly in situation where there are multiple smoke tests in a package and each requires different parameters set - -`` - [optional] arguments passed to executable. By default no arguments are passed. - -which adds `_smoke_test` test to suite. - -Example test result: - -```text -build//test_results//_smoke_test.xunit.xml: 1 test, 0 errors, 0 failures, 0 skipped -``` - -## References / External links - -- -- -- - -## Future extensions / Unimplemented parts - -- Adding more types of standard tests. - -## Related issues - -- Issue #700: add smoke test -- Issue #1224: Port other packages with smoke tests to use `autoware_testing` diff --git a/common/autoware_testing/package.xml b/common/autoware_testing/package.xml deleted file mode 100644 index d94b90b6821f4..0000000000000 --- a/common/autoware_testing/package.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - autoware_testing - 0.41.0 - Tools for handling standard tests based on ros_testing - Adam Dabrowski - Tomoya Kimura - Shumpei Wakabayashi - Satoshi Ota - Apache 2.0 - - ament_cmake_auto - ament_cmake_lint_cmake - autoware_cmake - - ros_testing - - ament_cmake_core - ament_copyright - ament_flake8 - ament_pep257 - ros_testing - - - ament_cmake - - diff --git a/common/autoware_testing/resource/autoware_testing b/common/autoware_testing/resource/autoware_testing deleted file mode 100644 index e69de29bb2d1d..0000000000000 diff --git a/common/autoware_testing/setup.cfg b/common/autoware_testing/setup.cfg deleted file mode 100644 index e160d885afb8a..0000000000000 --- a/common/autoware_testing/setup.cfg +++ /dev/null @@ -1,4 +0,0 @@ -[develop] -script-dir=$base/lib/autoware_testing -[install] -install-scripts=$base/lib/autoware_testing diff --git a/common/autoware_testing/setup.py b/common/autoware_testing/setup.py deleted file mode 100644 index d4a5158dd0055..0000000000000 --- a/common/autoware_testing/setup.py +++ /dev/null @@ -1,23 +0,0 @@ -from setuptools import setup - -package_name = "autoware_testing" - -setup( - name=package_name, - version="0.1.0", - packages=[package_name], - data_files=[ - ("share/ament_index/resource_index/packages", ["resource/" + package_name]), - ("share/" + package_name, ["package.xml"]), - ], - install_requires=["setuptools"], - zip_safe=True, - maintainer="Adam Dabrowski", - maintainer_email="adam.dabrowski@robotec.ai", - description="Tools for handling standard tests based on ros_testing", - license="Apache 2.0", - tests_require=["pytest"], - entry_points={ - "console_scripts": [], - }, -)