Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: output dummy result jsonl #104

Merged
merged 1 commit into from
Feb 27, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading