Show EOL distros:
Package Summary
This package contains the ROS bindings for the tf2 library, for both Python and C++.
- Author: Wim Meeussen, Eitan Marder-Eppstein
- License: BSD
- Repository: ros-pkg
- Source: hg https://kforge.ros.org/geometry/experimental
Package Summary
This package contains the ROS bindings for the tf2 library, for both Python and C++.
- Author: Wim Meeussen, Eitan Marder-Eppstein
- License: BSD
- Source: hg https://kforge.ros.org/geometry/experimental (branch: default)
Package Summary
This package contains the ROS bindings for the tf2 library, for both Python and C++.
- Author: Wim Meeussen, Eitan Marder-Eppstein
- License: BSD
- Source: hg https://kforge.ros.org/geometry/experimental (branch: default)
Package Summary
This package contains the ROS bindings for the tf2 library, for both Python and C++.
- Maintainer status: developed
- Maintainer: Tully Foote <tfoote AT willowgarage DOT com>
- Author: Eitan Marder-Eppstein, Wim Meeussen
- License: BSD
- Source: git https://github.com/ros/geometry-experimental.git (branch: groovy-devel)
Package Summary
This package contains the ROS bindings for the tf2 library, for both Python and C++.
- Maintainer status: maintained
- Maintainer: Tully Foote <tfoote AT osrfoundation DOT org>
- Author: Eitan Marder-Eppstein, Wim Meeussen
- License: BSD
- Source: git https://github.com/ros/geometry-experimental.git (branch: hydro-devel)
Package Summary
This package contains the ROS bindings for the tf2 library, for both Python and C++.
- Maintainer status: maintained
- Maintainer: Tully Foote <tfoote AT osrfoundation DOT org>
- Author: Eitan Marder-Eppstein, Wim Meeussen
- License: BSD
- Source: git https://github.com/ros/geometry2.git (branch: indigo-devel)
Package Summary
This package contains the ROS bindings for the tf2 library, for both Python and C++.
- Maintainer status: maintained
- Maintainer: Tully Foote <tfoote AT osrfoundation DOT org>
- Author: Eitan Marder-Eppstein, Wim Meeussen
- License: BSD
- Source: git https://github.com/ros/geometry2.git (branch: indigo-devel)
Package Summary
This package contains the ROS bindings for the tf2 library, for both Python and C++.
- Maintainer status: maintained
- Maintainer: Tully Foote <tfoote AT osrfoundation DOT org>
- Author: Eitan Marder-Eppstein, Wim Meeussen
- License: BSD
- Source: git https://github.com/ros/geometry2.git (branch: indigo-devel)
Package Summary
This package contains the ROS bindings for the tf2 library, for both Python and C++.
- Maintainer status: maintained
- Maintainer: Tully Foote <tfoote AT osrfoundation DOT org>
- Author: Eitan Marder-Eppstein, Wim Meeussen
- License: BSD
- Source: git https://github.com/ros/geometry2.git (branch: indigo-devel)
Package Summary
This package contains the ROS bindings for the tf2 library, for both Python and C++.
- Maintainer status: maintained
- Maintainer: Tully Foote <tfoote AT osrfoundation DOT org>
- Author: Eitan Marder-Eppstein, Wim Meeussen
- License: BSD
- Source: git https://github.com/ros/geometry2.git (branch: melodic-devel)
Package Summary
This package contains the ROS bindings for the tf2 library, for both Python and C++.
- Maintainer status: maintained
- Maintainer: Tully Foote <tfoote AT osrfoundation DOT org>
- Author: Eitan Marder-Eppstein, Wim Meeussen
- License: BSD
- Source: git https://github.com/ros/geometry2.git (branch: noetic-devel)
Contents
Documentation
This package provides roscpp and rospy bindings for tf2. Here is a list of the common method that should be used when interacting with tf2 function within ROS.
Broadcasting Transforms
$ROS_DISTRO
tf2_ros::TransformBroadcaster(), constructor
tf2_ros::TransformBroadcaster::sendTransform to send transforms
Please refer to the C++ API or Python API
Similarly static transforms can be sent by:
tf2_ros::StaticTransformBroadcaster(), constructor,
tf2_ros::StaticTransformBroadcaster::sendTransform to send static transforms
Please refer to the C++ API or Python API
Using Published Transforms
For most purposes using tf2_ros will be done using tf2_ros::Buffer. It's main public API is defined by tf2_ros::BufferInterface. Typically it will be populated using a tf2_ros::TransformListener which subscribes to the appropriate topics.
tf2_ros::Buffer::transform is the main method for applying transforms.
canTransform allows to know if a transform is available
lookupTransform is a lower level method which returns the transform between two coordinate frames. This method is the core functionality of the tf2 library.
getFrames is a service method providing the frames in the graph as a yaml tree
Please refer to the C++ API or Python Api
Filtering Transforms
tf2_ros provides a feature which allows to pass only the messages once there is transform data available. This follows the pattern from the message_filters package. Here is a brief list of functions that the user is most likely to use.
tf2_ros::MessageFilter(), constructor
connectInput() allows to connect filters together
setTargetFrame() set the frame you want to be able to transform to before getting a message callback
setTargetFrames() set the frames you want to be able to transform to before getting a message callback
setTolerance() specifies the time tolerance for the transform data
clear flushes the message queue
setQueueSize()
Please refer to the C++ API or Python Api
Exceptions
Here is the list of exceptions that can be thrown by tf2_ros and are inherited from tf2.
tf2::ConnectivityException
tf2::LookupException
tf2::ExtrapolationException
tf2::InvalidArgumentException
tf2::TimeoutException
tf2::TransformException
For more information see C++ exceptions or Python Exceptions
Tools
static_transform_publisher
static_transform_publisher x y z yaw pitch roll frame_id child_frame_id
- Publish a static coordinate transform to tf2 using an x/y/z offset in meters and yaw/pitch/roll in radians. (yaw is rotation about Z, pitch is rotation about Y, and roll is rotation about X).
static_transform_publisher x y z qx qy qz qw frame_id child_frame_id
- Publish a static coordinate transform to tf2 using an x/y/z offset in meters and quaternion.
Unlike in tf, there is no period argument, and a latched topic is used.
static_transform_publisher is designed both as a command-line tool for manual use, as well as for use within roslaunch files for setting static transforms. For example:
1 <launch>
2 <node pkg="tf2_ros" type="static_transform_publisher" name="link1_broadcaster" args="1 0 0 0 0 0 1 link1_parent link1" />
3 </launch>