Hi Pablo,
The new package pose_cov_ops in the mrpt_common stack does exactly what you're looking for.
It includes pose (direct and inverse) composition with a rigorous treatment of uncertainty, even when it's given as a 6x6 covariance matrix in yaw-pitch-roll, which is much harder to implement than e.g. as a 7x7 with unit quaternion representation.
The package is actually a wrapper of functionality in the lib mrpt-base, which has dozens of unit tests regarding uncertainty transformations so it should be quite reliable. Much more of mrpt-base functionality is expected to be wrapped in the future.
Check the package wiki for references to a technical report explaining all the internal equations.
Cheers.
I talk a bit more about this problem in this post of my blog: http://geus.wordpress.com/2012/02/17/cambiando-el-marco-de-referencia-de-una-distribucion-gaussiana/ . I'm sorry it is in spanish but It may be useful for some people.
You might want to read into "S. Su and C. Lee, “Manipulation and propagation of uncertainty and verification of applicability of actions in assembly tasks,” Systems, Man and Cybernetics, IEEE Transactions on, vol. 22, no. 6, pp. 1376– 1389, 1992."