• ROS安装与卸载教程


    一 ros安装

    1.0 设备环境:Ubuntu 14.04 ros indigo

    1.1 配置Ubuntu仓库变为允许"restricted," "universe," and "multiverse

    1.2 

    sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'

    这里需要注意的问题是,有些时候由于防火墙原因,有些时候需要点击Mirrors换一个指令,否则可能安装不了哦

    1.3

    sudo apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net --recv-key 421C365BD9FF1F717815A3895523BAEEB01FA116
    sudo apt-get update
    sudo apt-get install ros-indigo-desktop-full

    sudo rosdep init
    rosdep update
    echo "source /opt/ros/indigo/setup.bash" >> ~/.bashrc
    source ~/.bashrc

    1.4 这时会看到ROS的环境变量

    $ printenv |grep ROS
    
    ROS_ROOT=/opt/ros/indigo/share/ros
    ROS_PACKAGE_PATH=/opt/ros/indigo/share:/opt/ros/indigo/stacks
    ROS_MASTER_URI=http://localhost:11311
    ROSLISP_PACKAGE_DIRECTORIES=
    ROS_DISTRO=indigo
    ROS_ETC_DIR=/opt/ros/indigo/etc/ros

    二 ros卸载

    sudo apt-get purge ros-*
    sudo rm -rf /etc/ros
    删除.bashrc中的source /opt/ros/indigo/setup.bash
    如果有自己建立的catkin_ws,也删除

    三 ros源码安装

    卸载之后,我们可以源码安装

    sudo apt-get install python-rosdep python-rosinstall-generator python-wstool python-rosinstall build-essential
    sudo rosdep init
    rosdep update
    mkdir ~/ros_catkin_ws
    cd ~/ros_catkin_ws
    rosinstall_generator desktop_full --rosdistro indigo --deps --wet-only --tar > indigo-desktop-full-wet.rosinstall
    wstool init -j8 src indigo-desktop-full-wet.rosinstall
    rosdep install --from-paths src --ignore-src --rosdistro indigo -y
    ./src/catkin/bin/catkin_make_isolated --install -DCMAKE_BUILD_TYPE=Release
    source ~/ros_catkin_ws/install_isolated/setup.bash

    如果下载新的包,可以采用建立自己的工作空间的方式

    mkdir -p ~/catkin_ws/src
    cd ~/catkin_ws/src
    catkin_init_workspace
    cd ~/catkin_ws/
    catkin_make
    source ~/catkin_ws/devel/setup.bash

    参考文献:

    1 http://wiki.ros.org/ROS/Tutorials/InstallingandConfiguringROSEnvironment

    2 http://wiki.ros.org/indigo/Installation

    3 http://wiki.ros.org/indigo/Installation/Source

  • 相关阅读:
    Apache 安装及常用参数设置
    Apache 开启压缩传输
    在 CentOS 上编写 init.d service script [转]
    学习资源
    IO流(10)复制多级文件夹
    IO流(9)复制指定文件夹下指定文件到目的文件夹,并改名
    IO流(8)递归删除带文件的目录
    IO流(7)获取指定文件夹下的所有文件
    IO流(6)获取功能
    IO流(5)判断功能
  • 原文地址:https://www.cnblogs.com/qixianyu/p/6590917.html
Copyright © 2020-2023  润新知