IT数码 购物 网址 头条 软件 日历 阅读 图书馆
TxT小说阅读器
↓语音阅读,小说下载,古典文学↓
图片批量下载器
↓批量下载图片,美女图库↓
图片自动播放器
↓图片自动播放器↓
一键清除垃圾
↓轻轻一点,清除系统垃圾↓
开发: C++知识库 Java知识库 JavaScript Python PHP知识库 人工智能 区块链 大数据 移动开发 嵌入式 开发工具 数据结构与算法 开发测试 游戏开发 网络协议 系统运维
教程: HTML教程 CSS教程 JavaScript教程 Go语言教程 JQuery教程 VUE教程 VUE3教程 Bootstrap教程 SQL数据库教程 C语言教程 C++教程 Java教程 Python教程 Python3教程 C#教程
数码: 电脑 笔记本 显卡 显示器 固态硬盘 硬盘 耳机 手机 iphone vivo oppo 小米 华为 单反 装机 图拉丁
 
   -> 系统运维 -> ubuntu-18.04一键安装ros -> 正文阅读

[系统运维]ubuntu-18.04一键安装ros


之前安装ros的过程中需要翻墙,最近我们盖饭的神(鱼香ros)大佬又更新了一键安装ros的工具,我就迫不及待的先来测试一下,首先我的ubuntu-18.04的源已经切换过了,都是国内的源,还是给大家贴一下吧

# deb cdrom:[Ubuntu 18.04.2 LTS _Bionic Beaver_ - Release amd64 (20190210)]/ bionic main restricted
deb-src http://mirrors.aliyun.com/ubuntu/ bionic main restricted #Added by software-properties

# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://mirrors.aliyun.com/ubuntu/ bionic main restricted
deb-src http://mirrors.aliyun.com/ubuntu/ bionic universe multiverse #Added by software-properties
# deb-src http://cn.archive.ubuntu.com/ubuntu/ bionic main restricted

## Major bug fix updates produced after the final release of the
## distribution.
deb http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-updates main universe restricted multiverse #Added by software-properties
# deb-src http://cn.archive.ubuntu.com/ubuntu/ bionic-updates main restricted

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team. Also, please note that software in universe WILL NOT receive any
## review or updates from the Ubuntu security team.
deb http://mirrors.aliyun.com/ubuntu/ bionic universe
# deb-src http://cn.archive.ubuntu.com/ubuntu/ bionic universe
deb http://mirrors.aliyun.com/ubuntu/ bionic-updates universe
# deb-src http://cn.archive.ubuntu.com/ubuntu/ bionic-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 http://mirrors.aliyun.com/ubuntu/ bionic multiverse
# deb-src http://cn.archive.ubuntu.com/ubuntu/ bionic multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-updates multiverse
# deb-src http://cn.archive.ubuntu.com/ubuntu/ bionic-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 http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse #Added by software-properties
# deb-src http://cn.archive.ubuntu.com/ubuntu/ bionic-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 bionic partner
# deb-src http://archive.canonical.com/ubuntu bionic partner

deb http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-security main universe restricted multiverse #Added by software-properties
# deb-src http://security.ubuntu.com/ubuntu bionic-security main restricted
deb http://mirrors.aliyun.com/ubuntu/ bionic-security universe
# deb-src http://security.ubuntu.com/ubuntu bionic-security universe
deb http://mirrors.aliyun.com/ubuntu/ bionic-security multiverse
# deb-src http://security.ubuntu.com/ubuntu bionic-security multiverse
deb [arch=amd64] https://download.docker.com/linux/ubuntu bionic stable
# deb-src [arch=amd64] https://download.docker.com/linux/ubuntu bionic stable
deb http://security.ubuntu.com/ubuntu xenial-security main
# deb-src http://security.ubuntu.com/ubuntu xenial-security main
# deb-src http://security.ubuntu.com/ubuntu xenial-security main



deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-security main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-security main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ trusty main universe restricted multiverse

# deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse
deb http://mirrors.ustc.edu.cn/ubuntu/ bionic main restricted universe multiverse
deb http://mirrors.ustc.edu.cn/ubuntu/ bionic-security main restricted universe multiverse
deb http://mirrors.ustc.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse
deb http://mirrors.ustc.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse
deb http://mirrors.ustc.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse
#deb-src http://mirrors.ustc.edu.cn/ubuntu/ bionic main restricted universe multiverse
#deb-src http://mirrors.ustc.edu.cn/ubuntu/ bionic-security main restricted universe multiverse
#deb-src http://mirrors.ustc.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse
#deb-src http://mirrors.ustc.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse
#deb-src http://mirrors.ustc.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse

如果需要更换源,最后别忘了下面命令更新一下

sudo apt-get update

执行命令安装ros

wget http://fishros.com/install -O fishros && . fishros

终端输入上面命令进行安装ros,会自动帮我们检测环境依赖

