Ubuntu16.04-ros-kinetic环境搭建笔记=1=

tips:搬运资料,留个记录

安装Ubuntu

Ubuntu官网下载地址
安装
虚拟机安装Ubuntu

最好断网安装Ubuntu,可以节约时间

Ubuntu基础设置


Ubuntu换国内源

换成清华源

bash 复制代码
sudo apt upgrade

VMwareTool安装


把这个压缩包拖到桌面,否则只读文件无法解压

powershell 复制代码
sudo ./ware-install.pl

一路点y就对了

然后关机再开起来就行了

vscode安装

vscode安装

Visual Studio Code(Ubuntu16安装失败amd64报错)

纠错:Ubuntu下载的时候一定要注意amd64跟i386这两版本,pc端上面跑i386会出各种问题

改成amd64版本 的就能安装了

安装ROS

b站资料文件
b站教程

(注意b站中up主选择的是Ubuntui386版本,尽量改成amd64版本)
报错问题解决

镜像换成清华源或者中科大源

bash 复制代码
1、设置sources.list
sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'

2、下载源:
sudo sh -c '. /etc/lsb-release && echo "deb http://mirrors.tuna.tsinghua.edu.cn/ros/ubuntu/ `lsb_release -cs` main" > /etc/apt/sources.list.d/ros-latest.list'

3、设置密钥
sudo apt-key adv --keyserver 'hkp://keyserver.ubuntu.com:80' --recv-key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654

4、安装
sudo apt-get update
sudo apt-get install ros-kinetic-desktop-full

接下来必定报错,需要改一些东西才能顺利运行

bash 复制代码
5、初始化 rosdep一般情况一定会错的,保证要出错

sudo rosdep init

rosdep update
(这里多试几次,可以用热点)

6、环境配置

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

source ~/.bashrc

7、构建工厂依赖

sudo apt-get install python-rosinstall python-rosinstall-generator python-wstool build-essential

sudo gedit /etc/resolv.conf
将原有的nameserver这一行注释,并添加以下两行:
nameserver 8.8.8.8
nameserver 8.8.4.4

清华源跟中科大源都试一下(中科大源成功率更高)

测试:

Ctrl + Alt +T 打开终端, 启动ROS ,输入:

bash 复制代码
roscore

打开一个新的终端,启动海龟仿真器,输入:

bash 复制代码
rosrun turtlesim turtlesim_node

再打开一个新的终端,控制海龟移动,输入:

bash 复制代码
rosrun turtlesim turtle_teleop_key

tips

  1. Ubuntu系统reboot容易出问题,尽量用poweroff
  2. 终端多窗口快捷键:ctrl+shift+t
相关推荐
西岸行者5 天前
学习笔记:SKILLS 能帮助更好的vibe coding
笔记·学习
starlaky5 天前
Django入门笔记
笔记·django
勇气要爆发5 天前
吴恩达《LangChain LLM 应用开发精读笔记》1-Introduction_介绍
笔记·langchain·吴恩达
悠哉悠哉愿意5 天前
【单片机学习笔记】串口、超声波、NE555的同时使用
笔记·单片机·学习
勇气要爆发5 天前
吴恩达《LangChain LLM 应用开发精读笔记》2-Models, Prompts and Parsers 模型、提示和解析器
android·笔记·langchain
qianshanxue115 天前
计算机操作的一些笔记标题
笔记
土拨鼠烧电路5 天前
笔记11:数据中台:不是数据仓库,是业务能力复用的引擎
数据仓库·笔记
土拨鼠烧电路5 天前
笔记14:集成与架构:连接孤岛,构建敏捷响应能力
笔记·架构
烟花落o5 天前
栈和队列的知识点及代码
开发语言·数据结构·笔记·栈和队列·编程学习