系统准备:
清华源
sudo sh -c ‘. /etc/lsb-release && echo “deb http://mirrors.tuna.tsinghua.edu.cn/ros/ubuntu/ $DISTRIB_CODENAME main” > /etc/apt/sources.list.d/ros-latest.list’
密钥:
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys F42ED6FBAB17C654
更新:
sudo apt-get update
安装(多试几次):
sudo apt-get install ros-melodic-desktop-full
sudo apt-get install ros-melodic-rqt*
安装pip:
安装rosdep:
安装ros install
sudo apt-get install python-rosinstall
刷新环境变量
source /opt/ros/melodic/setup.bash
测试:
roscore
rosrun turtlesim turtlesim_node
rosrun turtlesim turtle_teleop_key
成功