Skip to content

Commit

Permalink
Merge pull request #228 from naveenkul/patch-1
Browse files Browse the repository at this point in the history
convert 1D array to scalar for np.matmul operation
  • Loading branch information
AtsushiSakai committed Oct 3, 2019
2 parents 7e697d8 + 6714107 commit 591ba9e
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down Expand Up @@ -209,4 +209,4 @@ def main():


if __name__ == "__main__":
main()
main()

0 comments on commit 591ba9e

Please sign in to comment.