From 04c8dcc96e8855a48dca0e19890e5855d97a7e95 Mon Sep 17 00:00:00 2001 From: NikolajDanger Date: Wed, 26 Oct 2022 14:37:03 +0200 Subject: [PATCH] :sparkles: --- rally2.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) 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)