title_body: Optical sensors vs Ultrasonic sensors on a drone Are there any performance differences between optical sensors and ultrasonic sensors? How do I make the right choice for my drone? I will be using them in a object detection system for collision prevention.
upvoted_answer: Keyence has a useful comparison table (appologies the table doesn't look good on mobile):
  
  ╔════════════════════╦══════════════════╦══════════════════╗
  ║        Item        ║     Optical      ║    Ultrasonic    ║
  ╠════════════════════╬══════════════════╬══════════════════╣
  ║ Detectable target  ║ Affected by      ║ Unaffected by    ║
  ║                    ║  colour/material ║  colour/material ║
  ║ Detecting distance ║ 1000mm max       ║ 10m max          ║
  ║ Accuracy           ║ High             ║ Low              ║
  ║ Response speed     ║ Fast             ║ Slow             ║
  ║ Dust/water         ║ Affected         ║ Unaffected       ║
  ║ Measuring range    ║ Small            ║ Large            ║
  ╚════════════════════╩══════════════════╩══════════════════╝
  
  
  So basically it depends how and where you want to use it... Since you say you are trying to avoid colliding with objects, my guess is you'll want the ultrasonic.  It gives you a much higher detecting distance (10 m vs 1m).  At most speeds, 1 m could be insufficient to avoid a collision.
  
  Also, if you plan on using your drone anywhere where the sensor could get dirty/wet, you'll definitely want to go with the ultrasonic sensor.