RobotWebTools / rclnodejs

Node.js version of ROS 2.0 client
https://docs.ros.org/en/humble/Concepts/Basic/About-Client-Libraries.html?highlight=rclnodejs#community-maintained
Apache License 2.0
311 stars 70 forks source link

Message generation ignores overlays #902

Closed csmith-rtr closed 1 year ago

csmith-rtr commented 1 year ago

Description The message generation seems to ignore workspace overlays. If you have std_msgs installed and a checkout from source with local changes, the source checkout should be used instead of the installed messages. It seems like the generator script just runs through all entries in AMENT_PREFIX_PATH and generates definitions for all of them ignoring overlays. It starts off in order of AMENT_PREFIX_PATH but I think each entry is done async and without specific ordering so possibly any outcome could occur?

Steps To Reproduce checkout std_msgs locally. Make a change to it and build. AMENT_PREFIX_PATH will look like /path/to/source/install/std_msgs:/opt/ros/foxy. Generate messages through scripts/generate_messages.js.

Note: I haven't actually done this with std_msgs -it's occurring for me with a custom message package

Expected Behavior Generated messages will use the message definitions from the source build.

Actual Behavior Generated messages will use message definitions from the installed package

wayneparrott commented 1 year ago

@csmith-rtr Thx for investigating this issue. I did a quick code inspection and can confirm that msgs/interfaces are processed from overlay-to-underlay order with the underlay version incorrectly overwriting the overlay version.