plt.show() x2, x2dot, x2ddot, t2 = dmp2.run_dmp(tau, 0.01, dmp2.start, dmp2.goal) plt.plot(times, thetas2, "r") plt.plot(t2, x2, "b") plt.show() theta1, theta2 = None, None while True: display.fill(white) theta1 = round(x1[step], 3) theta2 = round(x2[step], 3) if step < len(x1)-1: step += 1 arm.move_arm_absolute(theta1, theta2) update_screen(arm, domain_object) # check for quit for event in pygame.event.get(): if event.type == pygame.locals.QUIT: pygame.quit() sys.exit() pygame.display.update() fpsClock.tick(30)