Fix planner low speed behaviour (#20990)

* first point is 0

* first point is always now

* print replay diffs

* new ref

* changed wrong commit
pull/20995/head
HaraldSchafer 4 years ago committed by GitHub
parent 12ed986333
commit dc40631e97
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      selfdrive/modeld/models/driving.cc
  2. 6
      selfdrive/test/process_replay/camera_replay.py
  3. 2
      selfdrive/test/process_replay/model_replay_ref_commit
  4. 2
      selfdrive/test/process_replay/ref_commit

@ -272,7 +272,8 @@ void fill_model(cereal::ModelDataV2::Builder &framed, const ModelDataRaw &net_ou
// plan
const float *best_plan = get_plan_data(net_outputs.plan);
float plan_t_arr[TRAJECTORY_SIZE];
int xidx = 0, tidx = 0;
plan_t_arr[0] = 0.0;
int xidx = 1, tidx = 0;
for (; xidx<TRAJECTORY_SIZE; xidx++) {
// increment tidx until we find an element that's further away than the current xidx
for (; tidx < TRAJECTORY_SIZE - 1 && best_plan[(tidx+1)*PLAN_MHP_COLUMNS] < X_IDXS[xidx]; tidx++) {}

@ -115,6 +115,12 @@ if __name__ == "__main__":
results[TEST_ROUTE]["modeld"] = compare_logs(cmp_log, log_msgs, ignore_fields=ignore)
diff1, diff2, failed = format_diff(results, ref_commit)
print(diff2)
print('-------------')
print('-------------')
print('-------------')
print('-------------')
print('-------------')
print(diff1)
with open("model_diff.txt", "w") as f:
f.write(diff2)

@ -1 +1 @@
3a98c2fc53e9a9628eb63c81c4cbd4d72a756386
b1447cc1b5492ab28a6fafddf25ade7fc66606bf

@ -1 +1 @@
de4fcc981f5a0ec6c43d9ee0918cdf9c3dbde494
de4fcc981f5a0ec6c43d9ee0918cdf9c3dbde494

Loading…
Cancel
Save