Some more info (I am researching it right now): tum_ardrone uses
PTAM algorithm, but this is pretty old. There is improved implementation in ROS named
ethzasl_ptam and also newer standalone implementation which needs only OpenCV named
gptam.
But now there are also better algorithms:
ORB-SLAM2 (indirect sparse algorithm similar to PTAM, but with much better results),
LSD-SLAM (direct semi-dense algorithm) and
DSO (direct sparse algorithm, but this is only visual odometry, not complete SLAM). And slightly less known (but also interesting) monocular VO and/or SLAM algorithms are
SVO,
REMODE,
DPPTAM,
DTAM,
ROVIO,
OKVIS,
VINS-Mono,
GTSAM. Looking at all of it, I would choose ORB-SLAM2 for now - seems complete, simple, well implemented and documented and most universal.
One more finding: sparse VO/SLAM algorithms (feature-based) are probably not that good for obstacle avoidance, you can apparently miss objects without too much features (like cabinet wall without texture). So dense or semi-dense algorithms would be better. Maybe LSD-SLAM is therefore better than ORB-SLAM2 for obstacle avoidance. There is alse this code, which could be maybe used as a starting point:
hypharos_ardrone_navigation (ARDrone autonomous indoor navigation by integrating lsd-slam with imu through least square method)