RUN Choose Task:[请输入括号内的数字]
---众多工具,等君来用---
[1]:一键安装:ROS(支持ROS和ROS2,树莓派Jetson)
[2]:一键安装:github桌面版(小鱼常用的github客户端)
[3]:一键配置:rosdep(小鱼的rosdepc,又快又好用)
[4]:一键配置:ROS环境(快速更新ROS环境设置,自动生成环境选择)
[5]:一键配置:系统源(更换系统源,支持全版本Ubuntu系统)
[6]:一键安装:nodejs开发环境(通过nodejs可以预览小鱼官网噢)
[7]:一键安装:VsCode
[8]:一键安装:Docker
[77]:测试模式:运行自定义工具测试
[0]:quit
请输入[]内的数字以选择:

这里我选择1,然后进到下一个选择项

小鱼:检测当前系统ubuntu18.04:bionic 支持一键安装ROS
RUN Choose Task:[请输入括号内的数字]
如果您是第一次安装,推荐您先更换一下系统源
[1]:更换系统源再继续安装
[2]:不更换继续安装
[0]:quit
请输入[]内的数字以选择:2

因为我的源已经更换过,所以选择2

[1]:melodic
[2]:bouncy
[3]:crystal
[4]:dashing
[5]:eloquent
[0]:quit
请输入[]内的数字以选择:1

ubuntu版本对应安装ros版本如下:

ubuntu版本Ros版本
Ubuntu14.04Ingigo
Ubuntu16.04Kinetic
Ubuntu18.04Melodic
Ubuntu20.04Noetic
请选择安装的具体版本:
[1]:melodic完全版
[2]:melodic基础版()
[0]:quit
请输入[]内的数字以选择:

这里我选择的是1,安装完全版,然后回车就进入安装的过程了
安装完后我们还需要初始化一下rosdep,这里继续用大佬的源

RUN Choose Task:[请输入括号内的数字]
---众多工具,等君来用---
[1]:一键安装:ROS(支持ROS和ROS2,树莓派Jetson)
[2]:一键安装:github桌面版(小鱼常用的github客户端)
[3]:一键配置:rosdep(小鱼的rosdepc,又快又好用)
[4]:一键配置:ROS环境(快速更新ROS环境设置,自动生成环境选择)
[5]:一键配置:系统源(更换系统源,支持全版本Ubuntu系统)
[6]:一键安装:nodejs开发环境(通过nodejs可以预览小鱼官网噢)
[7]:一键安装:VsCode
[8]:一键安装:Docker
[77]:测试模式:运行自定义工具测试
[0]:quit
请输入[]内的数字以选择:3

然后回车,配置好后会有如下提示

已为您安装好rosdepc,请使用:
rosdepc update 
进行测试更新,最后欢迎关注微信公众号《鱼香ROS》
一键安装已开源,欢迎给个star/提出问题/帮助完善:https://github.com/fishros/install/ 

我们执行命令更新一下

rosdepc update

至此,ros的安装就完成了

环境配置

环境配置我们最好根据官网教程自己手动配置一下,大佬的工具也是把ros安装在opt目录下

echo "source /opt/ros/melodic/setup.bash" >> ~/.bashrc
source ~/.bashrc

现在我们验证一下,打开三个终端,分别执行以下命令

roscore
rosrun turtlesim turtlesim_node
rosrun turtlesim turtle_teleop_key

如下图所示,说明ros安装成功
在这里插入图片描述

如果你觉得启动三个终端太麻烦,也可以写一个启动的脚本 turtlesim.launch

<launch>
    <node pkg="turtlesim" name="turtle1" type="turtlesim_node"/>
    <node pkg="turtlesim" name="turtle1_key" type="turtle_teleop_key"/>
</launch>

这样我们就可以直接在终端执行命令启动

roslaunch  turtlesim.launch

最后再膜拜一下鱼香ros大佬,这个工具太好用了

  系统运维 最新文章
配置小型公司网络WLAN基本业务(AC通过三层
如何在交付运维过程中建立风险底线意识,提
快速传输大文件,怎么通过网络传大文件给对
从游戏服务端角度分析移动同步(状态同步)
MySQL使用MyCat实现分库分表
如何用DWDM射频光纤技术实现200公里外的站点
国内顺畅下载k8s.gcr.io的镜像
自动化测试appium
ctfshow ssrf
Linux操作系统学习之实用指令(Centos7/8均
上一篇文章      下一篇文章      查看所有文章
加:2022-03-16 22:58:21  更:2022-03-16 23:01:40 
 
开发: C++知识库 Java知识库 JavaScript Python PHP知识库 人工智能 区块链 大数据 移动开发 嵌入式 开发工具 数据结构与算法 开发测试 游戏开发 网络协议 系统运维
教程: HTML教程 CSS教程 JavaScript教程 Go语言教程 JQuery教程 VUE教程 VUE3教程 Bootstrap教程 SQL数据库教程 C语言教程 C++教程 Java教程 Python教程 Python3教程 C#教程
数码: 电脑 笔记本 显卡 显示器 固态硬盘 硬盘 耳机 手机 iphone vivo oppo 小米 华为 单反 装机 图拉丁

360图书馆 购物 三丰科技 阅读网 日历 万年历 2024年11日历 -2024/11/16 1:21:14-

图片自动播放器
↓图片自动播放器↓
TxT小说阅读器
↓语音阅读,小说下载,古典文学↓
一键清除垃圾
↓轻轻一点,清除系统垃圾↓
图片批量下载器
↓批量下载图片,美女图库↓
  网站联系: qq:121756557 email:121756557@qq.com  IT数码