diff --git a/Drone/play_animation.py b/Drone/play_animation.py index b4534d9..5b49881 100644 --- a/Drone/play_animation.py +++ b/Drone/play_animation.py @@ -60,14 +60,12 @@ if __name__ == '__main__': LedLib.init_led() read_animation_file() - + rate = rospy.Rate(10) #first_frame = frames[0] #takeoff(round(float(first_frame['x']), 4), round(float(first_frame['y']), 4), round(float(first_frame['z']), 4)) takeoff() - #FlightLib.reach() + FlightLib.reach(x=frames[0]['x'], y=frames[0]['y'], z=frames[0]['z']) for frame in frames: - time.sleep(0.1) + rate.sleep() do_next_animation(frame) - - land() - time.sleep(3) \ No newline at end of file + land() \ No newline at end of file