mirror of
https://github.com/AtsushiSakai/PythonRobotics.git
synced 2026-04-22 03:00:22 -04:00
code clean up for LGTM
This commit is contained in:
@@ -73,8 +73,8 @@ def quad_sim(x_c, y_c, z_c):
|
||||
# des_x_pos = calculate_position(x_c[i], t)
|
||||
# des_y_pos = calculate_position(y_c[i], t)
|
||||
des_z_pos = calculate_position(z_c[i], t)
|
||||
des_x_vel = calculate_velocity(x_c[i], t)
|
||||
des_y_vel = calculate_velocity(y_c[i], t)
|
||||
# des_x_vel = calculate_velocity(x_c[i], t)
|
||||
# des_y_vel = calculate_velocity(y_c[i], t)
|
||||
des_z_vel = calculate_velocity(z_c[i], t)
|
||||
des_x_acc = calculate_acceleration(x_c[i], t)
|
||||
des_y_acc = calculate_acceleration(y_c[i], t)
|
||||
|
||||
@@ -576,7 +576,7 @@ def plot_animation(X, U): # pragma: no cover
|
||||
axis3d_equal(X[2, :], X[3, :], X[1, :], ax)
|
||||
|
||||
rx, ry, rz = X[1:4, k]
|
||||
vx, vy, vz = X[4:7, k]
|
||||
# vx, vy, vz = X[4:7, k]
|
||||
qw, qx, qy, qz = X[7:11, k]
|
||||
|
||||
CBI = np.array([
|
||||
@@ -618,8 +618,6 @@ def main():
|
||||
integrator = Integrator(m, K)
|
||||
problem = SCProblem(m, K)
|
||||
|
||||
last_linear_cost = None
|
||||
|
||||
converged = False
|
||||
w_delta = W_DELTA
|
||||
for it in range(iterations):
|
||||
@@ -633,7 +631,7 @@ def main():
|
||||
X_last=X, U_last=U, sigma_last=sigma,
|
||||
weight_sigma=W_SIGMA, weight_nu=W_NU,
|
||||
weight_delta=w_delta, weight_delta_sigma=W_DELTA_SIGMA)
|
||||
info = problem.solve()
|
||||
problem.solve()
|
||||
|
||||
X = problem.get_variable('X')
|
||||
U = problem.get_variable('U')
|
||||
|
||||
Reference in New Issue
Block a user