美文网首页
Ubuntu 直接装 ROS 环境

Ubuntu 直接装 ROS 环境

作者: Barry_Xu | 来源:发表于2019-12-02 14:44 被阅读0次

    ROS1

    Use melodic as an example.

    $ sudo apt update && sudo apt install curl gnupg2 lsb-release
    $ sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'
    $ sudo apt-key adv --keyserver 'hkp://keyserver.ubuntu.com:80' --recv-key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654
    $ sudo apt update
    $ sudo apt install ros-melodic-ros-base
    
    $ sudo apt install python-rosinstall python-rosinstall-generator python-wstool build-essential
    $ rosdep init
    $ rosdep update
    

    ROS2

    Use Dashing as an example

    $ sudo locale-gen en_US en_US.UTF-8
    $ sudo update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8
    $ export LANG=en_US.UTF-8
    $ sudo apt update && sudo apt install curl gnupg2 lsb-release
    $ curl -s https://raw.githubusercontent.com/ros/rosdistro/master/ros.asc | sudo apt-key add -
    $ sudo sh -c 'echo "deb [arch=amd64,arm64] http://packages.ros.org/ros2/ubuntu `lsb_release -cs` main" > /etc/apt/sources.list.d/ros2-latest.list'
    $ apt- update
    $ sudo apt install ros-dashing-ros-base
    
    $ sudo apt update && sudo apt install -y \
      build-essential \
      cmake \
      git \
      python3-colcon-common-extensions \
      python3-pip \
      python-rosdep \
      python3-vcstool \
      wget
    # install some pip packages needed for testing
    $ python3 -m pip install -U \
      argcomplete \
      flake8 \
      flake8-blind-except \
      flake8-builtins \
      flake8-class-newline \
      flake8-comprehensions \
      flake8-deprecated \
      flake8-docstrings \
      flake8-import-order \
      flake8-quotes \
      pytest-repeat \
      pytest-rerunfailures \
      pytest \
      pytest-cov \
      pytest-runner \
      setuptools
    # install Fast-RTPS dependencies
    $ sudo apt install --no-install-recommends -y \
      libasio-dev \
      libtinyxml2-dev
    # install CycloneDDS dependencies
    $ sudo apt install --no-install-recommends -y \
      libcunit1-dev
    

    相关文章

      网友评论

          本文标题:Ubuntu 直接装 ROS 环境

          本文链接:https://www.haomeiwen.com/subject/wdribctx.html