Robotics StackExchange | Archived questions

melodic vs noetic python nodes: executable or not?

Hi

When using python nodes in ROS, I noticed the following:

Is there an explanation for that? A python2 vs python3 story? Thx!

--- More info / how to reproduce: ---

[rosrun] You have chosen a non-unique executable, please pick one of the following:

1) /home/usr/workspaces/gettingstarted/devel/share/rospytutorials/001talkerlistener/talker.py

2) /home/usr/workspaces/gettingstarted/src/rostutorials/rospytutorials/001talker_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?

Asked by ticotico on 2021-11-05 10:22:30 UTC

Comments

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:

  • is this in install space or devel?
  • does your CMakeLists.txt use catkin_install_python(..)?

Asked by gvdhoorn on 2021-11-05 10:34:13 UTC

  • ls -al: once with x and once without x
  • devel space
  • yes, using catkin_install_python(...) (basically cloned the repo)

Asked by ticotico on 2021-11-05 12:05:27 UTC

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!

Asked by ticotico on 2021-11-17 08:40:26 UTC

anyone able to reproduce this? Would really appreciate it, thx!

Asked by ticotico on 2021-11-26 04:02:52 UTC

Answers