使用ros遇到的问题及记录《一》

运行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.

Traceback (most recent call last):
  File "/usr/local/bin/rosversion", line 87, in <module>
    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 <module>
    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 <param> tag: Cannot load command parameter [rosversion]: command [rosversion roslaunch] returned with code [1]. 

Param xml is <param command="rosversion roslaunch" name="rosversion"/>
The traceback for the exception was written to the log file
No handlers could be found for logger "roslaunch"

roscore突然就不能运行了,在网上找了各种方法都不能解决,不知道问题到底在哪。于是删除所列ros工作空间中的build文件,重新编译ros工作空间,编译完成后重新设置环境变量并使其生效,再次运行roscore可以正常运行了。虽然还不知道是什么原因,先记录下来。
 

  • 1
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 2
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值