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

Your package.xml, setup.cfg, and setup.py files determine if the python script gets moved to the correct (build) folder for ROS2 launch. If that transfer doesn't happen when you 'colcon build', it won't be found at run time. I banged my head on this issue for a long time but there's only a chance it's the same issue you're having. But at least look into it. In ROS2 getting your own .py to run seems much more complicated to me than it did in ROS. But I'm also right at the edge of learning disabled when it comes to compootur things.

Your package.xml, setup.cfg, and setup.py files determine if the python script gets moved to the correct (build) folder for ROS2 launch. If that transfer doesn't happen when you 'colcon build', it won't be found at run time. I banged my head on this issue for a long time but there's only a chance it's the same issue you're having. But at least look into it. In ROS2 getting your own .py to run seems much more complicated to me than it did in ROS. But I'm also right at the edge of learning disabled when it comes to compootur things.

Let me add a bit...it not just the moving of the files because moving them manually doesn't fix it. It also impacts how the paths are defined during the build IIUC.