ubuntu20.04安装ROS2
按照 官方的文档 在 Ubuntu 20.04中安装 ROS2 Foxy Fitzroy:
Setup Locale
确保系统要支持 UTF-8
:
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
Setup Sources
添加ROS2的源:
sudo apt update
sudo apt install curl gnupg2 lsb-release
curl -s https://raw.githubusercontent.com/ros/rosdistro/master/ros.asc | sudo apt-key add -
sudo sh -c 'echo "deb http://packages.ros.org/ros2/ubuntu lsb_release -cs main" > /etc/apt/sources.list.d/ros2-latest.list'
Install ROS 2 packages
(1)更新源
(2)推荐安装ROS2桌面版本(包括ROS, RViz, demos, tutorials)
sudo apt install ros-foxy-desktop
source /opt/ros/foxy/setup.bash
安装完成测试:
rviz2:
卸载:
sudo apt remove ros-foxy-*
sudo apt autoremove