Robotics StackExchange | Archived questions

How to solve 'ImportError: No module named object_recognition_capture.orb_capture' ?

I followed recognition kitchen doc.

I use ROS electric version.

I connect kinect device and run:

  roslaunch openni_camera openni_node.launch
  rosrun object_recognition_core orb_template.py -o my_textured_plane

And I get this message:

  sam@sam:~/code/ros/sam_perception/sam_recognition$ rosrun object_recognition_core orb_template.py -o my_textured_plane
  Traceback (most recent call last):
    File "/opt/ros/electric/stacks/object_recognition/object_recognition_core/bin/orb_template.py", line 3, in <module>
      from object_recognition_capture.orb_capture import *
  ImportError: No module named object_recognition_capture.orb_capture
  sam@sam:~/code/ros/sam_perception/sam_recognition$

How to solve it?

Thank you~

Asked by sam on 2012-07-15 23:56:23 UTC

Comments

Is your PYTHONPATH set correctly? it must include directory path where concerned module is residing.

Asked by prince on 2012-07-16 00:25:23 UTC

How to set PYTHONPATH? Thank you~

Asked by sam on 2012-07-16 01:45:30 UTC

export PYTHONPATH=...

Asked by prince on 2012-07-17 05:50:07 UTC

I set $PYTHONPATH to /usr/bin/python:/opt/ros/electric/ros/core/roslib/src: but it doesn't work. What to do next? Thank you~

Asked by sam on 2012-07-22 21:18:59 UTC

PYTHONPATH must contain reference to your module object_recognition_capture.orb_capture. Please read http://www.stereoplex.com/blog/understanding-imports-and-pythonpath to understand PYTHONPATH

Asked by prince on 2012-07-22 21:29:46 UTC

That is not my module. I just want to run it. How to find the correct path? Thank you~

Asked by sam on 2012-07-22 23:04:23 UTC

Answers