DynaSLAM配置安装问题

按照网上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}
)

编译成功

 

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值