This is the Python API reference for the tf2_ros package.
To broadcast transforms using ROS: - Call rospy.init() to initialize a node. - Construct a tf2_ros.TransformBroadcaster. - Pass a geometry_msgs.TransformStamped message to tf2_ros.TransformBroadcaster.sendTransform().
- Alternatively, pass a vector of geometry_msgs.TransformStamped messages.
To listen for transforms using ROS: - Construct an instance of a class that implements tf2_ros.BufferInterface.
- tf2_ros.Buffer is the standard implementation which offers a tf2_frames service that can respond to requests with a tf2_msgs.FrameGraph.
- tf2_ros.BufferClient uses an actionlib.SimpleActionClient to wait for the requested transform to become available.
For more information, see the tf2 tutorials: http://wiki.ros.org/tf2/Tutorials
Or, get an overview of data type conversion methods in geometry_experimental packages.
See http://wiki.ros.org/tf2/Tutorials for more detailed usage.