mirror of
https://github.com/dragonpilot/dragonpilot.git
synced 2026-08-06 00:35:44 +08:00
Disable curvature learner
This commit is contained in:
@@ -30,7 +30,7 @@ class PathPlanner(object):
|
||||
self.setup_mpc(CP.steerRateCost)
|
||||
self.solution_invalid_cnt = 0
|
||||
self.path_offset_i = 0.0
|
||||
self.curvature_offset = CurvatureLearner(debug=False)
|
||||
#self.curvature_offset = CurvatureLearner(debug=False)
|
||||
|
||||
def setup_mpc(self, steer_rate_cost):
|
||||
self.libmpc = libmpc_py.libmpc
|
||||
@@ -60,13 +60,13 @@ class PathPlanner(object):
|
||||
# Run MPC
|
||||
self.angle_steers_des_prev = self.angle_steers_des_mpc
|
||||
VM.update_params(sm['liveParameters'].stiffnessFactor, sm['liveParameters'].steerRatio)
|
||||
# curvature_factor = VM.curvature_factor(v_ego)
|
||||
if active:
|
||||
curvfac = self.curvature_offset.update(angle_steers - angle_offset, self.LP.d_poly, v_ego)
|
||||
else:
|
||||
curvfac = 0.
|
||||
curvature_factor = VM.curvature_factor(v_ego)
|
||||
#if active:
|
||||
# curvfac = self.curvature_offset.update(angle_steers - angle_offset, self.LP.d_poly, v_ego)
|
||||
#else:
|
||||
# curvfac = 0.
|
||||
|
||||
curvature_factor = VM.curvature_factor(v_ego) + curvfac
|
||||
#curvature_factor = VM.curvature_factor(v_ego) + curvfac
|
||||
|
||||
# TODO: Check for active, override, and saturation
|
||||
# if active:
|
||||
|
||||
Reference in New Issue
Block a user