Skip to content

Commit

Permalink
tools: filtered short duration msg for metrics calculation in record …
Browse files Browse the repository at this point in the history
…analyzer
  • Loading branch information
yifeijiang authored and xiaoxq committed Apr 5, 2019
1 parent c88f23e commit 2fe9314
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions modules/tools/record_analyzer/module_planning_analyzer.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,12 +146,11 @@ def put(self, adc_trajectory):

accel = None
jerk = None
if self.last_init_point is not None:
duration = 0
if self.last_init_point_t is not None:
duration = t - self.last_init_point_t
if duration <= 0:
accel = 0
else:
accel = (init_point.v - self.last_init_point.v) / duration
if self.last_init_point is not None and duration > 0.03:
accel = (init_point.v - self.last_init_point.v) / duration
if accel > 0:
self.init_point_accel.append(accel)
elif accel < 0:
Expand Down

0 comments on commit 2fe9314

Please sign in to comment.