[ROS Q&A] 147 - How to make a Python file executable?

preview_player
Показать описание
One of the most frequent question that we get in our customer support channels is an error when trying to 'rosrun' a Python file. The package is there, the file is there, the command has been typed in correctly, but it doesn't want to run. Sounds familiar?

This is usually due to the file's permission, which had to be set to be executable. So in this video, we will see how to do this, as well as explore a bit more on this subject. Beginners of ROS and the Linux system should find this very useful.

// RELATED LINKS

---
Feedback
---
Did you like this video? Do you have questions about what is explained? Whatever the case, please leave a comment on the comments section below, so we can interact and learn from each other.

If you want to learn about other ROS topics, please let us know on the comments area and we will do a video about it.
Рекомендации по теме
Комментарии
Автор

Thank you..That worked like a charm. :)

classysidd
Автор

I have converted the file to be executable by using (chmod +x filename.py ) but when I run the node its not showing a thing and keeps on loading . Can anyone solve my problem ?

narasimhareddy
Автор

How could i find the path to exe file of python ? Normally, it is /devel/lib/package/file, but is just exe file of cpp.

ngochuynguyen
Автор

Go to the directory of the .py file and turn it into executable by using chmod +x filename.py

LokeshAbhi
Автор

I used the chmod -x filename.py, but I can't rosrun package_name filename.py. Can someone help me to solve it?

jackywang-ib
join shbcf.ru