Obstacle Avoidance
Enable and configure obstacle avoidance for the AV2.
Overview
The AV2 uses LIDAR-based obstacle detection with the Dynamic Window Approach (DWA) for local obstacle avoidance.
Enabling Obstacle Avoidance
Step 1: Verify LIDAR
python -c "from sensors.lidar_interface import VelodyneLIDAR; l = VelodyneLIDAR(); print(len(l.get_scan()))"
Should show > 0 points.
Step 2: Enable in Runner
Edit runner.py or use command line flag:
python runner.py --lat 34.0580 --lon -117.8210 --enable-dwa
Step 3: Configure Parameters
Edit config/dwa_config.yaml:
costs:
obstacle_cost_gain: 2.0 # Increase for more caution
Testing
Static Obstacles
Place cardboard boxes in path
Run navigation
Vehicle should navigate around obstacles
Dynamic Obstacles
Have person walk across path (carefully!)
Vehicle should detect and avoid
Tuning
If too conservative (large detours):
Decrease
obstacle_cost_gainDecrease
robot_radius
If too aggressive (close passes):
Increase
obstacle_cost_gainIncrease
robot_radiusIncrease safety margin