下载了最新的系统raspberry stretch,终于等到了64位系统stretch
Mirror
首先更换系统镜像地址镜像列表
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镜像地址:
$ 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 -
更新内容
$ 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有问题。
原因是没有装它。
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
**粗体** _斜体_ [链接](http://example.com) `代码` - 列表 > 引用
。你还可以使用@
来通知其他用户。