安装anaconda后ROS编译问题

安装anaconda之后,原来ros包编译出错:

报错(1)

Traceback (most recent call last):
  File "/opt/ros/kinetic/bin/catkin_make", line 13, in 
    from catkin.terminal_color import disable_ANSI_colors, fmt
  File "/opt/ros/kinetic/lib/python2.7/dist-packages/catkin/terminal_color.py", line 2, in 
    from catkin_pkg.terminal_color import *  # noqa
ImportError: No module named 'catkin_pkg'

参考文档:https://blog.csdn.net/wuguangbin1230/article/details/77803017
https://blog.csdn.net/qq_33521754/article/details/78829212
解决方法:
$ conda install setuptools
$ pip install -U rosdep rosinstall_generator wstool rosinstall six vcstools

可以在Anaconda中导入ROS包中相应的包,若此过程出现警告,按照提示进行处理即可

报错(2)

home/username/anaconda3/lib/libpng16.so.16:对‘inflateValidate@ZLIB_1.2.9’未定义的引用

(百度之后发现都是针对caffee的解决方法,Makefile.config中加入LINKFLAGS := -Wl,-rpath,$(HOME)/anaconda3/lib,但是事实上我根本找不到Makefile.config,终于在ROS论坛上找到了解决方法)

链接:https://answers.ros.org/question/285835/undefined-reference-to-inflatevalidatezlib_129-when-making-navigation-stack/

1.首先确认在~/.bashrc内有export PATH="/home/markus/anaconda3/bin:$PATH"

2.$ conda remove libpng

3.$ sudo apt-get install libpng16-16

报错(3)

ModuleNotFoundError: No module named 'em'

解决方法:
$ python -m pip install empy

你可能感兴趣的:(ROS)