运行roscore出现如下错误
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.
数据代码:
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/local/bin/rosversion", line 87, in
version = rosstack.get_stack_version(stack_name)
File "/usr/local/lib/python3.5/site-packages/rospkg/rospack.py", line 422, in get_stack_version
return get_stack_version_by_dir(self.get_path(stack))
File "/usr/local/lib/python3.5/site-packages/rospkg/rospack.py", line 203, in get_path
raise ResourceNotFound(name, ros_paths=self._ros_paths)
rospkg.common.ResourceNotFound: roslaunch
ROS path [0]=/opt/ros/indigo/share/ros
ROS path [1]=/home/sxl/catkin_scanslam/src
ROS path [2]=/home/sxl/catkin_follow/src
ROS path [3]=/home/sxl/catkin_agv/src
ROS path [4]=/home/sxl/catkin_cartographer/install_isolated/share
ROS path [5]=/home/sxl/catkin_cartographer/install_isolated/stacks
ROS path [6]=/home/sxl/catkin_cartographer/src
ROS path [7]=/home/sxl/catkin_ws/src
ROS path [8]=/opt/ros/indigo/share
ROS path [9]=/opt/ros/indigo/stacks
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/bin/rosversion", line 92, in
path = mm.get_path(stack_name)
File "/usr/local/lib/python3.5/site-packages/rospkg/rospack.py", line 201, in get_path
self._update_location_cache()
File "/usr/local/lib/python3.5/site-packages/rospkg/rospack.py", line 184, in _update_location_cache
list_by_path(self._manifest_name, path, cache)
File "/usr/local/lib/python3.5/site-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"
roscore突然就不能运行了,在网上找了各种方法都不能解决,不知道问题到底在哪。删除所列ros工作空间中的build文件,重新编译ros工作空间,编译完成后重新设置环境变量并使其生效,再次运行roscore可以正常运行了。