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

Why ROS generates core packages with same name in both lib and lib64?

asked 2016-10-10 18:31:19 -0500

naikin gravatar image

I installed ROS from source on Slackware Linux. However for most of the packages it generated python modules with the same name in both ~/ros_catkin_ws/install_isolated/lib/python2.7/site-packages and ~/ros_catkin_ws/install_isolated/lib64/python2.7/site-packages. This is a problem because this creates name clashes and causes import errors. For example, currently these are some of the actionlib modules:

~/ros_catkin_ws/install_isolated/lib64/python2.7/site-packages/actionlib/__init__.py ~/ros_catkin_ws/install_isolated/lib64/python2.7/site-packages/actionlib/exceptions.py ~/ros_catkin_ws/install_isolated/lib/python2.7/site-packages/actionlib/msg/__init__.py

My $PYTHONPATH includes both

~/ros_catkin_ws/install_isolated/lib64/python2.7/site-packages ~/ros_catkin_ws/install_isolated/lib/python2.7/site-packages

However, because of the name clash of the actionlib module, python only finds the module under the lib64 directory and the one under lib is ignored. Thus import actionlib.execptions works ok, but import actionlib.msg fails. When I paste the msg directory in the same directory as exceptions.py, everything works fine.

There are other modules which have the same problem. Why does ROS split the modules in such a way and how can I fix this? To my knowledge, python does not work like that and it does not expect the same module to be in both lib and lib64. For comparison, building from source on Ubuntu Xenial on a 64-bit VM placed everything under lib.

edit retag flag offensive close merge delete

Comments

1

Why does ROS split the modules in such a way [..]?

I'm pretty sure this is unintended, and not part of the "ROS way" of doing things. Perhaps @Dirk Thomas can provide some insight / suggest where to report this?

gvdhoorn gravatar image gvdhoorn  ( 2016-10-11 04:16:43 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
2

answered 2016-10-12 12:53:17 -0500

tfoote gravatar image

This does look like incorrect behavior. The python files are supposed to interleave into the same module. It's been ticketed at: https://github.com/ros-infrastructure...

edit flag offensive delete link more

Question Tools

Stats

Asked: 2016-10-10 18:31:19 -0500

Seen: 133 times

Last updated: Oct 12 '16