ROS-Ubuntu20.04安装noetic

ROS-Ubuntu20.04环境安装

1.系统和ROS版本

操作系统:Ubuntu20.04

ROS版本:ROS noetic

2.安装步骤

1.配置ROS软件源

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 apt-key adv --keyserver 'hkp://keyserver.ubuntu.com:80' --recv-key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654

3.更新系统软件源

sudo apt update

4.安装ROS

sudo apt install ros-noetic-desktop-full

5.初始化rosdep

先执行以下命令,不然初始化会报错:

sudo apt install python3-rosdep

初始化:

sudo rosdep init

6.rosdep更新

rosdep update

出现以下报错:

ERROR:error loading sources list:
	('The read operation timed out',)

尝试解决(没有成功):

访问网址不通造成的,添加https://ghproxy.com/资源代理网站加速rosdep对github raw的访问。但是出现以下报错:

ERROR:unable to process source[https://ghproxy.com/https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/osx-homebrew.yaml]

查找原因后,发现https://ghproxy.com/已经不管用

最终解决:

sudo pip install rosdepc
sudo rosdepc init
rosdepc update

7.设置环境变量

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

8.安装依赖包

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

出现以下报错:

E:Package 'python-rosinstall' has no installation candidate
E:Package 'python-rosinstall-generator' has no installation candidate
E:Package 'python-wstool' has no installation candidate

解决: 现在支持的是python3版本,所以把每个python改为python3

sudo apt install python3-rosinstall python3-rosinstall-generator python3-wstool build-essential

3.检验安装

1.查看安装版本

$ rosversion -d
noetic		//输出ROS的版本

2.运行demo

$ roscore 	//启动ROS MASTER
$ rosrun turtlesim turtlesim_node 	//启动小海龟仿真器
$ rosrun turtlesim turtle_teleop_key	//启动小海龟控制节点

4.其他

修改文件权限:

sudo chmod 777 xxx		//777:每个人可读可写可执行,xxx:需要修改权限的文件名

参考链接:
http://t.csdnimg.cn/gYU91

http://t.csdnimg.cn/TWSIn

http://t.csdnimg.cn/brWCe

相关推荐

  1. ROS-Ubuntu20.04安装noetic

    2024-01-09 01:14:01       42 阅读
  2. ubuntu 22.04源码装ros1 noetic

    2024-01-09 01:14:01       42 阅读
  3. 机器人学环境配置(VM-16 + Ubuntu-20.04 + ROS-noetic

    2024-01-09 01:14:01       35 阅读

最近更新

  1. TCP协议是安全的吗?

    2024-01-09 01:14:01       19 阅读
  2. 阿里云服务器执行yum,一直下载docker-ce-stable失败

    2024-01-09 01:14:01       19 阅读
  3. 【Python教程】压缩PDF文件大小

    2024-01-09 01:14:01       19 阅读
  4. 通过文章id递归查询所有评论(xml)

    2024-01-09 01:14:01       20 阅读

热门阅读

  1. Python深拷贝、浅拷贝详解

    2024-01-09 01:14:01       31 阅读
  2. pod进阶

    pod进阶

    2024-01-09 01:14:01      26 阅读
  3. LeetCode119. Pascal‘s Triangle II

    2024-01-09 01:14:01       36 阅读
  4. 问答:攻击面发现及管理

    2024-01-09 01:14:01       41 阅读
  5. 如何获取时间戳?

    2024-01-09 01:14:01       35 阅读
  6. Android Framework默认授予第三方APP悬浮窗权限

    2024-01-09 01:14:01       39 阅读
  7. 问答:攻击面发现及管理

    2024-01-09 01:14:01       40 阅读
  8. MySQL5.7 InnoDB 磁盘结构之索引Index

    2024-01-09 01:14:01       43 阅读
  9. C++面对对象编程进阶(2)

    2024-01-09 01:14:01       37 阅读