下載了最新的系統raspberry stretch,終於等到了64位系統stretchjava
首先更換系統鏡像地址鏡像列表git
deb http://mirrors.aliyun.com/raspbian/raspbian stretch main contrib non-free rpi deb-src http://mirrors.aliyun.com/raspbian/raspbian stretch main contrib non-free rpi
添加ros鏡像地址:github
$ sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu stretch main" > /etc/apt/sources.list.d/ros-latest.list' $ wget https://raw.githubusercontent.com/ros/rosdistro/master/ros.key -O - | sudo apt-key add -
更新內容ubuntu
$ sudo apt-get update $ sudo apt-get upgrade $ sudo rosdep init $ rosdep update
$ mkdir ~/ros_catkin_ws $ cd ~/ros_catkin_ws $ rosinstall_generator ros_comm rosserial rosjava --rosdistro kinetic --deps --wet-only --tar > kinetic-ros_comm-wet.rosinstall $ wstool init src kinetic-ros_comm-wet.rosinstall
rosinstall_generator :會生成所指定的包的依賴。這裏須要ros_comm rosserial rosjava
wstool:會依據上面生成的依賴去下載到指定目錄。多線程
rosdep install --from-paths src --ignore-src --rosdistro kinetic -y --os=debian:jessie ./src/catkin/bin/catkin_make_isolated --install -DCMAKE_BUILD_TYPE=Release --install-space /opt/ros/kinetic -j2
rosdep install
:安裝依賴軟件,因爲系統版本過新沒法解決依賴包。 --os=debian:jessie
修改系統版本./src/catkin/bin/catkin_make_isolated
:編譯並安裝到指定目錄。注意因爲性能問題,當多線程編譯時會耗盡內存,所以只能開2個線程。性能
本覺得能夠一帆風順,沒想到中間出了個錯。提示說console_bridge有問題。
緣由是沒有裝它。spa
git clone https://github.com/ros/console_bridge.git cd console_bridge cmake -DCMAKE_INSTALL_PREFIX=/usr . sudo make install
還有lz4線程
sudo apt install liblz4-dev