β± 13:15
π 5,430
π§ Wally Obstacle Avoidance β Find Its Own Way
βΆοΈ Video Playback Area
Obstacle Avoidance in Practice
π― Three Strategies Compared
| Strategy | Principle | Pros/Cons |
|---|---|---|
| Random turn | Turn left/right randomly on obstacle | Simplest but low efficiency |
| Wall following | Always hug one side of a wall | High coverage, may miss spots |
| A* pathing | Pre-build map + optimal search | Optimal but needs a map |
π» Basic Avoidance Code
SAFE_DIST = 30
while True:
dist = ultrasonic.read()
if dist > SAFE_DIST:
robot.forward(speed=70)
else:
robot.stop()
robot.backward(0.3)
random_turn() # turn left or right randomly
π§ͺ Test Scenarios
- Simple corridor (straight + corner)
- Maze built from cartons
- Scattered books as obstacles
- Dynamic environment (person moving, test reaction)
Share to:
β Back to News