Ask Your Question

roslib - Phyton

asked 2012-08-06 03:19:54 -0500

Janina gravatar image

updated 2012-08-06 03:20:57 -0500


I create a Phyton project within the ar_pose package. I tried to import roslib to my Phyton program with

import roslib; roslib.load_manifest('ar_pose')

,but get the answer that he could not found the module roslib.

Is roslib a own package which I have to download?


(ROS electric)

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted

answered 2012-08-06 03:34:34 -0500

Lorenz gravatar image

Your PYTHON_PATH needs to be set up correctly. Did you source setup.bash?

edit flag offensive delete link more

answered 2012-08-11 00:04:18 -0500

raymachira gravatar image

I have the same exact problem. I sourced setup.bash and my PYTHON_PATH is set to ${ROS_ROOT}/core/roslib/src:${PYTHONPATH}

Basically here is my whole file

export ROS_ROOT=/opt/ros/electric/ros
export PATH=${ROS_ROOT}/bin:${PATH}
export PYTHONPATH=${ROS_ROOT}/core/roslib/src:${PYTHONPATH}
export ROS_PACKAGE_PATH=/opt/ros/electric/stacks
if [ ! "$ROS_MASTER_URI" ] ; then export ROS_MASTER_URI=http://localhost:11311 ; fi

I am trying to run a python file through a package I have made. Any help is appreciated. I'm sorry of my formatting is out of order- I am new to the forum.

edit flag offensive delete link more


It would be better to create a new question for that. Answers should only be used for really answering a question but not for discussion. When you create a new question, please also copy-paste the python backtrace you are getting.

Lorenz gravatar image Lorenz  ( 2012-08-11 05:01:26 -0500 )edit

Btw. don't create your own but either source /opt/ros/electric/setup.bash and extend ROS_PACKAGE_PATH if needed or use rosws. rosws is the recommended way though. See here:

Lorenz gravatar image Lorenz  ( 2012-08-11 05:02:56 -0500 )edit

Am really sorry for that. I have posted a new question, here -->

raymachira gravatar image raymachira  ( 2012-08-13 00:40:57 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools


Asked: 2012-08-06 03:19:54 -0500

Seen: 482 times

Last updated: Aug 11 '12