A subscriber (python script) problem? Please correct..... the error
I am trying to write the python script to subscribe topic "cmd_vel_mux/input/teleop" as keyboard Teleop node publishes message on this topic
#!/usr/bin/env python
import roslib
roslib.load_manifest('test')
import rospy
from geometry_msgs.msg import Twist
from std_msgs.msg import String
def callback(data):
print rospy.get_name(), "%f %f %f %f %f %f" %data.linx %data.liny %data.linz %data.angx %data.angy %data.angz
def listener():
rospy.init_node('subs1', anonymous=True)
rospy.Subscriber("cmd_vel_mux/input/teleop", Twist, callback)
rospy.spin()
if __name__ == '__main__' :
listener()
Error on terminal ............
Traceback (most recent call last):
File "/home/admin-pc/mywork/test/scripts/subs1.py", line 4, in <module>
roslib.load_manifest('test')
File "/opt/ros/groovy/lib/python2.7/dist-packages/roslib/launcher.py", line 62, in load_manifest
sys.path = _generate_python_path(package_name, _rospack) + sys.path
File "/opt/ros/groovy/lib/python2.7/dist-packages/roslib/launcher.py", line 93, in _generate_python_path
m = rospack.get_manifest(pkg)
File "/usr/lib/pymodules/python2.7/rospkg/rospack.py", line 133, in get_manifest
return self._load_manifest(name)
File "/usr/lib/pymodules/python2.7/rospkg/rospack.py", line 172, in _load_manifest
retval = self._manifests[name] = parse_manifest_file(self.get_path(name), self._manifest_name)
File "/usr/lib/pymodules/python2.7/rospkg/rospack.py", line 164, in get_path
raise ResourceNotFound(name, ros_paths=self._ros_paths)
rospkg.common.ResourceNotFound: test
ROS path [0]=/opt/ros/groovy/share/ros
ROS path [1]=/opt/ros/groovy/share
ROS path [2]=/opt/ros/groovy/stacks
ROS path [3]=/home/admin-pc/mywork
ROS path [4]=/home/admin-pc/ros_workspace$