Ubuntu20.04如何优雅的安装ROS 1(胎教级教程)

1、USTC的源:

bash 复制代码
sudo sh -c '. /etc/lsb-release && echo "deb http://mirrors.ustc.edu.cn/ros/ubuntu/ `lsb_release -cs` main" > /etc/apt/sources.list.d/ros-latest.list'

2、设置的ROS源添加密钥:

bash 复制代码
sudo apt-key adv --keyserver 'hkp://keyserver.ubuntu.com:80' --recv-key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654

3.安装ROS1:

bash 复制代码
sudo apt update

sudo apt install ros-noetic-desktop-full

4.设置环境变量

bash 复制代码
echo "source /opt/ros/noetic/setup.bash" >> ~/.bashrc
source ~/.bashrc

5、添加依赖:

bash 复制代码
sudo apt-get install python3-rosdep python3-rosinstall python3-rosinstall-generator python3-wstool build-essential

6、安装rosinstall:

bash 复制代码
sudo apt install python3-pip

mkdir ~/.pip
cd ~/.pip
touch pip.conf
sudo gedit ~/.pip/pip.conf

# 在上面弹出的文件中写下下面的内容
[global]
index-url = https://pypi.tuna.tsinghua.edu.cn/simple/ 
[install]
trusted-host = pypi.tuna.tsinghua.edu.cn

sudo pip install rosdepc
sudo rosdepc init
rosdepc update

7、检查安装是否成功:

bash 复制代码
roscore

rosrun turtlesim turtlesim_node

rosrun turtlesim turtle_teleop_key

8、最后的结果:

9、参考博客网址:

【ROS】Ubuntu20.04.5安装ROS1【教程】-CSDN博客

相关推荐
张飞飞飞飞飞4 天前
Tmux命令使用教程
linux·服务器·ubuntu
盼小辉丶4 天前
Ubuntu极速部署OpenClaw完全指南(本地模型+DeepSeek)
linux·ubuntu·openclaw
黑白园4 天前
【环境搭建】Ubuntu安装(一)
linux·ubuntu
Moshow郑锴4 天前
Ubuntu用SDKMAN轻松管理多个Java 版本
java·ubuntu·sdkman
error:(4 天前
Ubuntu 22.04 GNOME远程桌面配置问题排查与解决全流程
linux·运维·ubuntu
Java知识技术分享4 天前
在windows上使用wsl安装Ubuntu~linux系统
linux·人工智能·windows·ubuntu
天疆说4 天前
在 Ubuntu 24.04 上安装 MATLAB R2021b
数据库·ubuntu·matlab
Clang's Blog4 天前
Ubuntu(20.04/22.04/24.04)国内环境一键安装 Docker、JDK17 和 Maven
ubuntu·docker·maven
izcll4 天前
ubuntu系统安装软件的方法
linux·运维·ubuntu
天疆说4 天前
在 Ubuntu 的 VSCode 中配置 MATLAB
vscode·ubuntu·matlab