roscore失败的问题/启动py程序找不到文件

今天不知道咋回事roscore都出问题,虽然没搞懂为什么突然有了这个问题,但是还是有点指导咋回事了,记下来。

roscore报错:

kylefan@kylefan-Lenovo-G470:~$ 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/bin/rosversion", line 85, in <module>
    version = rosstack.get_stack_version(stack_name)
  File "/usr/lib/python2.7/dist-packages/rospkg/rospack.py", line 418, in get_stack_version
    return get_stack_version_by_dir(self.get_path(stack))
  File "/usr/lib/python2.7/dist-packages/rospkg/rospack.py", line 198, in get_path
    self._update_location_cache()
  File "/usr/lib/python2.7/dist-packages/rospkg/rospack.py", line 181, in _update_location_cache
    list_by_path(self._manifest_name, path, cache)
  File "/usr/lib/python2.7/dist-packages/rospkg/rospack.py", line 67, in list_by_path
    root = ElementTree(None, os.path.join(d, PACKAGE_FILE))
  File "/usr/lib/python2.7/xml/etree/ElementTree.py", line 611, in __init__
    self.parse(file)
  File "<string>", line 38, in parse
cElementTree.ParseError: not well-formed (invalid token): line 13, column 31
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"

Google了下,大概的意思是source /opt/ros/indigo/setup.bash 这里有点问题,把.bashrc的这句话放到最底下就好了,之前它下面有句:source /home/kylefan/catkin_ws/devel/setup.bash,搞不懂以前咋没事,就这样吧。

还有一个小问题也写在这把,在写好×××.py之后忘了chmod +x ×××.py,就会导致启动不了的情况,chmod +x on a file only means, that you’ll make it executable. Right click on your script and chose Properties -> Permissions -> Allow executing file as program, leaves you with the exact same result as the command in terminal.

发现自己好菜,不会系统的自学,还没人带。呵呵。

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值