我被困在看似简单但似乎无法解决的事情上。我正在尝试使用 indigo 发行版在树莓派上构建 ROS 包。我能够在 ubuntu 上构建包,以某种方式设法在 edison-ubilinux 上构建它,但我对 RPi 没有运气。这里的错误信息:
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路径看起来也不错:
pi@raspberrypi ~/ros_catkin_ws/src $ echo $PYTHONPATH
/opt/ros/indigo/lib/python2.7/dist-packages
我在文件夹中添加了一个空白的init .py,而 catkin 已经有了一个。此外,我尝试使用 python IDE 导入 catkin,但即使在文件 thaqt 的开头附加到我的库的路径也不会再次编译,但再次没有运气。
sys.path.append('/opt/ros/indigo/lib/python2.7/dist-packages')
我的 sys.path 与我的 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']
再加上它甚至在 python IDE 中也不起作用。请帮忙!!!!
谢谢你