mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-07-11 20:32:13 +08:00
Use same minimum speed for lateral planning and controls (#26177)
* Use same speed for lag adjustmenet * One is a nicer number * Update ref old-commit-hash: 4f84b2998579a630e1577e60dd1d30d23261cd28
This commit is contained in:
@@ -13,6 +13,7 @@ V_CRUISE_MIN = 8 # kph
|
||||
V_CRUISE_ENABLE_MIN = 40 # kph
|
||||
V_CRUISE_INITIAL = 255 # kph
|
||||
|
||||
MIN_SPEED = 1.0
|
||||
LAT_MPC_N = 16
|
||||
LON_MPC_N = 32
|
||||
CONTROL_N = 17
|
||||
@@ -102,7 +103,7 @@ def get_lag_adjusted_curvature(CP, v_ego, psis, curvatures, curvature_rates):
|
||||
psis = [0.0]*CONTROL_N
|
||||
curvatures = [0.0]*CONTROL_N
|
||||
curvature_rates = [0.0]*CONTROL_N
|
||||
v_ego = max(v_ego, 0.1)
|
||||
v_ego = max(MIN_SPEED, v_ego)
|
||||
|
||||
# TODO this needs more thought, use .2s extra for now to estimate other delays
|
||||
delay = CP.steerActuatorDelay + .2
|
||||
|
||||
@@ -4,7 +4,7 @@ from common.numpy_fast import interp
|
||||
from system.swaglog import cloudlog
|
||||
from selfdrive.controls.lib.lateral_mpc_lib.lat_mpc import LateralMpc
|
||||
from selfdrive.controls.lib.lateral_mpc_lib.lat_mpc import N as LAT_MPC_N
|
||||
from selfdrive.controls.lib.drive_helpers import CONTROL_N
|
||||
from selfdrive.controls.lib.drive_helpers import CONTROL_N, MIN_SPEED
|
||||
from selfdrive.controls.lib.desire_helper import DesireHelper
|
||||
import cereal.messaging as messaging
|
||||
from cereal import log
|
||||
@@ -22,7 +22,6 @@ LATERAL_JERK_COST = 0.05
|
||||
# TODO this cost should be lowered when low
|
||||
# speed lateral control is stable on all cars
|
||||
STEERING_RATE_COST = 800.0
|
||||
MIN_SPEED = 1.5
|
||||
|
||||
|
||||
class LateralPlanner:
|
||||
|
||||
@@ -1 +1 @@
|
||||
1f41cd8bbf2431ae89c489a81698120d14a44145
|
||||
f5a352666728344ca5065bb44c47c1f5650b4243
|
||||
|
||||
Reference in New Issue
Block a user