mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-06-30 11:02:19 +08:00
safer low speed (#21705)
old-commit-hash: 4bd4ed4999ef86824ef2d3a9dfa86ba61ae24b4f
This commit is contained in:
@@ -95,7 +95,7 @@ class LeadMpc():
|
||||
# Reset if NaN or goes through lead car
|
||||
crashing = any(lead - ego < -50 for (lead, ego) in zip(self.mpc_solution[0].x_l, self.mpc_solution[0].x_ego))
|
||||
nans = any(math.isnan(x) for x in self.mpc_solution[0].v_ego)
|
||||
backwards = min(self.mpc_solution[0].v_ego) < -0.01
|
||||
backwards = min(self.mpc_solution[0].v_ego) < -0.15
|
||||
|
||||
if ((backwards or crashing) and self.prev_lead_status) or nans:
|
||||
if t > self.last_cloudlog_t + 5.0:
|
||||
|
||||
@@ -69,7 +69,7 @@ int main( )
|
||||
ocp.minimizeLSQ(Q, h);
|
||||
ocp.minimizeLSQEndTerm(QN, hN);
|
||||
|
||||
ocp.subjectTo( 0.0 <= v_ego);
|
||||
ocp.subjectTo( -0.1 <= v_ego);
|
||||
ocp.setNOD(2);
|
||||
|
||||
OCPexport mpc(ocp);
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:a0628f3d3f8287d3c8807edbeb918e50e11e52cbae6dd3e5f42ab849f96385a3
|
||||
size 349063
|
||||
oid sha256:24cce37a8698d0553f39cc95491a0bdcff8c0462f05ddfc9e41ef7d1d4a198d5
|
||||
size 349703
|
||||
|
||||
@@ -1 +1 @@
|
||||
f2bad42b2f22dc4f2843c5697f5444f0fb4af175
|
||||
b13f5e632814c6ebb159a325331fd74da3a68066
|
||||
Reference in New Issue
Block a user