code clean up for LGTM

This commit is contained in:
Atsushi Sakai
2019-02-03 10:00:09 +09:00
parent 138f478f4d
commit f0b6b7a94d
8 changed files with 20 additions and 21 deletions

View File

@@ -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)

View File

@@ -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')