Couldn’t run roscore, appear the following Notes:
will@will-450R5G-450R5U:~$ roscore
... logging to /home/will/.ros/log/6fafdbc0-7fd7-11eb-ac79-1867b0b6abeb/roslaunch-will-450R5G-450R5U-6634.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://will-450R5G-450R5U:37409/
ros_comm version 1.12.17
SUMMARY
========
PARAMETERS
* /rosdistro: kinetic
* /rosversion: 1.12.17
NODES
auto-starting new master
process[master]: started with pid [6659]
ROS_MASTER_URI=http://will-450R5G-450R5U:11311/
setting /run_id to 6fafdbc0-7fd7-11eb-ac79-1867b0b6abeb
process[rosout-1]: started with pid [6672]
started core service [/rosout]
[rosout-1] process has died [pid 6672, exit code -11, cmd /opt/ros/kinetic/lib/rosout/rosout __name:=rosout __log:=/home/will/.ros/log/6fafdbc0-7fd7-11eb-ac79-1867b0b6abeb/rosout-1.log].
log file: /home/will/.ros/log/6fafdbc0-7fd7-11eb-ac79-1867b0b6abeb/rosout-1*.log
[rosout-1] restarting process
process[rosout-1]: started with pid [6679]
[rosout-1] process has died [pid 6679, exit code -11, cmd /opt/ros/kinetic/lib/rosout/rosout __name:=rosout __log:=/home/will/.ros/log/6fafdbc0-7fd7-11eb-ac79-1867b0b6abeb/rosout-1.log].
log file: /home/will/.ros/log/6fafdbc0-7fd7-11eb-ac79-1867b0b6abeb/rosout-1*.log
I have searched Google and Baidu, try all the method I can find, For example:
- add
export LD_LIBRARY_PATH=/opt/ros/kinetic/lib
in the~/.bashrc
- change python and opencv version
- run
sudo update-locale LC_ALL="C"
All of them didn’t work in my laptop. TAT
I had been installed ROS kinetic in my laptop before, and because of some reasons, I run autoremove sth, and this commend delete my ros system.
And, now, I find after follow the instrument in the wiki.ros.org
I still can not run ros in my laptop.
After I check all the dependence needed by ROS, I find my laptop failed to initialize the rosdep. This commend sudo rosdep init
Note that:
(ros) will@will-450R5G-450R5U:~$ sudo rosdep init
[sudo] password for will:
Traceback (most recent call last):
File "/usr/bin/rosdep", line 6, in <module>
from pkg_resources import load_entry_point
File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 2927, in <module>
@_call_aside
File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 2913, in _call_aside
f(*args, **kwargs)
File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 2940, in _initialize_master_working_set
working_set = WorkingSet._build_master()
File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 637, in _build_master
return cls._build_from_requirements(__requires__)
File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 650, in _build_from_requirements
dists = ws.resolve(reqs, Environment())
File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 829, in resolve
raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'rospkg>=1.2.7' distribution was not found and is required by rosdep
此时,只需要安装python包就可以了,直接pip install rospkg
是不行的,正确的包是:
sudo apt-get install python-rospkg
就可以修复这个bug了
不好意思,sogou坏了,写到最后才有空另外装一个中文输入法,sogou依然用不了,真是醉了