diff --git a/.driving_log_replayer.cspell.json b/.driving_log_replayer.cspell.json index b9941db4..a5d49c2c 100644 --- a/.driving_log_replayer.cspell.json +++ b/.driving_log_replayer.cspell.json @@ -38,6 +38,7 @@ "youtalk", "UMiho", "nuscenes", - "devkit" + "devkit", + "fastjsonschema" ] } diff --git a/ReleaseNotes.md b/ReleaseNotes.md index 8904616d..615b31ee 100644 --- a/ReleaseNotes.md +++ b/ReleaseNotes.md @@ -1,5 +1,21 @@ # Release Notes +## Version 2.3.11 + +Minor Tweak + +| Module | Feature | Brief summary | Pull request | Jira | Contributor | +| ------------ | ----------- | --------------------------- | -------------------------------------------------------------- | ---- | ------------------------------------- | +| `perception` | performance | perf: 2x processing speedup | [#581](https://github.com/tier4/driving_log_replayer/pull/581) | - | [ralwing](https://github.com/ralwing) | + +## Version 2.3.10 + +Bug fix + +| Module | Feature | Brief summary | Pull request | Jira | Contributor | +| ----------------------- | --------- | -------------------------------- | -------------------------------------------------------------- | ---- | --------------------------------------------- | +| `obstacle_segmentation` | condition | fix condition to judge diag name | [#582](https://github.com/tier4/driving_log_replayer/pull/582) | - | [hayato-m126](https://github.com/hayato-m126) | + ## Version 2.3.9 Minor Tweak diff --git a/driving_log_replayer/CHANGELOG.rst b/driving_log_replayer/CHANGELOG.rst index dd6931e6..1757f293 100644 --- a/driving_log_replayer/CHANGELOG.rst +++ b/driving_log_replayer/CHANGELOG.rst @@ -2,6 +2,17 @@ Changelog for package driving_log_replayer ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +2.3.11 (2024-11-02) +------------------- +* perf: 2x processing speedup (`#581 `_) + Co-authored-by: Hayato Mizushima +* Contributors: ralwing + +2.3.10 (2024-11-01) +------------------- +* fix: condition to judge diag name (`#582 `_) +* Contributors: Hayato Mizushima + 2.3.9 (2024-10-28) ------------------ * feat: update pre commit and ruff (`#579 `_) diff --git a/driving_log_replayer/driving_log_replayer/perception_eval_conversions.py b/driving_log_replayer/driving_log_replayer/perception_eval_conversions.py index 48f1f2fb..ecb12bc2 100644 --- a/driving_log_replayer/driving_log_replayer/perception_eval_conversions.py +++ b/driving_log_replayer/driving_log_replayer/perception_eval_conversions.py @@ -17,12 +17,12 @@ from ament_index_python.packages import get_package_share_directory from builtin_interfaces.msg import Time +import fastjsonschema from geometry_msgs.msg import Point from geometry_msgs.msg import Polygon as RosPolygon from geometry_msgs.msg import Pose from geometry_msgs.msg import Quaternion as RosQuaternion from geometry_msgs.msg import Vector3 -import jsonschema import numpy as np from perception_eval.common import ObjectType from perception_eval.common.object import DynamicObject @@ -305,25 +305,28 @@ def fill_xyzw_quat(q: Quaternion | None) -> dict: # utils for writing each perception frame result to a file class FrameDescriptionWriter: schema: dict = None + validate_func = None @classmethod def load_schema(cls) -> None: - if cls.schema is None: + if cls.schema is None or cls.validate_func is None: package_share_directory = get_package_share_directory("driving_log_replayer") schema_file_path = ( Path(package_share_directory) / "config" / "object_output_schema.json" ) with schema_file_path.open() as file: cls.schema = json.load(file) + cls.validate_func = fastjsonschema.compile(cls.schema) @classmethod def is_object_structure_valid(cls, objdata: dict | None) -> bool: cls.load_schema() try: - jsonschema.validate(objdata, cls.schema) - except jsonschema.exceptions.ValidationError: + cls.validate_func(objdata) + except fastjsonschema.exceptions.JsonSchemaException: return False - return True + else: + return True @staticmethod def object_to_description(obj: ObjectType | None) -> dict: diff --git a/driving_log_replayer/package.xml b/driving_log_replayer/package.xml index f7cd092a..09a544e4 100644 --- a/driving_log_replayer/package.xml +++ b/driving_log_replayer/package.xml @@ -2,7 +2,7 @@ driving_log_replayer - 2.3.9 + 2.3.11 The driving_log_replayer package Hayato Mizushima Kotaro Uetake @@ -38,7 +38,7 @@ driving_log_replayer_analyzer lanelet2_extension_python perception_eval - python3-jsonschema + python3-fastjsonschema python3-pandas python3-simplejson python3-termcolor diff --git a/driving_log_replayer/scripts/obstacle_segmentation_evaluator_node.py b/driving_log_replayer/scripts/obstacle_segmentation_evaluator_node.py index 8ad6cc65..7e3a102c 100755 --- a/driving_log_replayer/scripts/obstacle_segmentation_evaluator_node.py +++ b/driving_log_replayer/scripts/obstacle_segmentation_evaluator_node.py @@ -304,7 +304,7 @@ def diag_cb(self, msg: DiagnosticArray) -> None: if len(msg.status) == 0: return diag_status: DiagnosticStatus = msg.status[0] - if diag_status.name == TARGET_DIAG_NAME: + if diag_status.name != TARGET_DIAG_NAME: return if diag_status.level >= DiagnosticStatus.ERROR: self.__topic_rate = False diff --git a/driving_log_replayer_analyzer/CHANGELOG.rst b/driving_log_replayer_analyzer/CHANGELOG.rst index fc30cb53..40f310cd 100644 --- a/driving_log_replayer_analyzer/CHANGELOG.rst +++ b/driving_log_replayer_analyzer/CHANGELOG.rst @@ -2,6 +2,17 @@ Changelog for package driving_log_replayer ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +2.3.11 (2024-11-02) +------------------- +* perf: 2x processing speedup (`#581 `_) + Co-authored-by: Hayato Mizushima +* Contributors: ralwing + +2.3.10 (2024-11-01) +------------------- +* fix: condition to judge diag name (`#582 `_) +* Contributors: Hayato Mizushima + 2.3.9 (2024-10-28) ------------------ * feat: update pre commit and ruff (`#579 `_) diff --git a/driving_log_replayer_analyzer/package.xml b/driving_log_replayer_analyzer/package.xml index 2859c028..c6c6142f 100644 --- a/driving_log_replayer_analyzer/package.xml +++ b/driving_log_replayer_analyzer/package.xml @@ -2,7 +2,7 @@ driving_log_replayer_analyzer - 2.3.9 + 2.3.11 The driving_log_replayer_analyzer package Hayato Mizushima Keisuke Shima diff --git a/driving_log_replayer_msgs/CHANGELOG.rst b/driving_log_replayer_msgs/CHANGELOG.rst index 548319f0..7193a984 100644 --- a/driving_log_replayer_msgs/CHANGELOG.rst +++ b/driving_log_replayer_msgs/CHANGELOG.rst @@ -2,6 +2,17 @@ Changelog for package driving_log_replayer ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +2.3.11 (2024-11-02) +------------------- +* perf: 2x processing speedup (`#581 `_) + Co-authored-by: Hayato Mizushima +* Contributors: ralwing + +2.3.10 (2024-11-01) +------------------- +* fix: condition to judge diag name (`#582 `_) +* Contributors: Hayato Mizushima + 2.3.9 (2024-10-28) ------------------ * feat: update pre commit and ruff (`#579 `_) diff --git a/driving_log_replayer_msgs/package.xml b/driving_log_replayer_msgs/package.xml index e2b3220c..764ad36f 100644 --- a/driving_log_replayer_msgs/package.xml +++ b/driving_log_replayer_msgs/package.xml @@ -2,7 +2,7 @@ driving_log_replayer_msgs - 2.3.9 + 2.3.11 driving_log_replayer msgs Hayato Mizushima Apache-2.0 diff --git a/pyproject.toml b/pyproject.toml index 122b8b67..0403dcab 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "driving-log-replayer" -version = "2.3.9" +version = "2.3.11" description = "command line tool for driving_log_replayer" authors = [ { name = "Hayato Mizushima", email = "hayato.mizushima@tier4.jp" },