在Raspberry pi上构建SVO包

时间:2015-03-18 14:58:04

标签: raspberry-pi

我根据本指南https://github.com/uzh-rpg/rpg_svo/wiki/Run-SVO-without-ROS在raspberry pi上构建了svo包。

除了最后一个包之外的所有东西都成功地建立起来了。在构建最后一个包时,我遇到了下一个错误:

/home/pi/workspace/rpg_svo/svo/src/map.cpp: In member function ‘svo::FramePtr svo::Map::getClosestKeyframe(const FramePtr&) const’:
/home/pi/workspace/rpg_svo/svo/src/map.cpp:135:12: error: could not convert ‘nullptr’ from ‘std::nullptr_t’ to ‘svo::FramePtr {aka boost::shared_ptr<svo::Frame>}’
CMakeFiles/svo.dir/build.make:146: recipe for target 'CMakeFiles/svo.dir/src/map.cpp.o' failed
make[2]: *** [CMakeFiles/svo.dir/src/map.cpp.o] Error 1
CMakeFiles/Makefile2:60: recipe for target 'CMakeFiles/svo.dir/all' failed
make[1]: *** [CMakeFiles/svo.dir/all] Error 2
Makefile:72: recipe for target 'all' failed

我建立了除SVO包之外的所有东西:

export ARM_ARCHITECTURE=True

更改了编译器标志:我删除了-march=native。我也尝试添加这些标志:

-march=armv6 -mfloat-abi=hard -mfpu=vfp

但它什么都没改变。

完整建筑日志:

Scanning dependencies of target svo
[  4%] Building CXX object CMakeFiles/svo.dir/src/frame_handler_mono.cpp.o
/tmp/ccqAImPE.s: Assembler messages:
/tmp/ccqAImPE.s:1875: Warning: swp{b} use is deprecated for ARMv6 and ARMv7
/tmp/ccqAImPE.s:1885: Warning: swp{b} use is deprecated for ARMv6 and ARMv7
/tmp/ccqAImPE.s:1902: Warning: swp{b} use is deprecated for ARMv6 and ARMv7
/tmp/ccqAImPE.s:2077: Warning: swp{b} use is deprecated for ARMv6 and ARMv7
/tmp/ccqAImPE.s:2087: Warning: swp{b} use is deprecated for ARMv6 and ARMv7
/tmp/ccqAImPE.s:2104: Warning: swp{b} use is deprecated for ARMv6 and ARMv7
/tmp/ccqAImPE.s:2161: Warning: swp{b} use is deprecated for ARMv6 and ARMv7
/tmp/ccqAImPE.s:2171: Warning: swp{b} use is deprecated for ARMv6 and ARMv7
/tmp/ccqAImPE.s:2188: Warning: swp{b} use is deprecated for ARMv6 and ARMv7
[  9%] Building CXX object CMakeFiles/svo.dir/src/frame_handler_base.cpp.o
/tmp/cclVVat6.s: Assembler messages:
/tmp/cclVVat6.s:3429: Warning: swp{b} use is deprecated for ARMv6 and ARMv7
/tmp/cclVVat6.s:3439: Warning: swp{b} use is deprecated for ARMv6 and ARMv7
/tmp/cclVVat6.s:3456: Warning: swp{b} use is deprecated for ARMv6 and ARMv7
/tmp/cclVVat6.s:3513: Warning: swp{b} use is deprecated for ARMv6 and ARMv7
/tmp/cclVVat6.s:3523: Warning: swp{b} use is deprecated for ARMv6 and ARMv7
/tmp/cclVVat6.s:3540: Warning: swp{b} use is deprecated for ARMv6 and ARMv7
/tmp/cclVVat6.s:4324: Warning: swp{b} use is deprecated for ARMv6 and ARMv7
/tmp/cclVVat6.s:4333: Warning: swp{b} use is deprecated for ARMv6 and ARMv7
/tmp/cclVVat6.s:4350: Warning: swp{b} use is deprecated for ARMv6 and ARMv7
/tmp/cclVVat6.s:4684: Warning: swp{b} use is deprecated for ARMv6 and ARMv7
/tmp/cclVVat6.s:4693: Warning: swp{b} use is deprecated for ARMv6 and ARMv7
/tmp/cclVVat6.s:4710: Warning: swp{b} use is deprecated for ARMv6 and ARMv7
[ 14%] Building CXX object CMakeFiles/svo.dir/src/frame.cpp.o
[ 19%] Building CXX object CMakeFiles/svo.dir/src/point.cpp.o
[ 23%] Building CXX object CMakeFiles/svo.dir/src/map.cpp.o
/home/pi/workspace/rpg_svo/svo/src/map.cpp: In member function ‘svo::FramePtr svo::Map::getClosestKeyframe(const FramePtr&) const’:
/home/pi/workspace/rpg_svo/svo/src/map.cpp:135:12: error: could not convert ‘nullptr’ from ‘std::nullptr_t’ to ‘svo::FramePtr {aka boost::shared_ptr<svo::Frame>}’
CMakeFiles/svo.dir/build.make:146: recipe for target 'CMakeFiles/svo.dir/src/map.cpp.o' failed
make[2]: *** [CMakeFiles/svo.dir/src/map.cpp.o] Error 1
CMakeFiles/Makefile2:60: recipe for target 'CMakeFiles/svo.dir/all' failed
make[1]: *** [CMakeFiles/svo.dir/all] Error 2
Makefile:72: recipe for target 'all' failed
make: *** [all] Error 2

1 个答案:

答案 0 :(得分:0)

错误:无法将'nullptr'从'std :: nullptr_t'转换为'svo :: FramePtr {aka boost :: shared_ptr}

嗨!我遇到了和你一样的问题。我通过定义一个类型为FramePtr的新变量来解决这个问题。即。添加&#34; FramePtr m;&#34;之前&#34;返回nullptr;&#34;在map.cpp中;然后更改&#34;返回nullptr&#34; ---&gt;&#34;返回m;&#34;