0
$\begingroup$

Rosanswers logo

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/Ish_odom_out_and_back.py", line 9, in 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/move.py. 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/transform_utils.py. Here, rbx1_nav is the package. The file That I want to import is transform_utils.py

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

Can anybody please help me.

Thanks.


Originally posted by ish45 on ROS Answers with karma: 151 on 2014-09-12

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

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


Originally posted by joq with karma: 25443 on 2014-09-12

This answer was ACCEPTED on the original site

Post score: 1


Original comments

Comment by ish45 on 2014-09-12:
So, Do I need to create the workspaces again?. Is there any other solution ??

Comment by joq on 2014-09-12:
You can delete the build/ and devel/ subtrees, source the other workspace, and rerun catkin_make.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.