Checkpoint 8
This commit is contained in:
@@ -42,8 +42,11 @@ def test_simulate_scan_sheep_in_front_returns_centre_hit():
|
||||
|
||||
|
||||
def test_simulate_scan_sheep_behind_dog_not_hit():
|
||||
# With 360° FOV, a sheep behind the dog IS now hit.
|
||||
ranges = simulate_scan(0.0, 0.0, 0.0, [(-5.0, 0.0)], noise=0.0)
|
||||
assert (ranges == LIDAR_MAX_RANGE).all()
|
||||
assert (ranges < LIDAR_MAX_RANGE).any()
|
||||
# Verify the closest hit is near 5m (sheep at distance 5).
|
||||
assert float(ranges.min()) < 5.3
|
||||
|
||||
|
||||
def test_simulate_scan_wall_hit():
|
||||
|
||||
Reference in New Issue
Block a user