您的位置:首页 > 大数据 > 人工智能

[失败] 尝试二:ubuntu18.04.1重装,搭建ROS Melodic & openai_ros [失败]

2020-01-13 11:31 537 查看

文章目录

  • 三、需要安装
  • 四、安装应用
  • 一、重装系统

    Ubuntu U盘启动工具Rufus制作(详细步骤)
    重装了一下,第一次插U盘时死机了?第二次插U盘时正常,好的顺利安装好了ubuntu。安装时直接选的英文,而后需要重新设置language support,有点麻烦,还不如开始的时候就选择中文…

    二、参考内容

    gym-gazebo要求
    ROS Melodic: Desktop-Full Install recommended, includes Gazebo 9.0.0
    Gazebo 9.0.0

    1、天涯0508

    主页
    20180830_ROS开发笔记(8)——Turtlebot3 Gazebo仿真环境下深度强化学习DQN(Deep Q-Learning)开发环境构建
    开发环境为Ubuntu 16.04、ROS版本为kinetic、py2
    20180909_ROS开发笔记(9)——ROS 深度强化学习应用之keras版本dqn代码分析
    20180914_ROS开发笔记(10)——ROS 深度强化学习dqn应用之tensorflow版本(double dqn/dueling dqn/prioritized replay dqn)

    2、zhangrelay

    其人应该是ROS界的大牛。
    主页

    20190430_ROS、OpenAI和Gazebo机器人与人工智能仿真与实践教研杂记(一)安装配置
    系统:Ubuntu 18.04.2 LTS + ROS Melodic(1.0)1.14.3 ~ 1943 + ROS Crystal(2.0)0.6.1 ~ 541 etc.
    仿真:Gazebo 9.8.0 + V-Rep 3.6.1 + Webots 2019a.1 etc.
    镜像:ROS2Go ver2.0 + 实验楼ROS + Exbot ROS iso indigo&kinetic etc.
    编程:Matlab 2018a + Python 2.7 + Python 3.6 + C++ etc.
    智能:Tensorflow + Caffe + OpenAI etc.

    gym-gazebo支持ROS Melodic(1.0)
    gym-gazebo2支持ROS Crystal(2.0)

    20190513_ROS、OpenAI和Gazebo机器人与人工智能仿真与实践教研杂记(三)深度学习
    关于ROS、OpenAI和Gazebo已经测试过环境包括:
    Ubuntu 16.04 + ROS 1 Kinetic + OpenAI + Gazebo 7
    Ubuntu 18.04 + ROS 1 Melodic + OpenAI +Gazebo 9

    3、抚琴弹出情调零

    主页

    20190813_gym-gazebo安装
    ubuntu18.04; Melodic; Gzebo9.0

    20190809_openai_ros教程( ros gazebo 深度强化学习)
    ubuntu16.04,kinetic

    4、lxlong89940101

    主页
    20190528_强化学习实现四旋翼无人机的路径选择(Gym+Gym-Gazebo+Gazebo+Ros)
    20190410_ROS+Gazebo+Gym+Gym_gazebo安装配置

    5、gym-gazebo的官方安装教程

    gym-gazebo的官方安装教程
    Installation:
    Ubuntu 18.04
    Ubuntu 16.04 (deprecated)官方弃用
    Ubuntu 14.04 (deprecated)官方弃用
    Docker (deprecated)官方弃用

    Ubuntu 18.04 Basic requirements:
    ROS Melodic: Desktop-Full Install recommended, includes Gazebo 9.0.0 (http://wiki.ros.org/melodic/Installation/Ubuntu).
    Gazebo 9.0.0

    Ubuntu 16.04 Basic requirements:
    ROS Kinetic (/rosversion: 1.12.7)
    Gazebo 8.1.1
    Python 3.5.2
    OpenCV3, installed from sources for Python 3 (git clone https://github.com/Itseez/opencv.git)
    OpenAI gym

    6、RainStarX

    主页
    20181010_安装Airsim并在Airsim仿真环境下进行DDPG DQN强化学习算法无人机训练

    三、需要安装

    tensorflow可以参考‘天涯0508’安装‘tensorflow_gpu-1.8.0-cp27-none-linux_x86_64.whl’

    20190419_NVIDIA 驱动版本 cuDNN CUDA Tensorflow四者之间的版本的对应问题:

    Version Python version Compiler Build tools cuDNN CUDA
    tensorflow_gpu-1.8.0 2.7, 3.3-3.6 GCC 4.8 Bazel 0.10.0 7 9

    四、安装应用

    把以前下载的各种包直接导进去,然后安装。
    安装anaconda3-5.1.0,20180911_Ubuntu16 安装Anaconda3
    安装ROS melodic,20190726_Ubuntu18.04安装ROS melodic

    melodic昨天没装完今天继续,开机时失败了、像是死机…平时开机也不快,完全不像笔记本上面的ubuntu16.04,快的很。
    碰到了昨天同样的问题:

    $ sudo rosdep init
    ERROR: cannot download default sources list from:
    https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/sources.list.d/20-default.list
    Website may be down.

    卸载 Ubuntu 16.04 Kinetic版本ROS
    卸载之后再重装,遭遇了一堆源的问题,最后靠阿里的源救回一命。
    另外添加了ROS官方的软件镜像源和中科大的源:

    sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'
    
    sudo sh -c '. /etc/lsb-release && echo "deb http://mirrors.ustc.edu.cn/ros/ubuntu/ $DISTRIB_CODENAME main" > /etc/apt/sources.list.d/ros-latest.list'

    再次安装后,出现了更多问题:

    (py27) fyo@fyo:~$ sudo rosdep init
    Wrote /etc/ros/rosdep/sources.list.d/20-default.list
    Recommended: please run
    
    rosdep update
    
    (py27) fyo@fyo:~$ sudo rosdep update
    reading in sources list data from /etc/ros/rosdep/sources.list.d
    Warning: running 'rosdep update' as root is not recommended.
    You should run 'sudo rosdep fix-permissions' and invoke 'rosdep update' again without sudo.
    Hit https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/osx-homebrew.yaml
    Hit https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/base.yaml
    Hit https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/python.yaml
    ERROR: unable to process source [https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/ruby.yaml]:
    <urlopen error timed out> (https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/ruby.yaml)
    ERROR: unable to process source [https://raw.githubusercontent.com/ros/rosdistro/master/releases/fuerte.yaml]:
    Failed to download target platform data for gbpdistro:
    <urlopen error timed out>
    Query rosdistro index https://raw.githubusercontent.com/ros/rosdistro/master/index-v4.yaml
    ERROR: error loading sources list:
    <urlopen error <urlopen error timed out> (https://raw.githubusercontent.com/ros/rosdistro/master/index-v4.yaml)>

    melodic对我确实不太友好…在转战kinetic之前,我还想再试一遍,不过这次直接拿笔记本上的源来安装melodic,看看效果会不会好一点:

    # deb cdrom:[Ubuntu 16.04 LTS _Xenial Xerus_ - Release amd64 (20160420.1)]/ xenial main restricted
    
    # See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
    # newer versions of the distribution.
    # deb-src http://cn.archive.ubuntu.com/ubuntu/ xenial main restricted
    
    ## Major bug fix updates produced after the final release of the
    ## distribution.
    # deb-src http://cn.archive.ubuntu.com/ubuntu/ xenial-updates main restricted
    
    ## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
    ## team, and may not be under a free licence. Please satisfy yourself as to
    ## your rights to use the software. Also, please note that software in
    ## universe WILL NOT receive any review or updates from the Ubuntu security
    ## team.
    # deb-src http://cn.archive.ubuntu.com/ubuntu/ xenial universe
    # deb-src http://cn.archive.ubuntu.com/ubuntu/ xenial-updates universe
    
    ## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
    ## team, and may not be under a free licence. Please satisfy yourself as to
    ## your rights to use the software. Also, please note that software in
    ## multiverse WILL NOT receive any review or updates from the Ubuntu
    ## security team.
    # deb-src http://cn.archive.ubuntu.com/ubuntu/ xenial multiverse
    # deb-src http://cn.archive.ubuntu.com/ubuntu/ xenial-updates multiverse
    
    ## N.B. software from this repository may not have been tested as
    ## extensively as that contained in the main release, although it includes
    ## newer versions of some applications which may provide useful features.
    ## Also, please note that software in backports WILL NOT receive any review
    ## or updates from the Ubuntu security team.
    # deb-src http://cn.archive.ubuntu.com/ubuntu/ xenial-backports main restricted universe multiverse
    
    ## Uncomment the following two lines to add software from Canonical's
    ## 'partner' repository.
    ## This software is not part of Ubuntu, but is offered by Canonical and the
    ## respective vendors as a service to Ubuntu users.
    # deb http://archive.canonical.com/ubuntu xenial partner
    # deb-src http://archive.canonical.com/ubuntu xenial partner
    
    # deb-src http://security.ubuntu.com/ubuntu xenial-security main restricted
    # deb-src http://security.ubuntu.com/ubuntu xenial-security universe
    # deb-src http://security.ubuntu.com/ubuntu xenial-security multiverse
    deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial main universe restricted multiverse
    deb http://security.ubuntu.com/ubuntu/ xenial-security universe restricted multiverse main
    deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-updates universe restricted multiverse main
    deb http://archive.ubuntu.com/ubuntu/ trusty main universe restricted multiverse
    
    deb http://archive.ubuntu.com/ubuntu xenial main universe restricted multiverse
    deb-src http://archive.ubuntu.com/ubuntu xenial main universe restricted multiverse #Added by software-properties
    deb http://security.ubuntu.com/ubuntu/ xenial-security main restricted multiverse universe
    deb http://archive.ubuntu.com/ubuntu xenial-updates main restricted multiverse universe
    
    deb http://packages.ros.org/ros/ubuntu xenial main
    # deb-src http://packages.ros.org/ros/ubuntu xenial main
    deb http://packages.ros.org/ros-shadow-fixed/ubuntu xenial main
    # deb-src http://packages.ros.org/ros-shadow-fixed/ubuntu xenial main
    # deb-src http://packages.ros.org/ros/ubuntu xenial main
    # deb-src http://packages.ros.org/ros-shadow-fixed/ubuntu xenial main

    且不说能不能安装好,简直快得一笔…有点开心…

    # 第一个终端
    roscore
    
    # 第二个终端
    rosrun turtlesim turtlesim_node
    
    # 第三个终端
    rosrun turtlesim turtle_teleop_key


    终于又看见熟悉的龟龟了!
    所以这两天碰见的麻烦事,主要都是源的问题!

    编译其他还好,可是编译uuv包“uuv_simulator”的时候“惊喜”不断,单独发个贴好了,难度有点大、内容应该会很长。

    sudo gedit /etc/apt/sources.list

    明天打算重装ubuntu16,搭配kinetic!

    • 点赞
    • 收藏
    • 分享
    • 文章举报
    方小汪 发布了25 篇原创文章 · 获赞 3 · 访问量 1185 私信 关注
    内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
    标签: