Skip to content

Commit

Permalink
refactor: output dummy result jsonl (#104)
Browse files Browse the repository at this point in the history
Signed-off-by: Hayato Mizushima <[email protected]>
  • Loading branch information
hayato-m126 authored Feb 27, 2025
1 parent dba8669 commit fc45480
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions driving_log_replayer_v2/launch/driving_log_replayer_v2.launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@


from importlib import import_module
import json
from pathlib import Path

from ament_index_python.packages import get_package_share_directory
Expand All @@ -34,11 +35,15 @@
from driving_log_replayer_v2.shutdown_once import ShutdownOnce


def output_dummy_result_jsonl(result_json_path: str) -> None:
def output_dummy_result_jsonl(result_json_path: str, summary: str = "RecordOnlyMode") -> None:
jsonl_path_str = result_json_path + "l"
dummy_result = {
"Result": {"Success": True, "Summary": summary},
"Stamp": {"System": 0.0},
"Frame": {},
}
with Path(jsonl_path_str).open("w") as f:
dummy_str = '{"Result": {"Success": true, "Summary": "RecordOnlyMode"}, "Stamp": {"System": 0.0}, "Frame": {}}'
f.write(dummy_str + "\n")
json.dump(dummy_result, f)


def launch_autoware(context: LaunchContext) -> list:
Expand Down

0 comments on commit fc45480

Please sign in to comment.