roslib finds multiple executables

asked 2022-02-15 00:42:19 -0500

ticotico gravatar image

updated 2022-02-15 00:52:03 -0500

Good day!

I have a package that uses roslib to find nodes and currently struggle with it because it finds multiple executables (in src and devel space).

cmd = roslib.packages.find_node(package, executable)

The python nodes are installed using setup.py and catkin_install_python. What would be the preferred way for roslib to only find one executable? Options I could think of:

  • Do not install python nodes => roslib will only find nodes in src space
  • Contrary to all tutorials, mark python nodes as non-executable, so basically 644 iso 755 => roslib will only find nodes in the devel space
  • somehow tell roslib to look only in the src or devel space

What is the best approach here? Note, my experience is rather limited so this may very well be an XY-problem. Thx for any advice!

PS: I could only find the documentation for melodic (not noetic) for roslib, which states Warning: Unstable API due to catkin. Is the usage of roslib not recommended?

edit retag flag offensive close merge delete