Skip to content

Commit

Permalink
chore: add debug code (#10)
Browse files Browse the repository at this point in the history
Signed-off-by: Hayato Mizushima <[email protected]>
  • Loading branch information
hayato-m126 authored Aug 9, 2024
1 parent 5634439 commit 504ddc7
Showing 1 changed file with 13 additions and 0 deletions.
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

0 comments on commit 504ddc7

Please sign in to comment.