roscore
WARNING:root:could not open file '/etc/apt/sources.list'
Command 'roscore' not found, but can be installed with:
sudo apt install python3-roslaunch
启动roscore发生以上错误,先一个一个来解决:
WARNING:root:could not open file ‘/etc/apt/sources.list’ 这个应该是sources.list权限不够,
sudo chmod 777 /etc/apt/sources.list
然后运行roscore
试一下:
Command 'roscore' not found, but can be installed with:
sudo apt install python3-roslaunch
果然第一个是权限的问题,但是依旧没有解决 Command ‘roscore’ not found,
然后参考如何解决ROS "roscore command not found"的回答,到/opt/ros/noetic/bin(/bin里存放二进制的可执行文件)果然没有roscore,这就很奇怪,昨天还能启动roscore,今天就没有了???
想起之前看到的一篇博文,在终端中再次下载一遍ros的桌面版来补全缺失的文件
sudo apt-get install ros-noetic-desktop
问题解决!