The program ‘roscore‘ is currently not installed 解决办法

运行roscore时发现,出现错误:

The program 'roscore' is currently not installed. You can install it by typing:
sudo apt install python-roslaunch

按照提示执行sudo apt install python-roslaunch ,会发现出现新的错误。

解决办法1:没有source环境导致

打开 gedit ~/.bashrc

添加 source /opt/ros/kinetic/setup.bash

执行 source ~/.bashrc

运行roscore, 如果能正常运行了,恭喜你,问题解决了。如果还是打印一样的错误信息,则看继续往下看...

解决方法2:安装依赖包

执行 sudo apt install ros-kinetic-roslaunch
所有选项都选择 y

安装结束后,再次执行 source ~/.basnrc

运行 roscore,出现如下信息,表示ros已经正常运行!

... logging to /home/supernode/.ros/log/2d222370-9f71-11ec-8f1d-049226d627d1/roslaunch-supernode-6569.log
Checking log directory for disk usage. This may take awhile.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.

started roslaunch server http://supernode:42653/
ros_comm version 1.12.17


SUMMARY
========

PARAMETERS
 * /rosdistro: kinetic
 * /rosversion: 1.12.17

NODES

auto-starting new master
process[master]: started with pid [6608]
ROS_MASTER_URI=http://supernode:11311/

setting /run_id to 2d222370-9f71-11ec-8f1d-049226d627d1
process[rosout-1]: started with pid [6629]
started core service [/rosout]
 

猜你喜欢

转载自blog.csdn.net/h1527820835/article/details/123377105