最近在做路径规划的东西,装这个ROS太费劲了,记录一下
#设定环境 sudo apt update && sudo apt install locales sudo locale-gen en_US en_US.UTF-8 sudo update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 export LANG=en_US.UTF-8
sudo apt install software-properties-common sudo add-apt-repository universe ## 通过检查此命令的输出,确保已启用Ubuntu Universe存储库。 apt-cache policy | grep universe
修改Host文件
199.232.68.133 raw.githubusercontent.com 199.232.68.133 user-images.githubusercontent.com 199.232.68.133 avatars2.githubusercontent.com 199.232.68.133 avatars1.githubusercontent.com
添加公钥
# ROS1 curl -s https://raw.githubusercontent.com/ros/rosdistro/master/ros.asc | sudo apt-key add - # ROS2 sudo curl -sSL https://raw.githubusercontent.com/ros/rosdistro/master/ros.key -o /usr/share/keyrings/ros-archive-keyring.gpg
添加源
sudo apt update && sudo apt install curl gnupg lsb-release sudo curl -sSL https://raw.githubusercontent.com/ros/rosdistro/master/ros.key -o /usr/share/keyrings/ros-archive-keyring.gpg echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/ros-archive-keyring.gpg] http://packages.ros.org/ros2/ubuntu $(source /etc/os-release && echo $UBUNTU_CODENAME) main" | sudo tee /etc/apt/sources.list.d/ros2.list > /dev/null
更新
sudo apt update sudo apt upgrade
安装ROS2
sudo apt install ros-humble-desktop
标签:githubusercontent,公钥,sudo,apt,en,和源,ubuntu22,ros,com From: https://www.cnblogs.com/stux/p/18082781