Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

ImportError: No module named tf

I am writing a node that involves calculating the distance from the PR2's left wrist to a point in space, and publishing that distance. The point is in the base frame, so to make calculations easier I'm attempting to change the frame of the point. However, when I run it, nothing is published (when I use rostopic echo, it indicates that the parameter is not being published. Essentially it doesn't know that it exists). I tried using rosrun on the file and it errors saying

ImportError: No module named tf

Here's what the beginning of my code looks like (ignore the ' ')

'#!/usr/bin/env python'

'# This publisher will calculated the distance of an object' '# from PR2' import roslib roslib.load_manifest('PR2_assignment0') import rospy import sys from std_msgs.msg import String import tf

from std_msgs.msg import Float64 from geometry_msgs.msg import PointStamped

I've made many modifications but it still does not seem to work (I've checked threads with similar problems but their solutions aren't working). Other files with a similar format work, but mine doesn't...

I haven't tried the code without the tf frame, so I'll try that out for now and see if it sheds light on some things.

Any suggestions?

ImportError: No module named tf

I am writing a node that involves calculating the distance from the PR2's left wrist to a point in space, and publishing that distance. The point is in the base frame, so to make calculations easier I'm attempting to change the frame of the point. However, when I run it, nothing is published (when I use rostopic echo, it indicates that the parameter is not being published. Essentially it doesn't know that it exists). I tried using rosrun on the file and it errors saying

ImportError: No module named tf

tf

Here's what the beginning of my code looks like (ignore the ' ')

'#!/usr/bin/env python'

'# like

#!/usr/bin/env python

# This publisher will calculated the distance of an object'
'# from PR2'
object
# from PR2
import roslib
roslib.load_manifest('PR2_assignment0')
import rospy
import sys
from std_msgs.msg import String
import tf

tf from std_msgs.msg import Float64 from geometry_msgs.msg import PointStamped

PointStamped

I've made many modifications but it still does not seem to work (I've checked threads with similar problems but their solutions aren't working). Other files with a similar format work, but mine doesn't...

I haven't tried the code without the tf frame, so I'll try that out for now and see if it sheds light on some things.

Any suggestions?

ImportError: No module named tf

I am writing a node that involves calculating the distance from the PR2's left wrist to a point in space, and publishing that distance. The point is in the base frame, so to make calculations easier I'm attempting to change the frame of the point. However, when I run it, nothing is published (when I use rostopic echo, it indicates that the parameter is not being published. Essentially it doesn't know that it exists). I tried using rosrun on the file and it errors saying

ImportError: No module named tf

Here's what the beginning of my code looks like

#!/usr/bin/env python

# This publisher will calculated the distance of an object
# from PR2
import roslib
roslib.load_manifest('PR2_assignment0')
import rospy
import sys
from std_msgs.msg import String
import tf

from std_msgs.msg import Float64
from geometry_msgs.msg import PointStamped

I've made many modifications but it still does not seem to work (I've checked threads with similar problems but their solutions aren't working). Other files with a similar format work, but mine doesn't...

I haven't tried the code without the tf frame, so I'll try that out for now and see if it sheds light on some things.

Any suggestions?