tf2

This package uses geometry_msgs for some of the messages.

Useful functions

Warning

use tf2 not tf

Commands

Check tf tree:

roswtf
rosrun tf tf_monitor
rosrun tf view_frames

to print a particular transformation:

rosrun tf tf_echo /map /odom

Joint States

Terminology

  1. Quaternions: a way to describe rotations that does not have singularities. It has four numbers, the first three describe an axis and the third is the amount of rotation about that axis.
The first three components are imaginary:
q=xi+yj+zk+w
The magnitude of a quaternion is:
magnitude=sqrt(x^2+y*2+z^2+w^2)
where:
x = x / magnitude
y = y / magnitude
z = z / magnitude
w = w / magnitude

http://www.euclideanspace.com/maths/geometry/rotations/conversions/quaternionToEuler/

Example Resources

Potential Errors

Note

potential error:

fatal error: tf/transform_broadcaster.h: No such file or directory
compilation terminated.

Use tf2! The new version of tf.