Open riverbend305 opened 2 years ago
Sorry I didn't notice your requirements.txt file. The following almost worked for me:
sudo port install ffmpeg python3 -m venv venv source venv/bin/activate pip install -r requirements.txt python kinematics_visualization.py # Note I renamed your file
Result: plt.show() works as expected
But the following code hangs after creating a gif of an single frame:
os.makedirs('./animations', exist_ok=True) FFwriter = animation.FFMpegWriter(fps=30) anim.save('./animations/spiral_trajectory.gif', writer=FFwriter)
The following error message is generated due to my closing the plot window after the program hangs:
KeyboardInterrupt
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/joe/Desktop/guiEditor/LI-iNavPO/pythonDir/3DKinematicsVisualisation/kinematics_visualization.py", line 451, in
Hi Andrew, This tutorial is very informative but I am encountering an error at line #402 of 'kinematics_visualization.py' Perhaps this is a python versioning issue. Please add the version number of python and each of the packages that you used to your documentation.
Specifically I am getting the following error on macOS 10.15.7 (Catalina) and python 3.10.7:
Traceback (most recent call last): File "/Users/joe/Desktop/guiEditor/LI-iNavPO/pythonDir/venv/lib/python3.10/site-packages/matplotlib/cbook/init.py", line 307, in process func(*args, *kwargs) File "/Users/joe/Desktop/guiEditor/LI-iNavPO/pythonDir/venv/lib/python3.10/site-packages/matplotlib/animation.py", line 899, in _start self._init_draw() File "/Users/joe/Desktop/guiEditor/LI-iNavPO/pythonDir/venv/lib/python3.10/site-packages/matplotlib/animation.py", line 1706, in _init_draw self._draw_frame(frame_data) File "/Users/joe/Desktop/guiEditor/LI-iNavPO/pythonDir/venv/lib/python3.10/site-packages/matplotlib/animation.py", line 1728, in _draw_frame self._drawn_artists = self._func(framedata, self._args) File "/Users/joe/Desktop/guiEditor/LI-iNavPO/pythonDir/3DKinematicsVisualisation/kinematics_visualization.py", line 402, in visualize self.center_of_curvature.set_3d_properties(self.simulation_results['rcz'][i]) File "/Users/joe/Desktop/guiEditor/LI-iNavPO/pythonDir/venv/lib/python3.10/site-packages/mpl_toolkits/mplot3d/art3d.py", line 175, in set_3d_properties zs = np.broadcast_to(zs, len(xs)) TypeError: object of type 'numpy.float64' has no len()
-Joe