Skip to content

Commit 05907e6

Browse files
committed
Merge branch 'main' into feat/#389-set-initial-pose-directly
2 parents 9f1a0f5 + cedb7a8 commit 05907e6

File tree

23 files changed

+316
-65
lines changed

23 files changed

+316
-65
lines changed

ReleaseNotes.md

+17
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,22 @@
11
# Release Notes
22

3+
## Version 1.14.8
4+
5+
Minor Tweak, Bug fix
6+
7+
| Module | Feature | Brief summary | Pull request | Jira | Contributor |
8+
| --------------------------- | -------------- | -------------------------- | -------------------------------------------------------------- | -------- | --------------------------------------------- |
9+
| `annotationless_perception` | unit test | fix unit test | [#402](https://github.com/tier4/driving_log_replayer/pull/402) | - | [hayato-m126](https://github.com/hayato-m126) |
10+
| `all` | pyproject.toml | update dependency | [#404](https://github.com/tier4/driving_log_replayer/pull/404) | RT4-9477 | [hayato-m126](https://github.com/hayato-m126) |
11+
| `annotationless_perception` | cli | support scenario less mode | [#405](https://github.com/tier4/driving_log_replayer/pull/405) | RT4-9477 | [hayato-m126](https://github.com/hayato-m126) |
12+
13+
## Version 1.14.7
14+
15+
Bug fix
16+
| Module | Feature | Brief summary | Pull request | Jira | Contributor |
17+
| --------------------------- | ------- | --------------- | -------------------------------------------------------------- | ---- | --------------------------------------- |
18+
| `annotationless_perception` | metrics | fix min metrics | [#400](https://github.com/tier4/driving_log_replayer/pull/400) | - | [kosuke55](https://github.com/kosuke55) |
19+
320
## Version 1.14.6
421

522
Minor Tweak

docs/overview/command.en.md

+9
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,15 @@ dlr simulation run -p default -l play_rate:=0.5 -l input_pointcloud:=/sensing/li
6767

6868
# Set perception_mode to camera_lidar_fusion
6969
dlr simulation run -p default -l perception_mode:=camera_lidar_fusion
70+
71+
# Dry-run mode to obtain metrics without creating a scenario file
72+
# set bag, map, sensor_model, vehicle_model, [and vehicle_id] from arguments
73+
dlr simulation dry-run -p ${profile} -u ${use_case} -l sensor_model:=${sensor_model} -l vehicle_model:=${vehicle_model} -l map_path:=${map_path} -l input_bag:=${bag_path} [-l vehicle_id:=${vehicle_id}]
74+
75+
# Command example
76+
# The -p option is used to determine the output destination for bag and result.jsonl. If omitted, the output is sent to the output_directory of the default profile.
77+
# Currently, use_case is only annotationless_perception, so if -u is omitted, it automatically becomes annotationless_perception.
78+
dlr simulation dry-run -l input_bag:=$HOME/dlr_data/auto/annotationless/sample/input_bag -l sensor_model:=sample_sensor_kit -l vehicle_model:=sample_vehicle -l map_path:=$HOME/map/sample_map
7079
```
7180

7281
The arguments that can be specified can be displayed by using the -s option of ros2 launch.

docs/overview/command.ja.md

+9
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,15 @@ dlr simulation show-result ${output_directory}
4848

4949
# 結果ファイルをjsonに変換する
5050
dlr simulation convert-result ${output_directory}
51+
52+
# シナリオファイルを作成せずに、メトリクスを得るために実行する予行演習モード
53+
# bag, map, sensor_model, vehicle_model [, vehicle_id] を引数で指定する
54+
dlr simulation dry-run -p ${profile} -u ${use_case} -l sensor_model:=${sensor_model} -l vehicle_model:=${vehicle_model} -l map_path:=${map_path} -l input_bag:=${bag_path} [-l vehicle_id:=${vehicle_id}]
55+
56+
# コマンド例
57+
# -pのオプションは、bagとresult.jsonlの出力先を決めるために使われる。省略するとdefaultプロファイルのoutput_directoryに出力される。
58+
# 現時点ではuse_caseはannotationless_perceptionのみなので-uを省略すると自動でanontationless_perceptionになる
59+
dlr simulation dry-run -l input_bag:=$HOME/dlr_data/auto/annotationless/sample/input_bag -l sensor_model:=sample_sensor_kit -l vehicle_model:=sample_vehicle -l map_path:=$HOME/map/sample_map
5160
```
5261

5362
#### dlr simulation run launch argument option

docs/use_case/annotationless_perception.en.md

+1-3
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,7 @@ Items for which no threshold is set (min, max, mean) are always judged as normal
3737

3838
#### min
3939

40-
If `threshold * lower_limit` <= `maximum value of min` <= `threshold * upper_limit`, it is assumed to be normal.
41-
42-
Lower limit recommended to be 0.0
40+
If `threshold * lower_limit` <= `minimum value of min` <= `threshold * upper_limit`, it is assumed to be normal.
4341

4442
#### max
4543

docs/use_case/annotationless_perception.ja.md

+1-3
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,7 @@ topic の subscribe 1 回につき、認識クラス毎に以下に記述する
3737

3838
#### min
3939

40-
閾値×下限値 <= minの最大値 <= 閾値×上限値であれば正常とする。
41-
42-
下限値は0.0にすることを推奨
40+
閾値×下限値 <= minの最小値 <= 閾値×上限値であれば正常とする。
4341

4442
#### max
4543

driving_log_replayer/CHANGELOG.rst

+11
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,17 @@
22
Changelog for package driving_log_replayer
33
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
44

5+
1.14.8 (2024-04-09)
6+
-------------------
7+
* fix: annotationless_perception unit test (`#402 <https://github.com/tier4/driving_log_replayer/issues/402>`_)
8+
* Contributors: Hayato Mizushima
9+
10+
1.14.7 (2024-04-05)
11+
-------------------
12+
* fix: annotationless_perception min metrics (`#400 <https://github.com/tier4/driving_log_replayer/issues/400>`_)
13+
Co-authored-by: Hayato Mizushima <hayato-m126@users.noreply.github.com>
14+
* Contributors: Kosuke Takeuchi
15+
516
1.14.6 (2024-04-04)
617
-------------------
718
* feat: `#396 <https://github.com/tier4/driving_log_replayer/issues/396>`_ drop topic footprint 1or2 (`#397 <https://github.com/tier4/driving_log_replayer/issues/397>`_)

driving_log_replayer/driving_log_replayer/annotationless_perception.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ def calc_average_and_success(
204204
self.max_success[key] = True
205205
rdk = self.received_data[key]
206206
# add
207-
rdk["min"] = max(rdk["min"], values["min"])
207+
rdk["min"] = min(rdk["min"], values["min"])
208208
rdk["max"] = max(rdk["max"], values["max"])
209209
rdk["mean"] += values["mean"]
210210
# calc metrics

driving_log_replayer/package.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
33
<package format="3">
44
<name>driving_log_replayer</name>
5-
<version>1.14.6</version>
5+
<version>1.14.8</version>
66
<description>The driving_log_replayer package</description>
77
<maintainer email="hayato.mizushima@tier4.jp">Hayato Mizushima</maintainer>
88
<maintainer email="kotaro.uetake@tier4.jp">Kotaro Uetake</maintainer>

driving_log_replayer/test/unittest/test_annotationless_perception.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -124,13 +124,13 @@ def test_set_pass_range_from_launch_arg() -> None:
124124
def create_deviation() -> Deviation:
125125
condition = ClassConditionValue(
126126
Threshold={"lateral_deviation": DiagValue(min=1.0, max=10.0, mean=5.0)},
127-
PassRange={"min": "0.0-1.05", "max": "0.0-1.05", "mean": "0.95-1.05"},
127+
PassRange={"min": "0.2-1.05", "max": "0.0-1.05", "mean": "0.95-1.05"},
128128
)
129129
return Deviation(
130130
name="CAR",
131131
condition=condition,
132132
total=9,
133-
received_data={"lateral_deviation": {"min": 0.0, "max": 0.0, "mean": 45.0}},
133+
received_data={"lateral_deviation": {"min": 1.0, "max": 0.0, "mean": 45.0}},
134134
min_success={"lateral_deviation": True},
135135
max_success={"lateral_deviation": True},
136136
)
@@ -143,9 +143,9 @@ def test_deviation_success(create_deviation: Callable) -> None:
143143
assert evaluation_item.success is True
144144

145145

146-
def test_deviation_fail_upper_limit_min(create_deviation: Callable) -> None:
146+
def test_deviation_fail_lower_limit_min(create_deviation: Callable) -> None:
147147
evaluation_item: Deviation = create_deviation
148-
status_dict = {"lateral_deviation": {"min": 2.0, "max": 10.0, "mean": 5.0}}
148+
status_dict = {"lateral_deviation": {"min": 0.1, "max": 10.0, "mean": 5.0}}
149149
evaluation_item.set_frame(status_dict)
150150
assert evaluation_item.success is False
151151

driving_log_replayer_analyzer/CHANGELOG.rst

+11
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,17 @@
22
Changelog for package driving_log_replayer
33
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
44

5+
1.14.8 (2024-04-09)
6+
-------------------
7+
* fix: annotationless_perception unit test (`#402 <https://github.com/tier4/driving_log_replayer/issues/402>`_)
8+
* Contributors: Hayato Mizushima
9+
10+
1.14.7 (2024-04-05)
11+
-------------------
12+
* fix: annotationless_perception min metrics (`#400 <https://github.com/tier4/driving_log_replayer/issues/400>`_)
13+
Co-authored-by: Hayato Mizushima <hayato-m126@users.noreply.github.com>
14+
* Contributors: Kosuke Takeuchi
15+
516
1.14.6 (2024-04-04)
617
-------------------
718
* feat: `#396 <https://github.com/tier4/driving_log_replayer/issues/396>`_ drop topic footprint 1or2 (`#397 <https://github.com/tier4/driving_log_replayer/issues/397>`_)

driving_log_replayer_analyzer/package.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
33
<package format="3">
44
<name>driving_log_replayer_analyzer</name>
5-
<version>1.14.6</version>
5+
<version>1.14.8</version>
66
<description>The driving_log_replayer_analyzer package</description>
77
<maintainer email="hayato.mizushima@tier4.jp">Hayato Mizushima</maintainer>
88
<maintainer email="keisuke.shima@tier4.jp">Keisuke Shima</maintainer>

driving_log_replayer_cli/core/scenario.py

+12-4
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,14 @@ class Scenario(BaseModel):
1919
SensorModel: str
2020
VehicleModel: str
2121
VehicleId: str | None = None
22-
LocalMapPath: Path | None = None
22+
LocalMapPath: Path | str = ""
2323
Evaluation: dict
2424

2525
@field_validator("LocalMapPath", mode="before")
2626
@classmethod
27-
def validate_local_path(cls, v: str | None) -> Path | None:
28-
if v is None:
29-
return None
27+
def validate_local_path(cls, v: str | None) -> Path | str:
28+
if v == "":
29+
return ""
3030
normal_path = Path(expandvars(v))
3131
if normal_path.exists():
3232
return normal_path
@@ -49,6 +49,14 @@ def load_scenario(scenario_path: Path) -> Scenario:
4949
return Scenario(**yaml.safe_load(scenario_file))
5050

5151

52+
def get_dry_run_scenario_path(use_case: str) -> Path:
53+
return (
54+
Path(__file__)
55+
.parent.parent.resolve()
56+
.joinpath("resources", "sample", use_case, "dry_run.yaml")
57+
)
58+
59+
5260
def backup_scenario_file(scenario_path: Path) -> None:
5361
bak_name = scenario_path.name + f".{datetime.now().strftime('%Y%m%d%H%M%S')}.bak" # noqa
5462
backup_file_path = scenario_path.parent.joinpath(bak_name)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Save resource files to be used from cli in this directory.
2+
# refer https://github.com/psf/black/tree/main/src/black/resources
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../sample

driving_log_replayer_cli/simulation/__init__.py

+23
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
from driving_log_replayer_cli.core.config import load_config
77
from driving_log_replayer_cli.core.result import convert_all
88
from driving_log_replayer_cli.core.result import display_all
9+
from driving_log_replayer_cli.simulation.run import dry_run as sim_dry_run
910
from driving_log_replayer_cli.simulation.run import run as sim_run
1011
from driving_log_replayer_cli.simulation.update import update_annotationless_scenario_condition
1112

@@ -40,6 +41,28 @@ def run(
4041
)
4142

4243

44+
@simulation.command(context_settings=CONTEXT_SETTINGS)
45+
@click.option("--profile", "-p", type=str, default="default")
46+
@click.option(
47+
"--use-case",
48+
"-u",
49+
type=click.Choice(["annotationless_perception"]),
50+
default="annotationless_perception",
51+
)
52+
@click.option("--launch_args", "-l", multiple=True, default=[])
53+
def dry_run(
54+
profile: str,
55+
use_case: str,
56+
launch_args: list[str],
57+
) -> None:
58+
config: Config = load_config(profile)
59+
sim_dry_run(
60+
config,
61+
use_case,
62+
launch_args,
63+
)
64+
65+
4366
@simulation.command(context_settings=CONTEXT_SETTINGS)
4467
@click.argument(
4568
"output_directory",

0 commit comments

Comments
 (0)