Command ‘roscore‘ not found, but can be installed with: sudo apt install python-roslaunch

Command ‘roscore‘ not found, but can be installed with: sudo apt install python-roslaunch

  • roscore 报错 Command 'roscore' not found, but can be installed with:
  • 下载catkin并编译
  • 创建并初始化工作目录
  • 重新安装ROS
  • 启动节点管理器(ROS Master)

roscore 报错 Command ‘roscore’ not found, but can be installed with:

Command ‘roscore‘ not found, but can be installed with: sudo apt install python-roslaunch_第1张图片

sudo apt install python-roslaunch
下列软件包有未满足的依赖关系:
 python-roslaunch : 依赖: python-roslib 但是它将不会被安装
E: 无法修正错误,因为您要求某些软件包保持现状,就是它们破坏了软件包间的依赖关系。

Command ‘roscore‘ not found, but can be installed with: sudo apt install python-roslaunch_第2张图片

sudo apt install python-roslib
下列软件包有未满足的依赖关系:
 python-roslib : 依赖: catkin 但是它将不会被安装
E: 无法修正错误,因为您要求某些软件包保持现状,就是它们破坏了软件包间的依赖关系。

Command ‘roscore‘ not found, but can be installed with: sudo apt install python-roslaunch_第3张图片

下载catkin并编译

~$ git clone https://github.com/ros/catkin.git
~$ cd catkin
~/catkin$ mkdir build
~/catkin$ cd build
~/catkin/build$ cmake ..
~/catkin/build$ make
~/catkin/build$ sudo make install
~/catkin/build$ cd ..
~/catkin$ sudo python2 setup.py install
~/catkin$ sudo python3 setup.py install

当执行下面这行命令,遇到报错,忽略,继续执行下面步骤

sudo python3 setup.py install

Command ‘roscore‘ not found, but can be installed with: sudo apt install python-roslaunch_第4张图片

创建并初始化工作目录

mkdir -p ~/catkin_ws/src
cd ~/catkin_ws/src
catkin_init_workspace

重新安装ROS

~$ cd ~/catkin_ws/
~/catkin_ws$ catkin_make
~/catkin_ws$ sudo apt install ros-melodic-desktop-full 
~/catkin$ rosdep update
~/catkin$ cd
~$ source ~/.bashrc

启动节点管理器(ROS Master)

roscore

Command ‘roscore‘ not found, but can be installed with: sudo apt install python-roslaunch_第5张图片

你可能感兴趣的:(Debug,ROS,roscore)