2

I am stuck on what seems to be an easy task and yet seems unsolvable. I am trying to build a ROS package on raspberry pi with indigo distro. I am able to build the package on ubuntu, somehow managed to build it on edison-ubilinux but I am having no luck with RPi. Here the error message:

pi@raspberrypi ~/ros_catkin_ws/external_src/rplidar_ros $ sudo cmake /home/pi/ros_catkin_ws/external_src/rplidar_ros/ -DCATKIN_DEVEL_PREFIX=/home/pi/ros_catkin_ws/devel_isolated/rplidar_ros -DCMAKE_INSTALL_PREFIX=/opt/ros/indigo -DCMAKE_BUILD_TYPE=Release
-- Using CATKIN_DEVEL_PREFIX: /home/pi/ros_catkin_ws/devel_isolated/rplidar_ros
-- Using CMAKE_PREFIX_PATH: 
-- Using PYTHON_EXECUTABLE: /usr/bin/python
-- Using Debian Python package layout
-- Using empy: /usr/bin/empy
-- Using CATKIN_ENABLE_TESTING: ON
-- Call enable_testing()
-- Using CATKIN_TEST_RESULTS_DIR: /home/pi/ros_catkin_ws/external_src/rplidar_ros/test_results
-- Found gtest sources under '/usr/src/gtest': gtests will be built
-- Using Python nosetests: /usr/bin/nosetests-2.7
-- catkin 0.6.11
Traceback (most recent call last):
  File "/home/pi/ros_catkin_ws/external_src/rplidar_ros/catkin_generated/generate_cached_setup.py", line 19, in <module>
    from catkin.environment_cache import generate_environment_script
ImportError: No module named catkin.environment_cache
CMake Error at /opt/ros/indigo/share/catkin/cmake/safe_execute_process.cmake:11 (message):
  execute_process(/usr/bin/python
  "/home/pi/ros_catkin_ws/external_src/rplidar_ros/catkin_generated/generate_cached_setup.py")
  returned error code 1
Call Stack (most recent call first):
  /opt/ros/indigo/share/catkin/cmake/all.cmake:185 (safe_execute_process)
  /opt/ros/indigo/share/catkin/cmake/catkinConfig.cmake:20 (include)
  CMakeLists.txt:12 (find_package)


-- Configuring incomplete, errors occurred!

python path looks also good:

pi@raspberrypi ~/ros_catkin_ws/src $ echo $PYTHONPATH 
/opt/ros/indigo/lib/python2.7/dist-packages

And I added a blank init.py to the folder, while catkin already had one. Also I try to import catkin with python IDE but no luck again even though a append the path to my library at the beginning of the file thaqt does not compile with no luck again.

sys.path.append('/opt/ros/indigo/lib/python2.7/dist-packages')

and my sys.path is different from my PYTHONPATH

>>> sys.path
['', '/home/pi', '/usr/bin', '/usr/lib/python2.7', '/usr/lib/python2.7/plat-linux2', '/usr/lib/python2.7/lib-tk', '/usr/lib/python2.7/lib-old', '/usr/lib/python2.7/lib-dynload', '/usr/local/lib/python2.7/dist-packages', '/usr/lib/python2.7/dist-packages', '/usr/lib/python2.7/dist-packages/PIL', '/usr/lib/pymodules/python2.7']

plus it does not work even in python IDE. Please help!!!!

thank you

0andriy
  • 4,183
  • 1
  • 24
  • 37

0 Answers0