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

I am getting error when trying to import a python file from another Catkin Workspace.

asked 2014-09-12 02:59:23 -0600

ish45 gravatar image

updated 2014-09-12 03:00:34 -0600

Hi, All. I have a catkin workspace in eclipse and I am writing a Node. But, I need to import a python file from another catkin workspace which contains this file. But, when I try to import it, there is an error that there is no module named like that.

The exact error is like this -

File "src/", line 9, in <module> from rbx1_nav.transform_utils import quat_to_angle, normalize_angle ImportError: No module named rbx1_nav.transform_utils

For example,

My Catkin Workspace is like this - catkin_ws_ishan/src/ishan/ishan_nav/src/ ishan_nav is the package name in my workspace.

The file that I want to import is in - catkin_ws/src/rbx1/rbx1_nav/src/rbx1_nav/ Here, rbx1_nav is the package. The file That I want to import is

So, How do I import from my program in Eclipse which is in another catkin workspace????

Can anybody please help me.


edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2014-09-12 05:54:18 -0600

joq gravatar image

You needed to source catkin_ws before you created catkin_ws_ishan, then source the dependent one.

edit flag offensive delete link more


So, Do I need to create the workspaces again?. Is there any other solution ??

ish45 gravatar image ish45  ( 2014-09-12 11:54:14 -0600 )edit

You can delete the build/ and devel/ subtrees, source the other workspace, and rerun catkin_make.

joq gravatar image joq  ( 2014-09-12 14:23:23 -0600 )edit

Question Tools

1 follower


Asked: 2014-09-12 02:59:23 -0600

Seen: 646 times

Last updated: Sep 12 '14