Ask Your Question
0

import tf2/StaticTransformPublisher in Python

asked 2017-01-09 09:27:04 -0500

David Lu gravatar image

updated 2017-01-09 09:28:57 -0500

I'm following this tutorial[1] and having trouble with importing.

[1] http://wiki.ros.org/tf2/Tutorials/Wri...

>>> import tf2_ros
>>> tf2_ros.StaticTransformPublisher()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: 'module' object has no attribute 'StaticTransformPublisher'

Using up-to-date Indigo with Trusty.

$ dpkg -s ros-indigo-tf2-ros | grep Version
Version: 0.5.13-0trusty-20161025-211630-0700
edit retag flag offensive close merge delete

Comments

What is it you are trying to do? static_transform_publisher is a command line tool which can be used like this:

static_transform_publisher x y z yaw pitch roll frame_id child_frame_id period_in_ms

http://wiki.ros.org/tf#static_transfo...

Michael Johnson gravatar image Michael Johnson  ( 2017-01-09 09:33:02 -0500 )edit

I appreciate the link, but I hate that command line interface and am trying to rewrite it.

David Lu gravatar image David Lu  ( 2017-01-09 10:07:22 -0500 )edit

2 Answers

Sort by ยป oldest newest most voted
0

answered 2017-01-11 20:29:22 -0500

David Lu gravatar image

The real problem is that the debian has not been updated. https://github.com/ros/geometry2/issu...

edit flag offensive delete link more
2

answered 2017-01-09 10:58:08 -0500

Michael Johnson gravatar image

It looks like StaticTransformPublisher was renamed to StaticTransformBroadcaster. The API looks the same though so you should just be able to directly replace it.

github link

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2017-01-09 09:27:04 -0500

Seen: 377 times

Last updated: Jan 11 '17