ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

It looks like the problem is the example is using install(PROGRAMS ... for Python scripts, and the Python scripts have shebangs that say #!/usr/bin/env python. When the scripts are installed the shebangs are unchanged, so it uses whatever version of python the python command starts.

To fix this, the code should be using catkin_install_python(...) which rewrites the shebang's to point to the correct version (Python 2 on ROS Melodic and earlier, Python 3 on ROS Noetic).