This commit is contained in:
NikolajDanger
2022-10-26 14:37:03 +02:00
parent 5ddcd8499d
commit 04c8dcc96e

View File

@ -223,17 +223,16 @@ def main():
LANDMARKS[0] 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 noah = robot.Robot() # Noah er vores robots navn
cam = camera.Camera(0, 'arlo', useCaptureThread=True) cam = camera.Camera(0, 'arlo', useCaptureThread=True)
for landmark in landmark_order: for landmark in landmark_order:
print(f"Going to landmark {landmark}") print(f"Going to landmark {landmark}")
while True: 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) particles, est_pose = look_around(noah, particles, cam, est_pose)
print(est_pose) print(est_pose)
particles, est_pose = turn_towards_landmark(noah, particles, est_pose, landmark) particles, est_pose = turn_towards_landmark(noah, particles, est_pose, landmark)