ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

kgnkwmr's profile - activity

2020-05-14 04:08:33 -0500 received badge  Student (source)
2015-12-15 06:43:08 -0500 received badge  Notable Question (source)
2015-12-15 06:43:08 -0500 received badge  Famous Question (source)
2015-03-23 14:49:54 -0500 received badge  Popular Question (source)
2015-03-13 19:22:58 -0500 asked a question 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?