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

asked 2012-07-15 23:56:23 -0500

sam gravatar image

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~

edit retag flag offensive reopen merge delete

Closed for the following reason question is not relevant or outdated by tfoote
close date 2015-03-26 18:24:19.085826

Comments

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

prince gravatar image prince  ( 2012-07-16 00:25:23 -0500 )edit

How to set PYTHONPATH? Thank you~

sam gravatar image sam  ( 2012-07-16 01:45:30 -0500 )edit

export PYTHONPATH=...

prince gravatar image prince  ( 2012-07-17 05:50:07 -0500 )edit

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~

sam gravatar image sam  ( 2012-07-22 21:18:59 -0500 )edit

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

prince gravatar image prince  ( 2012-07-22 21:29:46 -0500 )edit

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

sam gravatar image sam  ( 2012-07-22 23:04:23 -0500 )edit