0
$\begingroup$

Rosanswers logo

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?


Originally posted by Jordan9 on ROS Answers with karma: 113 on 2015-04-07

Post score: 0

$\endgroup$

2 Answers 2

0
$\begingroup$

Rosanswers logo

I figured it out, using the tf::Quaternion class which comes with built-in vector transformations.


Originally posted by Jordan9 with karma: 113 on 2015-04-08

This answer was ACCEPTED on the original site

Post score: 0

$\endgroup$
0
$\begingroup$

Rosanswers logo

This TF tutorial will be a good starting point; it listens to the TF topic and calculates the requested transform in the listener.lookupTransform call.


Originally posted by Morgan with karma: 521 on 2015-04-08

This answer was NOT ACCEPTED on the original site

Post score: 1

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.