ubuntu18.04安装ros2 foxy
时间: 2023-10-20 15:08:35 浏览: 224
ubuntu18.04安装ROS
好的,我知道您想问如何在Ubuntu 18.04上安装ROS2 Foxy。以下是安装步骤:
1. 安装依赖项
sudo apt update
sudo apt install -y curl gnupg2 lsb-release
2. 设置镜像源
curl -s https://raw.githubusercontent.com/ros/rosdistro/master/ros.asc | sudo apt-key add -
sudo sh -c 'echo "deb [arch=$(dpkg --print-architecture)] http://mirrors.tuna.tsinghua.edu.cn/ros2/ubuntu $(lsb_release -cs) main" > /etc/apt/sources.list.d/ros2-latest.list'
3. 安装ROS2 Foxy
sudo apt update
sudo apt install -y ros-foxy-desktop
4. 设置环境变量
source /opt/ros/foxy/setup.bash
echo "source /opt/ros/foxy/setup.bash" >> ~/.bashrc
至此,ROS2 Foxy已经安装完成。希望我的回答能够帮助您!
阅读全文