AutonomyLab/ardrone_autonomy — pull request #88 by v01d (2014-02-05 18:04:30+00:00)
Title: added /ardrone/odometry topic and corresponding "odom" tf_frame

I've added X,Y odometry computation by accumulating instant linear velocities and absolute angles as extracted from navdata. The Z value (altitude) is taken directly from navdata. The orientation is also obtained from absolute angles. All values are reported in meters and radians.

This information is published in /ardrone/odometry (nav_msgs::Odometry) and as a TF frame with name "odom" (parent of base frame).

There is one catch, though: the accumulation of x and y is performed after every navdata is published. This implies that, if not using realtime_navdata, accumulation will not be performed for every navdata packet received and quality will suffer. It would be ideal to move this accumulation to the navdata receving thread, but in case realtime_navdata is not enabled I would need to protect this from concurrent modifications between threads.