Skip to content

Commit

Permalink
feat: update message type (#589)
Browse files Browse the repository at this point in the history
Signed-off-by: Shintaro Sakoda <[email protected]>
Signed-off-by: Hayato Mizushima <[email protected]>
Co-authored-by: Shintaro Sakoda <[email protected]>
  • Loading branch information
hayato-m126 and SakodaShintaro authored Jan 14, 2025
1 parent 40a7636 commit fba91b9
Show file tree
Hide file tree
Showing 12 changed files with 46 additions and 48 deletions.
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ repos:
args: [--markdown-linebreak-ext=md]

- repo: https://github.com/igorshubovych/markdownlint-cli
rev: v0.42.0
rev: v0.43.0
hooks:
- id: markdownlint
args: [-c, .markdownlint.yaml, --fix, -i, CONTRIBUTING.md]
Expand Down Expand Up @@ -49,13 +49,13 @@ repos:
- id: shellcheck

- repo: https://github.com/scop/pre-commit-shfmt
rev: v3.10.0-1
rev: v3.10.0-2
hooks:
- id: shfmt
args: [-w, -s, -i=4]

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.7.0 # Match the version used by the vscode extension. Otherwise, the editor and the command may say different things.
rev: v0.8.0 # Match the version used by the vscode extension. Otherwise, the editor and the command may say different things.
hooks:
- id: ruff
args: [--fix]
Expand Down
4 changes: 2 additions & 2 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"${workspaceFolder}/../../../install/perception_eval/local/lib/python3.10/dist-packages",
"${workspaceFolder}/../../../install/ros2_numpy/local/lib/python3.10/dist-packages",
"${workspaceFolder}/../../../install/driving_log_replayer_msgs/local/lib/python3.10/dist-packages",
"${workspaceFolder}/../../../install/tier4_debug_msgs/local/lib/python3.10/dist-packages",
"${workspaceFolder}/../../../install/autoware_internal_debug_msgs/local/lib/python3.10/dist-packages",
"${workspaceFolder}/../../../install/driving_log_replayer_analyzer/local/lib/python3.10/dist-packages",
"${workspaceFolder}/../../../install/tier4_localization_msgs/local/lib/python3.10/dist-packages",
"${workspaceFolder}/../../../install/tier4_api_msgs/local/lib/python3.10/dist-packages",
Expand All @@ -50,7 +50,7 @@
"${workspaceFolder}/../../../install/perception_eval/local/lib/python3.10/dist-packages",
"${workspaceFolder}/../../../install/ros2_numpy/local/lib/python3.10/dist-packages",
"${workspaceFolder}/../../../install/driving_log_replayer_msgs/local/lib/python3.10/dist-packages",
"${workspaceFolder}/../../../install/tier4_debug_msgs/local/lib/python3.10/dist-packages",
"${workspaceFolder}/../../../install/autoware_internal_debug_msgs/local/lib/python3.10/dist-packages",
"${workspaceFolder}/../../../install/driving_log_replayer_analyzer/local/lib/python3.10/dist-packages",
"${workspaceFolder}/../../../install/tier4_localization_msgs/local/lib/python3.10/dist-packages",
"${workspaceFolder}/../../../install/tier4_api_msgs/local/lib/python3.10/dist-packages",
Expand Down
18 changes: 8 additions & 10 deletions dependency.repos
Original file line number Diff line number Diff line change
@@ -1,31 +1,29 @@
repositories:
# core
core/autoware_msgs:
autoware/autoware_msgs:
type: git
url: https://github.com/autowarefoundation/autoware_msgs.git
version: 1.3.0
core/autoware_adapi_msgs:
autoware/autoware_adapi_msgs:
type: git
url: https://github.com/autowarefoundation/autoware_adapi_msgs.git
version: beta/1.7.0
core/autoware_internal_msgs:
autoware/autoware_internal_msgs:
type: git
url: https://github.com/autowarefoundation/autoware_internal_msgs.git
version: 1.1.0
core/autoware_cmake:
version: 1.3.0
autoware/autoware_cmake:
type: git
url: https://github.com/autowarefoundation/autoware_cmake.git
version: 1.0.0
core/autoware_utils:
autoware/autoware_utils:
type: git
url: https://github.com/autowarefoundation/autoware_utils.git
version: 1.0.0
core/autoware_lanelet2_extension:
autoware/autoware_lanelet2_extension:
type: git
url: https://github.com/autowarefoundation/autoware_lanelet2_extension.git
version: 0.6.2
# universe
universe/external/tier4_autoware_msgs:
autoware/tier4_autoware_msgs:
type: git
url: https://github.com/tier4/tier4_autoware_msgs.git
version: tier4/universe
Expand Down
22 changes: 11 additions & 11 deletions docs/use_case/localization.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,17 +83,17 @@ The NDT availability evaluation output is marked as `Error` when conditions for

Subscribed topics:

| Topic name | Data type |
| -------------------------------------------------------------------- | ------------------------------------- |
| /diagnostics | diagnostic_msgs::msg::DiagnosticArray |
| /localization/pose_estimator/transform_probability | tier4_debug_msgs::msg::Float32Stamped |
| /localization/pose_estimator/nearest_voxel_transformation_likelihood | tier4_debug_msgs::msg::Float32Stamped |
| /localization/pose_estimator/initial_to_result_relative_pose | geometry_msgs::msg::PoseStamped |
| /localization/pose_estimator/exe_time_ms | tier4_debug_msgs::msg::Float32Stamped |
| /localization/pose_estimator/iteration_num | tier4_debug_msgs::msg::Int32Stamped |
| /tf | tf2_msgs/msg/TFMessage |
| /localization/util/downsample/pointcloud | sensor_msgs::msg::PointCloud2 |
| /localization/pose_estimator/points_aligned | sensor_msgs::msg::PointCloud2 |
| Topic name | Data type |
| -------------------------------------------------------------------- | ------------------------------------------------- |
| /diagnostics | diagnostic_msgs::msg::DiagnosticArray |
| /localization/pose_estimator/transform_probability | autoware_internal_debug_msgs::msg::Float32Stamped |
| /localization/pose_estimator/nearest_voxel_transformation_likelihood | autoware_internal_debug_msgs::msg::Float32Stamped |
| /localization/pose_estimator/initial_to_result_relative_pose | geometry_msgs::msg::PoseStamped |
| /localization/pose_estimator/exe_time_ms | autoware_internal_debug_msgs::msg::Float32Stamped |
| /localization/pose_estimator/iteration_num | autoware_internal_debug_msgs::msg::Int32Stamped |
| /tf | tf2_msgs/msg/TFMessage |
| /localization/util/downsample/pointcloud | sensor_msgs::msg::PointCloud2 |
| /localization/pose_estimator/points_aligned | sensor_msgs::msg::PointCloud2 |

Published topics:

Expand Down
22 changes: 11 additions & 11 deletions docs/use_case/localization.ja.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,17 +83,17 @@ Component State Monitorが出力する `/diagnostics` の中から、監視ト

Subscribed topics:

| topic 名 | データ型 |
| -------------------------------------------------------------------- | ------------------------------------- |
| /diagnostics | diagnostic_msgs::msg::DiagnosticArray |
| /localization/pose_estimator/transform_probability | tier4_debug_msgs::msg::Float32Stamped |
| /localization/pose_estimator/nearest_voxel_transformation_likelihood | tier4_debug_msgs::msg::Float32Stamped |
| /localization/pose_estimator/initial_to_result_relative_pose | geometry_msgs::msg::PoseStamped |
| /localization/pose_estimator/exe_time_ms | tier4_debug_msgs::msg::Float32Stamped |
| /localization/pose_estimator/iteration_num | tier4_debug_msgs::msg::Int32Stamped |
| /tf | tf2_msgs/msg/TFMessage |
| /localization/util/downsample/pointcloud | sensor_msgs::msg::PointCloud2 |
| /localization/pose_estimator/points_aligned | sensor_msgs::msg::PointCloud2 |
| topic 名 | データ型 |
| -------------------------------------------------------------------- | ------------------------------------------------- |
| /diagnostics | diagnostic_msgs::msg::DiagnosticArray |
| /localization/pose_estimator/transform_probability | autoware_internal_debug_msgs::msg::Float32Stamped |
| /localization/pose_estimator/nearest_voxel_transformation_likelihood | autoware_internal_debug_msgs::msg::Float32Stamped |
| /localization/pose_estimator/initial_to_result_relative_pose | geometry_msgs::msg::PoseStamped |
| /localization/pose_estimator/exe_time_ms | autoware_internal_debug_msgs::msg::Float32Stamped |
| /localization/pose_estimator/iteration_num | autoware_internal_debug_msgs::msg::Int32Stamped |
| /tf | tf2_msgs/msg/TFMessage |
| /localization/util/downsample/pointcloud | sensor_msgs::msg::PointCloud2 |
| /localization/pose_estimator/points_aligned | sensor_msgs::msg::PointCloud2 |

Published topics:

Expand Down
2 changes: 1 addition & 1 deletion driving_log_replayer/config/localization_topics.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
args:
node_name_suffix: ndt_scan_matcher_exe_time
topic: /localization/pose_estimator/exe_time_ms
topic_type: tier4_debug_msgs/msg/Float32Stamped
topic_type: autoware_internal_debug_msgs/msg/Float32Stamped
best_effort: false
transient_local: false
warn_rate: 5.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ def set_frame(self, msg: DiagnosticArray) -> dict:
diag_array_class[class_name] = {}
diag_array_class[class_name].update(diag_dict)
# evaluate for each class
for class_name in diag_array_class:
for class_name in diag_array_class: # noqa: PLC0206
if self.__container.get(class_name) is None:
# Add default ObjectMetricsClass for metrics aggregation
self.__container[class_name] = ObjectMetrics(
Expand Down
4 changes: 2 additions & 2 deletions driving_log_replayer/driving_log_replayer/localization.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,15 @@
from typing import ClassVar
from typing import Literal

from autoware_internal_debug_msgs.msg import Float32Stamped
from autoware_internal_debug_msgs.msg import Int32Stamped
from diagnostic_msgs.msg import DiagnosticStatus
from example_interfaces.msg import Float64
from geometry_msgs.msg import PoseStamped
import numpy as np
from pydantic import BaseModel
from pydantic import model_validator
from rosidl_runtime_py import message_to_ordereddict
from tier4_debug_msgs.msg import Float32Stamped
from tier4_debug_msgs.msg import Int32Stamped

from driving_log_replayer.result import EvaluationItem
from driving_log_replayer.result import ResultBase
Expand Down
2 changes: 1 addition & 1 deletion driving_log_replayer/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
<build_depend>autoware_cmake</build_depend>

<depend>autoware_common_msgs</depend>
<depend>autoware_internal_debug_msgs</depend>
<depend>autoware_map_msgs</depend>
<depend>autoware_perception_msgs</depend>
<depend>diagnostic_msgs</depend>
Expand All @@ -29,7 +30,6 @@
<depend>tf2_geometry_msgs</depend>
<depend>tf2_msgs</depend>
<depend>tf2_ros</depend>
<depend>tier4_debug_msgs</depend>
<depend>tier4_localization_msgs</depend>
<depend>visualization_msgs</depend>

Expand Down
4 changes: 2 additions & 2 deletions driving_log_replayer/scripts/localization_evaluator_node.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@
# See the License for the specific language governing permissions and
# limitations under the License.

from autoware_internal_debug_msgs.msg import Float32Stamped
from autoware_internal_debug_msgs.msg import Int32Stamped
from diagnostic_msgs.msg import DiagnosticArray
from diagnostic_msgs.msg import DiagnosticStatus
from example_interfaces.msg import Float64
from geometry_msgs.msg import PoseStamped
from tier4_debug_msgs.msg import Float32Stamped
from tier4_debug_msgs.msg import Int32Stamped

from driving_log_replayer.evaluator import DLREvaluator
from driving_log_replayer.evaluator import evaluator_main
Expand Down
4 changes: 2 additions & 2 deletions driving_log_replayer/test/unittest/test_localization.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@

from collections.abc import Callable

from autoware_internal_debug_msgs.msg import Float32Stamped
from autoware_internal_debug_msgs.msg import Int32Stamped
from builtin_interfaces.msg import Time
from diagnostic_msgs.msg import DiagnosticStatus
from diagnostic_msgs.msg import KeyValue
from example_interfaces.msg import Float64
import pytest
from tier4_debug_msgs.msg import Float32Stamped
from tier4_debug_msgs.msg import Int32Stamped

from driving_log_replayer.localization import Availability
from driving_log_replayer.localization import Convergence
Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ build-backend = "hatchling.build"
# https://github.com/astral-sh/uv/issues/7703
constraint-dependencies = ["kaleido!=0.2.1.post1"]
dev-dependencies = [
"ruff==0.7.0",
"ruff==0.8.0",
"pytest>=8.1.1",
]

Expand All @@ -63,7 +63,7 @@ output-format = "full"
[tool.ruff.lint]
# https://beta.ruff.rs/docs/rules/
select = ["A", "B", "C", "D", "E", "F", "G", "I", "N", "Q", "S", "T", "W", "ANN", "ARG", "BLE", "COM", "DJ", "DTZ", "EM", "ERA", "EXE", "FBT", "ICN", "ISC", "NPY", "PD", "PGH", "PIE", "PL", "PT", "PTH", "PYI", "RET", "RSE", "RUF", "SIM", "SLF", "TCH", "TID", "TRY", "UP", "YTT"]
ignore = ["Q000", "ANN101", "ANN102", "ANN401", "PGH004", "E501", "PLR0913", "S101", "S301", "S603", "SIM115", "D100", "D101", "D102", "D103", "D104", "D105", "D106", "D107", "D203", "D212", "D404", "D417", "PD011", "PD002", "PD901", "COM812", "ISC001"]
ignore = ["Q000", "ANN401", "PGH004", "E501", "PLR0913", "S101", "S301", "S603", "SIM115", "D100", "D101", "D102", "D103", "D104", "D105", "D106", "D107", "D203", "D212", "D404", "D417", "PD011", "PD002", "PD901", "COM812", "ISC001"]
fixable = ["D", "I", "ANN", "COM", "EXE", "PIE"]

[tool.ruff.lint.isort]
Expand Down

0 comments on commit fba91b9

Please sign in to comment.