当我执行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 #直接获取文件权限
在尝试执行ROS(Robot Operating System)中的1.py脚本时遇到了错误,问题在于脚本缺少执行权限。通过变更文件权限可以解决这个问题。具体步骤包括定位到1.py文件所在目录,并使用chmod+x命令为文件添加执行权限。
1万+

被折叠的 条评论
为什么被折叠?



