-
Notifications
You must be signed in to change notification settings - Fork 130
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Resolving ament packages at build time #472
Comments
@rhaschke Thank you for raising the issue! I'm also on the same page. The limitation that any script running at build time cannot refer to the resources of itself is quite significant.
This is a nice workaround. Any further discussion is really welcome! |
One suggestion we have here is to change |
xacro_add_files already gets the name(s) of the main .xacro file(s) to be processed as resources. The dependent files that are included from these main files, should not be explicitly listed there. This would be a degradation of usability.
That's what my workaround is actually doing. My suggestion was to implement that behavior here in the upstream package. Of course, if you don't see the utility of such behavior in general, I can stick with my workaround. |
Closing due to inactivity. Using the implemented workaround in xacro instead. |
Debugging ros/xacro#325, I noticed a chicken-egg-problem in ament_cmake:
The cmake function
xacro_add_files
runsxacro
at build time. To resolve$(find current_package)
within xacro files,xacro
relies on a properly configured ament package index. However, this index is only created after building, during installation.By manually prepending
AMENT_PREFIX_PATH
with the current project'sament_cmake_index
in thebuild
folder and symlinking the source folder into the correspondingshare
folder (to resolve source files for xacro), I was able to work around this shortcoming (ros/xacro#326).However, a fix in
ament_cmake
would be definitely better. I suggest creating the corresponding package resource in thebuild
folder and the symlink to the source folder directly when callingfind_package(ament_cmake)
.The text was updated successfully, but these errors were encountered: