安装roboRTS时一定要把文档里提到的各种库都装上,不要嫌麻烦,不然后面不知道怎么死的
- 遇到module无法找到,直接去google,一般为pip install 或者sudo apt-get install 即可解决
我遇到的特殊情况:no module named em 解决方式
pip uninstall em
pip install empy
- anaconda 与 ros 冲突,比如opencv
angel@yubao-Z370M-S01:~/GitProject/ORB_SLAM2/Examples/ROS/ORB_SLAM2/build$ make
Scanning dependencies of target rospack_genmsg_libexe
[ 0%] Built target rospack_genmsg_libexe
Scanning dependencies of target rosbuild_precompile
[ 0%] Built target rosbuild_precompile
Scanning dependencies of target RGBD
[ 11%] Building CXX object CMakeFiles/RGBD.dir/src/ros_rgbd.cc.o
[ 22%] Linking CXX executable ../RGBD
/opt/ros/kinetic/lib/x86_64-linux-gnu/libopencv_imgcodecs3.so.3.3.1: undefined reference to \`TIFFReadRGBAStrip@LIBTIFF_4.0\'
/opt/ros/kinetic/lib/x86_64-linux-gnu/libopencv_imgcodecs3.so.3.3.1: undefined reference to \`TIFFReadDirectory@LIBTIFF_4.0\'
/opt/ros/kinetic/lib/x86_64-linux-gnu/libopencv_imgcodecs3.so.3.3.1: undefined reference to \`TIFFWriteEncodedStrip@LIBTIFF_4.0\'
....
/opt/ros/kinetic/lib/x86_64-linux-gnu/libopencv_imgcodecs3.so.3.3.1: undefined reference to \`TIFFSetWarningHandler@LIBTIFF_4.0\'
/opt/ros/kinetic/lib/x86_64-linux-gnu/libopencv_imgcodecs3.so.3.3.1: undefined reference to \`TIFFSetErrorHandler@LIBTIFF_4.0\'
collect2: error: ld returned 1 exit status
CMakeFiles/RGBD.dir/build.make:216: recipe for target '../RGBD' failed
make[2]: *** [../RGBD] Error 1
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/RGBD.dir/all' failed
make[1]: *** [CMakeFiles/RGBD.dir/all] Error 2
Makefile:127: recipe for target 'all' failed
make: *** [all] Error 2
ros自带的opencv与anaconda 中的opencv冲突
解决方法
-
conda uninstall opencv3
conda uninstall, libtiff
- 将该terminal 中的path除去 anaconda3/bin 具体方法为export PATH=... (echo $PATH 输出中的除去anaconda)
这句export 的意思是在该terminal 中暂时修改PATH变量,关掉该terminal即失效,要想永久修改path变量,
sudo vim ~/.bashrc
,将该文件中了关于anaconda 的那句 export PATH 注释掉,然后source ~/.bashrc
立即生效