Smarter longitudinal lag compensations (#22094)

* smarter lag compensations

* need to use speed from plan

* update ref

Co-authored-by: Harald Schafer <harald.the.engineer@gmail.com>
old-commit-hash: edae2218d76e3fb81839eabab344c9dabc852fe9
This commit is contained in:
Willem Melching
2021-09-01 15:28:16 -07:00
committed by GitHub
parent 48b7754ab5
commit a06ffc48c1
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -81,7 +81,7 @@ class LongControl():
if len(long_plan.speeds) == CONTROL_N:
v_target = interp(DEFAULT_LONG_LAG, T_IDXS[:CONTROL_N], long_plan.speeds)
v_target_future = long_plan.speeds[-1]
a_target = interp(DEFAULT_LONG_LAG, T_IDXS[:CONTROL_N], long_plan.accels)
a_target = 2 * (v_target - long_plan.speeds[0])/DEFAULT_LONG_LAG - long_plan.accels[0]
else:
v_target = 0.0
v_target_future = 0.0
+1 -1
View File
@@ -1 +1 @@
3e8037d39f40c59a2b9e86539e0952645b2cb3ea
9f181202bbd6c64330bf4903ec265a179201057c