diff --git a/rally2.py b/rally2.py index 37fb9a5..6cf6829 100644 --- a/rally2.py +++ b/rally2.py @@ -223,17 +223,16 @@ def main(): LANDMARKS[0] ] - particles = initialize_particles(NUM_PARTICLES) - - # The estimate of the robots current pose - est_pose = particle.estimate_pose(particles) - noah = robot.Robot() # Noah er vores robots navn cam = camera.Camera(0, 'arlo', useCaptureThread=True) for landmark in landmark_order: print(f"Going to landmark {landmark}") while True: + particles = initialize_particles(NUM_PARTICLES) + + # The estimate of the robots current pose + est_pose = particle.estimate_pose(particles) particles, est_pose = look_around(noah, particles, cam, est_pose) print(est_pose) particles, est_pose = turn_towards_landmark(noah, particles, est_pose, landmark)