tf AttributeError: 'module' object has no attribute 'transformations'
I'm using roscopter package to get the imu data from my quadcopter.
It worked well but I got error when running it today.
rosrun roscopter imu_transform_publish.py
[ERROR] [WallTime: 1401208503.130663] bad callback: <function imu_callback at 0x18c9578>
Traceback (most recent call last):
File "/opt/ros/hydro/lib/python2.7/dist-packages/rospy/topics.py", line 682, in _invoke_callback
cb(msg)
File "/home/aqua/ros_catkin/src/roscopter/scripts/imu_transform_publish.py", line 75, in imu_callback
q = tf.transformations.quaternion_from_euler(roll,pitch,yaw)
AttributeError: 'module' object has no attribute 'transformations'
import tf
q = tf.transformations.quaternion_from_euler(roll,pitch,yaw)
According to the tf tutorial, tf.transformations.quaternion_from_euler(roll,pitch,yaw)
should be correct, so I'm confused where the problem is.
also for the tf module, it locates in my catkin workspace:
Python 2.7.4 (default, Sep 26 2013, 03:20:26)
[GCC 4.7.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import tf
>>> print tf
<module 'tf' from '/home/aqua/ros_catkin/devel/lib/python2.7/dist-packages/tf/__init__.pyc'>
Hi, i am new to ros and just met the same problem. Just download a new tf-file from github as you did. But what should i do afterwards? Would you please explain more about integrating this file into catkin_ws? I use catkin_make rather than rosbuild
@Jian1994 just put it into your catkin workspace