Using TF package to transform rotations
I'm using the Gazebo simulator and gazebo_ros to interface with it. It the simulator, I have a "quadcopter" object. I would like to apply a thrust to the quadcopter. Gazbo_ros offers a way to apply a force to an object, but it can only do so in the world's coordinate frame (i.e. even if my quadcopter is on its side, applying a force in the Z axis will still make it go directly vertical).
I'm trying to figure out how to use the TF package to transform between the two coordinate frames. Essentially, with a given Pose vector and Quaternion orientation of the quadcopter model, how can I convert from the quadcopter's Z axis to a vector in the world's coordinate frame? i.e. what force vector in the world's coordinate frame should be applied to give a force in the quadcopter's Z axis?