手机版 欢迎访问it开发者社区(www.mfbz.cn)网站

当前位置: > 开发

DynaSLAM配置安装问题

时间:2021/6/9 9:07:28|来源:|点击: 次

按照网上DynaSLAM的Readme文档步骤进行配置,在编译DynaSLAM工程的时候报以下错误:

 

In file included from /home/hust220/catkin_ws/DynaSLAM/src/Conversion.cc:9:0:
/home/hust220/catkin_ws/DynaSLAM/include/Conversion.h:17:27: fatal error: ndarrayobject.h: No such file or directory
compilation terminated.
CMakeFiles/DynaSLAM.dir/build.make:518: recipe for target 'CMakeFiles/DynaSLAM.dir/src/Conversion.cc.o' failed
make[2]: *** [CMakeFiles/DynaSLAM.dir/src/Conversion.cc.o] Error 1
make[2]: *** Waiting for unfinished jobs....
In file included from /home/hust220/catkin_ws/DynaSLAM/include/MaskNet.h:26:0,
                 from /home/hust220/catkin_ws/DynaSLAM/src/MaskNet.cc:9:
/home/hust220/catkin_ws/DynaSLAM/include/Conversion.h:17:27: fatal error: ndarrayobject.h: No such file or directory
compilation terminated.
CMakeFiles/DynaSLAM.dir/build.make:542: recipe for target 'CMakeFiles/DynaSLAM.dir/src/MaskNet.cc.o' failed
make[2]: *** [CMakeFiles/DynaSLAM.dir/src/MaskNet.cc.o] Error 1

通过cmake发现cmakelist找到的python库为python3.5

PROJECT_SOURCE_DIR: 
-- Found PythonLibs: /usr/lib/x86_64-linux-gnu/libpython3.5m.so (found version "3.5.2") 
PYTHON LIBS were found!
PYTHON LIBS DIRECTORY: /usr/lib/x86_64-linux-gnu/libpython3.5m.so

编译时声明python路径

cmake -DPYTHON_INCLUDE_DIR=/usr/include/python2.7 -DPYTHON_LIBRARY=/usr/lib  ..

并在include_directories里面添加numpy的安装路径

include_directories(
${PROJECT_SOURCE_DIR}
${PROJECT_SOURCE_DIR}/include
${EIGEN3_INCLUDE_DIR}
${Pangolin_INCLUDE_DIRS}
/usr/include/python2.7/
/usr/lib/python2.7/dist-packages/numpy/core/include/numpy/
/usr/local/lib/python2.7/dist-packages/numpy/core/include/numpy/
${Boost_INCLUDE_DIRS}
)

编译成功

 

上一篇:2021-06-09 下一篇:1.1 yaml配置文件使用

Copyright © 2002-2019 某某自媒体运营 版权所有