标签:repos pip dev pat workspace build 源代码 raspbian pre
官方安装教程地址:
http://wiki.ros.org/ROS/Installation
中文安装教程
http://lib.csdn.net/article/embeddeddevelopment/30200
树莓派操作系统为Raspbian,安装的ROS版本为indigo
首先在源中添加ROS Repositories,并更新源及系统
$ sudo sh -c ‘echo "deb http://packages.ros.org/ros/ubuntu wheezy 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 apt-get install python-setuptools python-pip python-yaml python-argparse python-distribute python-docutils python-dateutil python-setuptools python-six $ sudo pip install rosdep rosinstall_generator wstool rosinstall
配置rosdep
$ sudo rosdep init
$ rosdep update
Fetch源代码
新建一个catkin workspace用来编译安装文件
$ mkdir ~/ros_catkin_ws
$ cd ~/ros_catkin_ws
将源代码fetch到该目录。ROS-Comm时其仅包含一些基础的软件,没有图形化工具;Destop有完整的ROS功能,适合所有机器人应用。我选择安装这个。
rosinstall_generator desktop --rosdistro indigo --deps --wet-only --exclude roslisp --tar > indigo-desktop-wet.rosinstall
wstool init -j8 src indigo-desktop-wet.rosinstall
若中途下载中断,以下命令会接着下载
wstool update -j 4 -t src
安装Raspbian仓库中没有的一些包
$ mkdir ~/ros_catkin_ws/external_src $ sudo apt-get install checkinstall cmake $ sudo sh -c ‘echo "deb-src http://mirrordirector.raspbian.org/raspbian/ testing main contrib non-free rpi" >> /etc/apt/sources.list‘ $ sudo apt-get update
安装libconsole-bridge-dev:
$ cd ~/ros_catkin_ws/external_src $ sudo apt-get build-dep console-bridge $ apt-get source -b console-bridge $ sudo dpkg -i libconsole-bridge0.2_*.deb libconsole-bridge-dev_*.deb
安装liblz4-dev,花费时间较长,请耐心等待:
$ cd ~/ros_catkin_ws/external_src $ apt-get source -b lz4 $ sudo dpkg -i liblz4-*.deb
使用rosdep解决其他依赖问题:
$ cd ~/ros_catkin_ws $ rosdep install --from-paths src --ignore-src --rosdistro indigo -y -r --os=debian:wheezy
编译:
$ sudo ./src/catkin/bin/catkin_make_isolated --install -DCMAKE_BUILD_TYPE=Release --install-space /opt/ros/indigo
编译完成后,indigo就安装好了,安装位置在/opt/ros/indigo。然后对源处理一下:
$ source /opt/ros/indigo/setup.bash
尝试运行一下resource命令,若运行正常,则ROS indigo就安装成功!
标签:repos pip dev pat workspace build 源代码 raspbian pre
原文地址:http://www.cnblogs.com/2Bthebest1/p/7259849.html