mirror of
https://github.com/AtsushiSakai/PythonRobotics.git
synced 2026-04-22 03:00:22 -04:00
Cleanup cvxpy related codes (#823)
* add normal_vector_estimation_main.rst * add normal_vector_estimation_main.rst * cleanup cvxpy related codes * cleanup cvxpy related codes
This commit is contained in:
@@ -225,8 +225,9 @@ def predict_motion(x0, oa, od, xref):
|
||||
|
||||
def iterative_linear_mpc_control(xref, x0, dref, oa, od):
|
||||
"""
|
||||
MPC contorl with updating operational point iteraitvely
|
||||
MPC control with updating operational point iteratively
|
||||
"""
|
||||
ox, oy, oyaw, ov = None, None, None, None
|
||||
|
||||
if oa is None or od is None:
|
||||
oa = [0.0] * T
|
||||
@@ -406,10 +407,11 @@ def do_simulation(cx, cy, cyaw, ck, sp, dl, initial_state):
|
||||
oa, odelta, ox, oy, oyaw, ov = iterative_linear_mpc_control(
|
||||
xref, x0, dref, oa, odelta)
|
||||
|
||||
di, ai = 0.0, 0.0
|
||||
if odelta is not None:
|
||||
di, ai = odelta[0], oa[0]
|
||||
state = update_state(state, ai, di)
|
||||
|
||||
state = update_state(state, ai, di)
|
||||
time = time + DT
|
||||
|
||||
x.append(state.x)
|
||||
|
||||
Reference in New Issue
Block a user