当我执行rosrun命令时,出现以下报错:
k@k:~/Study/first_ws$ rosrun demo_py 1.py
[rosrun] Couldn't find executable named 1.py below /home/k/Study/first_ws/src/demo_py
[rosrun] Found the following, but they're either not files,
[rosrun] or not executable:
[rosrun] /home/k/Study/first_ws/src/demo_py/scripts/1.py
查阅资料分析:这是由于1.py没有执行权限
解决方法:
cd 1.py所在的文件夹’ # 或在1.py文件夹下直接打开终端
chmod +x 1.py #直接获取文件权限