Re: [ros-users] tf doubts

Forside
Vedhæftede filer:
Indlæg som e-mail
+ (text/plain)
Slet denne besked
Besvar denne besked
Skribent: Tully Foote
Dato:  
Til: ros-users
Emne: Re: [ros-users] tf doubts
Narasimhan,
You are precisely right the transform represents the difference in pose
between turtle1 and turtle2.

The position is stored as a vector and the orientation as a quaternion.
The transform is a tf::Transform which is a btTransform underneath. You
should read over the API to find out what things like the 3 argument
constructor arguments are for btQuaternion. They are documented in the
bullet package.

And I would suggest that you find your choice of reference to understand
quaternions, and how to convert from euler angles etc. A google search
will find plenty of good references.

Tully

On 06/27/2010 06:35 AM, Narasimhan wrote:
> in this tutorial
> http://www.ros.org/wiki/tf/Tutorials/Writing%20a%20tf%20listener%20%28C%2B%2B%29
> Writing a tf listener
> i wanted to know what transform.getOrigin().x() and
> transform.getOrigin().y() were.
> first i just thought that they were the difference in the x and y
> coordinates of turtle1 and turtle2.
> but i found out that the values are different.( by adding the line
> "ROS_INFO("net displacement is /turtle1-/turtle2: (%.4f, %.4f, %.4f)",
> transform.getOrigin().x(),transform.getOrigin().y() ,
> transform.getOrigin().z());" to the turtle_tf_listener.cpp and running it
> separately)
> so what exactly are they.
>
> and what is Quaternion w, x, y, z and how is it related to the turtle. i
> guess it represents the turtles orientation(direction it faces) since its
> position is already represented by its coordinates.
> and in this
> http://www.ros.org/wiki/tf/Tutorials/Writing%20a%20tf%20broadcaster%20%28C%2B%2B%29
> Writing a tf broadcaster "transform.setRotation(tf::Quaternion(msg->theta,
> 0, 0));" how does theta change to w and z.
>