ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

All examples you posted are saying the same thing it's just in the first two they use the position variable to store the translational part of the transform and quaternion to store the rotational part of the transform (which is indeed expressed as a quaternion). In the third example they instead use trans and rot for variable names, but the meaning of the data is unchanged.

There is official API documentation of tf in Python here. You might also want to look into the tf2 tutorials, specifically the Python listener tutorial. Under the hood, the tf functions now use tf2, and you could be using it directly. During the migration from tf to tf2 there were many behind-the-scenes changes, but I'm unaware of any API changes to tf.

You may have had trouble finding the source code because the Python TransformerROS class inherits from a C++ class compiled with Python.h. In other words, the Python API lookupTransform function is actually located in the pytf.cpp C++ code.

All examples you posted are saying the same thing it's just in the first two they use the position variable to store the translational part of the transform and quaternion to store the rotational part of the transform (which is indeed expressed as a quaternion). In the third example they instead use trans and rot for variable names, but the meaning of the data is unchanged.unchanged. E.g. the function is always returning two arguments --- the first is a 3-length tuple of double values representing the x-y-z translation, and the second is a 4-length tuple of doubles representing the rotation as a quaternion (x-y-z-w).

There is official API documentation of tf in Python here. You might also want to look into the tf2 tutorials, specifically the Python listener tutorial. Under the hood, the tf functions now use tf2, and you could be using it directly. During the migration from tf to tf2 there were many behind-the-scenes changes, but I'm unaware of any API changes to tf.

You may have had trouble finding the source code because the Python TransformerROS class inherits from a C++ class compiled with Python.h. In other words, the Python API lookupTransform function is actually located in the pytf.cpp C++ code.

All examples you posted are saying the same thing it's just in the first two they use the position variable to store the translational part of the transform and quaternion to store the rotational part of the transform (which is indeed expressed as a quaternion). In the third example they instead use trans and rot for variable names, but the meaning of the data is unchanged. E.g. the The function is always returning two arguments --- the first is a 3-length tuple of double values representing the x-y-z translation, and the second is a 4-length tuple of doubles representing the rotation as a quaternion (x-y-z-w).

There is official API documentation of tf in Python here. You might also want to look into the tf2 tutorials, specifically the Python listener tutorial. Under the hood, the tf functions now use tf2, and you could be using it directly. During the migration from tf to tf2 there were many behind-the-scenes changes, but I'm unaware of any API changes to tf.

You may have had trouble finding the source code because the Python TransformerROS class inherits from a C++ class compiled with Python.h. In other words, the Python API lookupTransform function is actually located in the pytf.cpp C++ code.