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

chore: add debug code #10

Merged
merged 1 commit into from
Aug 9, 2024
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
13 changes: 13 additions & 0 deletions log_evaluator/log_evaluator/planning_control.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,11 @@ def __post_init__(self) -> None:

def set_frame(self, msg: DiagnosticArray) -> dict | None: # noqa
if len(msg.status) <= 1:
"""
return {
"Error": "len(msg.status) <= 1",
}
"""
return None

# key check
Expand All @@ -173,6 +178,11 @@ def set_frame(self, msg: DiagnosticArray) -> dict | None: # noqa
"""
return None
if status0.values[0].key != "decision":
"""
return {
"Error": f"{status0.values[0].key=} is not decision",
}
"""
return None

lane_info_tuple = None
Expand All @@ -187,6 +197,9 @@ def set_frame(self, msg: DiagnosticArray) -> dict | None: # noqa
kinematic_state_tuple = KinematicCondition.diag_kinematic_state(status)

if lane_info_tuple is None or kinematic_state_tuple is None:
"""
return {"Error": "lane_info_tuple or kinematic_state_tuple is None"}
"""
return None

if self.use_lane_condition:
Expand Down
Loading