We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
In animate.py
animate.py
The frame type check is done against NDArray, which gives an error when passing a Rotation matrix for example. It works if changd to np.ndarray
NDArray
Error
elif isinstance(frame, NDArray):
fix
elif isinstance(frame, np.ndarray):
Here
Is this an error in animate.py or I need to fix something in my example?
# imports ax = plotvol3(new=True) J = np.array([[ 2, -1, 0], [-1, 4, 0], [ 0, 0, 3]]); orientation = UnitQuaternion(); # identity quaternion w = 0.2 * np.array([1, 2, 2]); dt = 0.05; # time step def update(): global orientation, w for t in np.arange(0, 10, dt): wd = -np.linalg.inv(J) @ (np.cross(w, J @ w)) # (3.12) w += wd * dt orientation *= UnitQuaternion.EulerVec(w * dt) print(type(orientation.R)) yield NDArray[orientation.R] ani = tranimate(update(), ax=ax, frame='A', color='green'); plt.show()
NumPy version: 1.26.4 Matplotlib version: 3.8.4 Spatialmath version: 1.1.11
The text was updated successfully, but these errors were encountered:
Thank you so much @alsaibie
We tested and implemented the fix in this PR: #138
Sorry, something went wrong.
jcao-bdai
No branches or pull requests
In
animate.py
The frame type check is done against
NDArray
, which gives an error when passing a Rotation matrix for example. It works if changd to np.ndarrayError
fix
Here
Is this an error in
animate.py
or I need to fix something in my example?Example
NumPy version: 1.26.4
Matplotlib version: 3.8.4
Spatialmath version: 1.1.11
The text was updated successfully, but these errors were encountered: