melodic vs noetic python nodes: executable or not?
Hi
When using python nodes in ROS, I noticed the following:
- In melodic, the nodes need to be changed to executables (chmod +x)
- In noetic, the nodes don't need to be executables (chmod not needed)
Is there an explanation for that? A python2 vs python3 story? Thx!
--- More info / how to reproduce: ---
- clone/download from here
- run talker node (executable by default):
rosrun rospy_tutorials talker.py
- command line question:
[rosrun] You have chosen a non-unique executable, please pick one of the following:
1) /home/usr/workspaces/getting_started/devel/share/rospy_tutorials/001_talker_listener/talker.py
2) /home/usr/workspaces/getting_started/src/ros_tutorials/rospy_tutorials/001_talker_listener/talker.py
It seems like noetic also discovers the executable in the src
folder and then complains about having two executables.
This does not happen in melodic and can be avoided in noetic by making the python file non-executable.
So should the policy be that python files in the src
folder are non-executable in noetic? But then melodic complains about not finding any executable at all.
Any idea on how to solve this issue?
I'm not dismissing your experience, but I'm pretty sure nothing has changed between Melodic and Noetic wrt this.
Could you please check again?
And then add output of
ls -al /path/to/your/node
for both cases.And please also add:
install
space ordevel
?CMakeLists.txt
usecatkin_install_python(..)
?x
and oncewithout x
devel
spacecatkin_install_python(...)
(basically cloned the repo)anyone? to me that sounds like a pretty basic/straightforward question that probably plenty of other people already stumbled upon when transitioning from melodic to noetic...thx!
anyone able to reproduce this? Would really appreciate it, thx!