Ask Your Question
0

Issues with LZ4

asked 2015-07-14 16:40:31 -0500

allenh1 gravatar image

updated 2015-08-03 12:59:24 -0500

As some of you know, I've been working on the Gentoo install for ROS. I am very close! I have GMapping and RVIZ working, but there are a few issues left to resolve. First on the list is the LZ4 module. For example, I obtain the following when I run rostopic list.

allenh1@tuxbox ~ $ rostopic list
Traceback (most recent call last):
  File "/opt/ros/jade/bin/rostopic", line 35, in <module>
    rostopic.rostopicmain()
  File "/opt/ros/jade/lib64/python2.7/site-packages/rostopic/__init__.py", line 1753, in rostopicmain
    import rosbag
  File "/opt/ros/jade/lib64/python2.7/site-packages/rosbag/__init__.py", line 33, in <module>
    from .bag import Bag, Compression, ROSBagException, ROSBagFormatException, ROSBagUnindexedException
  File "/opt/ros/jade/lib64/python2.7/site-packages/rosbag/bag.py", line 65, in <module>
    import roslz4
  File "/opt/ros/jade/lib64/python2.7/site-packages/roslz4/__init__.py", line 33, in <module>
    from ._roslz4 import *
ImportError: No module named _roslz4

Or, if I run rosbag.

allenh1@tuxbox ~ $ rosbag
Traceback (most recent call last):
  File "/opt/ros/jade/bin/rosbag", line 34, in <module>
    import rosbag
  File "/opt/ros/jade/lib64/python2.7/site-packages/rosbag/__init__.py", line 33, in <module>
    from .bag import Bag, Compression, ROSBagException, ROSBagFormatException, ROSBagUnindexedException
  File "/opt/ros/jade/lib64/python2.7/site-packages/rosbag/bag.py", line 65, in <module>
    import roslz4
  File "/opt/ros/jade/lib64/python2.7/site-packages/roslz4/__init__.py", line 33, in <module>
    from ._roslz4 import *
ImportError: No module named _roslz4

Naturally, I am hesitant to call such an issue a bug, as I am running on an unsupported OS. So I did some investigating.

allenh1@tuxbox /opt/ros/jade/lib64/python2.7/site-packages $ ls | grep lz4
roslz4
roslz4-1.11.13-py2.7.egg-info
allenh1@tuxbox /opt/ros/jade/lib $ ls |grep lz4
libroslz4.so

Not sure why there is trouble here...

Thanks!


It appears that you have found the problem... So we're at least half way there. :)

allenh1@tuxbox /opt/ros/jade/lib64/python2.7 $ ls
site-packages
allenh1@tuxbox /opt/ros/jade/lib/python2.7 $ ls
site-packages

So the directory you mentioned, dist-packages is not being copied correctly.


So I have been messing with this and I am still stuck. After moving the file that was generated (by fussing with CMakeLists.txt) I was able to place it in the correct directory. The change in the CMakeLists.txt is by no means a patch; just an experiment. Python has consistently been the problem in this process... Anyway, This is where I am:

allenh1@tuxbox /opt/ros/jade/lib/python2.7/dist-packages/roslz4 $ ls
_roslz4.so

So it should be working... Yet, when I run a rostopic list (after opening a new terminal) we get:

allenh1@tuxbox ~ $ rostopic list
Traceback (most recent call last):
  File "/opt/ros/jade/bin/rostopic", line 35, in <module>
    rostopic.rostopicmain()
  File "/opt/ros/jade/lib64/python2.7/site-packages/rostopic/__init__.py", line 1753, in rostopicmain
    import rosbag
  File "/opt/ros/jade/lib64/python2.7/site-packages/rosbag/__init__.py", line 33, in <module>
    from ...
(more)
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2015-07-14 18:28:15 -0500

ahendrix gravatar image

There are two shared libraries that should be compiled from roslz4: /opt/ros/ingido/lib/libroslz4.so, which is the shared library that implements the C/C++ bindings, and then /opt/ros/indigo/lib/python2.7/dist-packages/roslz4/_roslz4.so, which is the compiled python module which connects python to the compiled library.

You should check the build process for roslz4, and make sure that it's procuding a _roslz4.so binary and installing it to /opt/ros/indigo/lib/python2.7/dist-packages/roslz4/_roslz4.so

edit flag offensive delete link more

Your Answer

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

Add Answer

Question Tools

1 follower

Stats

Asked: 2015-07-14 16:40:31 -0500

Seen: 2,761 times

Last updated: Aug 03 '15