Merge pull request #228 from naveenkul/patch-1

convert 1D array to scalar for np.matmul operation
This commit is contained in:
Atsushi Sakai
2019-10-03 20:53:18 +09:00
committed by GitHub

View File

@@ -99,7 +99,7 @@ def quad_sim(x_c, y_c, z_c):
R = rotation_matrix(roll, pitch, yaw)
acc = (np.matmul(R, np.array(
[0, 0, thrust]).T) - np.array([0, 0, m * g]).T) / m
[0, 0, thrust.item()]).T) - np.array([0, 0, m * g]).T) / m
x_acc = acc[0]
y_acc = acc[1]
z_acc = acc[2]
@@ -209,4 +209,4 @@ def main():
if __name__ == "__main__":
main()
main()