在Ubuntu20.04上安装Foxy,按照官方的说明就行。
(1)确认支持UTF-8
这个应该没啥问题,在终端输入locale,应返回类似如下的内容:
(2)添加ROS软件源
添加密匙:
sudo apt update && sudo apt install curl gnupg2 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.