Closed varunvenna closed 1 year ago
Hi @varunvenna , the problem is that your matplotlib is using a non-GUI backend (see the warning after your command). If you would like to see the animation switch to a gui backend e.g. with
import matplotlib matplotlib.use('TkAgg')
If you want to simulate the double pendulum without animation you can use the sim.simulate(...) function which is commented below the sim.simulate_and_animate(...) function in the pid_traj.py script you are testing.
okay. thank you! The problem is resolved by just installing python3-tk
sudo apt-get install python3-tk
The U array in plot_timeseries(T, X, U) is empty (U=[]) the simulate_and_animate function is returning:
Error while running: