Description:
When building a ROS2 Python package (using ament_python) whose name includes underscores (e.g. gemmini_node), setuptools normalizes it to gemmini-node in the distribution metadata. This leads to mismatch between the ROS2 package name and Python import name, producing runtime errors like
PackageNotFoundError: No package metadata was found for gemmini-node
Steps to Reproduce:
Create ament_python package with name="my_node"
Build with colcon build
Observe generated egg-link named my-node.egg-link
Running ros2 run fails due to mismatch.
Expected Behavior:
ROS2 should preserve underscores (or transparently handle both forms).
System:
ROS 2 Humble on Raspberry Pi OS (Debian Bookworm, Python 3.10).