Compare commits
2 Commits
0e46b0dbe2
...
ebf356445b
Author | SHA1 | Date | |
---|---|---|---|
ebf356445b | |||
ef5f297a47 |
@ -235,8 +235,9 @@ def main():
|
|||||||
print(f"Going to landmark {landmark}")
|
print(f"Going to landmark {landmark}")
|
||||||
while True:
|
while True:
|
||||||
particles, est_pose = look_around(noah, particles, cam, est_pose)
|
particles, est_pose = look_around(noah, particles, cam, est_pose)
|
||||||
particles, est_pose = turn_towards_landmark(
|
print(est_pose)
|
||||||
noah, particles, est_pose, landmark)
|
exit()
|
||||||
|
particles, est_pose = turn_towards_landmark(noah, particles, est_pose, landmark)
|
||||||
drive_time = time_to_landmark(est_pose, landmark)
|
drive_time = time_to_landmark(est_pose, landmark)
|
||||||
if not abs(drive_until_stopped(noah) - drive_time) < 0.5:
|
if not abs(drive_until_stopped(noah) - drive_time) < 0.5:
|
||||||
drunk_drive(noah)
|
drunk_drive(noah)
|
||||||
|
@ -37,6 +37,9 @@ class Particle(object):
|
|||||||
def copy(self):
|
def copy(self):
|
||||||
return Particle(self.x, self.y, self.theta, self.weight)
|
return Particle(self.x, self.y, self.theta, self.weight)
|
||||||
|
|
||||||
|
def __str__(self) -> str:
|
||||||
|
return f"({self.x},{self.y},{self.theta})"
|
||||||
|
|
||||||
|
|
||||||
def estimate_pose(particles_list):
|
def estimate_pose(particles_list):
|
||||||
"""Estimate the pose from particles by computing the average position and orientation over all particles.
|
"""Estimate the pose from particles by computing the average position and orientation over all particles.
|
||||||
|
Reference in New Issue
Block a user