1.準(zhǔn)備一個樹莓派硬件
2.裝好系統(tǒng)
3下面是官方的安裝指導(dǎo) 按著往下敲就行? 網(wǎng)址:http://wiki.ros.org/kinetic/Installation/Source
? ? 3.1.sudo apt-get install python-rosdep python-rosinstall-generator python-wstool python-rosinstall build-essential
????3.2.sudo rosdep init
????3.3. rosdep update
? ? 3.4.mkdir ~/ros_catkin_ws
? ? 3.5.cd ~/ros_catkin_ws
????3.6.rosinstall_generator desktop_full --rosdistro kinetic --deps --wet-only --tar > kinetic-desktop-full-wet.rosinstall
? ? 3.7.wstool init -j8 src kinetic-desktop-full-wet.rosinstall 出現(xiàn)失敗wstool update -j 4 -t src
? ? 3.8.rosdep install --from-paths src --ignore-src --rosdistro kinetic -y
????3.9.source ~/ros_catkin_ws/install_isolated/setup.bash? 這玩意最好寫到.bashrc里去
4.針對3.8過程中的失敗痪宰,一些解決方案
? ? 4.1?
[100%] Building CXX object modules/python2/CMakeFiles/opencv_python2.dir/__/src2/cv2.cpp.o
[100%] Building CXX object modules/python3/CMakeFiles/opencv_python3.dir/__/src2/cv2.cpp.o
c++: internal compiler error: 已殺死 (program cc1plus)
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-6/README.Bugs> for instructions.
modules/python2/CMakeFiles/opencv_python2.dir/build.make:62: recipe for target 'modules/python2/CMakeFiles/opencv_python2.dir/__/src2/cv2.cpp.o' failed
make[2]: *** [modules/python2/CMakeFiles/opencv_python2.dir/__/src2/cv2.cpp.o] Error 4
CMakeFiles/Makefile2:8368: recipe for target 'modules/python2/CMakeFiles/opencv_python2.dir/all' failed
make[1]: *** [modules/python2/CMakeFiles/opencv_python2.dir/all] Error 2
make[1]: *** 正在等待未完成的任務(wù)....
[100%] Linking CXX shared module ../../lib/python3/cv2.cpython-35m-arm-linux-gnueabihf.so
[100%] Built target opencv_python3
Makefile:160: recipe for target 'all' failed
make: *** [all] Error 2
<== Failed to process package 'opencv3':
? Command '['/home/pi/ros_catkin_ws/install_isolated/env.sh', 'make', '-j4', '-l4']' returned non-zero exit status 2
Reproduce this error by running:
==> cd /home/pi/ros_catkin_ws/build_isolated/opencv3 && /home/pi/ros_catkin_ws/install_isolated/env.sh make -j4 -l4
Command failed, exiting.
想都不用想粥航,重新編洞翩,內(nèi)存不足了,要不就是編譯之前擴(kuò)下swap焙矛,怎么擴(kuò)百度下
4.2
In file included from /home/pi/ros_catkin_ws/src/stage/libstage/color.cc:1:0:
/home/pi/ros_catkin_ws/src/stage/libstage/stage.hh: In member function ‘virtual void Stg::Ancestor::SetToken(const string&)’:
/home/pi/ros_catkin_ws/src/stage/libstage/stage.hh:625:62: error: unable to find string literal operator ‘operator""m’ with ‘const char [24]’, ‘unsigned int’ arguments
#define PRINT_ERR(m) fprintf( stderr, "\033[41merr\033[0m: "m" (%s %s)\n", __FILE__, __FUNCTION__)
這個進(jìn)入到文件里,再把 "m" 改成 " m "
4.3?
/home/pi/ros_catkin_ws/src/stage/libstage/world.cc: In member function ‘Stg::RaytraceResult Stg::World::Raytrace(const Stg::Ray&)’:
/home/pi/ros_catkin_ws/src/stage/libstage/world.cc:806:26: error: call of overloaded ‘a(chǎn)bs(const double&)’ is ambiguous
? const int32_t ax(abs(dx));
我改成了fabs 加了個cmath頭文件
4.4 受不了內(nèi)存不足的情況,擼swap 附上鏈接? ?http://shumeipai.nxez.com/2017/12/18/how-to-modify-raspberry-pi-swap-partition.html