No handlers could be found for logger "roslaunch"

ros就是个这么神奇的东西。。。。。

某一天启动以后,就会出现问题

WARNING: unable to configure logging. No log files will be generated
Checking log directory for disk usage. This may take awhile.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.

Traceback (most recent call last):
  File "/usr/bin/rosversion", line 11, in 
    load_entry_point('rospkg==1.1.9', 'console_scripts', 'rosversion')()
  File "/usr/lib/python2.7/dist-packages/rospkg/rosversion.py", line 109, in main
    path = mm.get_path(args.package)
  File "/usr/lib/python2.7/dist-packages/rospkg/rospack.py", line 201, in get_path
    self._update_location_cache()
  File "/usr/lib/python2.7/dist-packages/rospkg/rospack.py", line 184, in _update_location_cache
    list_by_path(self._manifest_name, path, cache)
  File "/usr/lib/python2.7/dist-packages/rospkg/rospack.py", line 74, in list_by_path
    resource_name = root.findtext('name').strip(' \n\r\t')
AttributeError: 'NoneType' object has no attribute 'strip'
Invalid  tag: Cannot load command parameter [rosversion]: command [rosversion roslaunch] returned with code [1].

Param xml is 
The traceback for the exception was written to the log file
No handlers could be found for logger "roslaunch"

一开始怀疑,最近我更改了/opt/ros/kinetic/share/pcl_conversions/cmake的文件,我想是不是这个原因。就改回去,结果没用。

最后找到了解决办法:https://blog.csdn.net/li528405176/article/details/81941338/

也就是:
这是因为/usr/lib/python2.7/dist-packages/rospkg路径下的python文件没有可执行权限。进入该路径运行sudo chmod a+x rospack.py和sudo chmod a+x rosversion.py两句命令即可。

cd /usr/lib/python2.7/dist-packages/rospkg
sudo chmod a+x rospack.py
sudo chmod a+x rosversion.py

完美解决

你可能感兴趣的:(ROS学习,slam学习)