Package Summary

Tags No category tags.
Version 0.12.5
License Apache License 2.0
Build type AMENT_PYTHON
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/ros2/geometry2.git
VCS Type git
VCS Version eloquent
Last Updated 2020-01-24
Dev Status MAINTAINED
CI status No Continuous Integration
Released RELEASED
Package Tags No category tags.
Contributing Help Wanted (0)
Good First Issues (0)
Pull Requests to Review (0)

Package Description

Has examples of using the tf2 Python API.

Additional Links

No additional links.

Maintainers

  • Tully Foote

Authors

  • Shane Loretz

Python examples for tf2

This package has examples for using the tf2_ros API from python. It shows how to broadcast and receive transforms between frames. The example transforms might be seen on a small two wheel robot.

Broadcasting Transforms

tf2 publishes two types of transforms: static and dynamic. Static transforms are constant, and never change once published. Dynamic transforms are frequently changing, and re-published every time the do.

Both broadcasters can be run with

ros2 launch examples_tf2_py broadcasters.launch.xml

dynamic_broadcaster.py

ros2 run examples_tf2_py dynamic_broadcaster

This is an example of a dynamic transform publisher. Transforms showing the rotation of two wheels are published frequently.

static_broadcaster.py

ros2 run examples_tf2_py static_broadcaster

This is an example of a static transform publisher. The transforms to sensors on the robot are published once at startup, and then never changed.

Receiving Transforms

Transforms are broadcast to all listeners, who then use the data. If a transform is not immediately available then users of the data may choose to wait for it.

waits_for_transform.py

ros2 run examples_tf2_py waits_for_transform

This example blocks until a transform is received. It must be run with a MultiThreadedExecutor so the TransformListener can execute callbacks for it's subscriptions.

async_waits_for_transforms.py

ros2 run examples_tf2_py async_waits_for_transform

This example uses coroutines to wait for a transform. The coroutine is suspended without blocking the executor, so it works with a SingleThreadedExecutor.

Frame Dumper

ros2 run examples_tf2_py frame_dumper

This example periodically outputs information about all frames it is aware of.

CHANGELOG

Changelog for package examples_tf2_py

0.12.5 (2020-01-17)

0.12.4 (2019-11-19)

  • Add Python examples for tf2_ros (#161)

Wiki Tutorials

See ROS Wiki Tutorials for more details.

Source Tutorials

Not currently indexed.

Dependant Packages

No known dependants.

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged examples_tf2_py at answers.ros.org

No version for distro dashing. Known supported distros are highlighted in the buttons above.
No version for distro melodic. Known supported distros are highlighted in the buttons above.
No version for distro kinetic. Known supported distros are highlighted in the buttons above.
No version for distro ardent. Known supported distros are highlighted in the buttons above.
No version for distro bouncy. Known supported distros are highlighted in the buttons above.
No version for distro crystal. Known supported distros are highlighted in the buttons above.
No version for distro lunar. Known supported distros are highlighted in the buttons above.
No version for distro jade. Known supported distros are highlighted in the buttons above.
No version for distro indigo. Known supported distros are highlighted in the buttons above.
No version for distro hydro. Known supported distros are highlighted in the buttons above.