下载了最新的系统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