-
Notifications
You must be signed in to change notification settings - Fork 911
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
Unexpected $(dirname) behaviour when value assigned to arg. #1487
Comments
this indeed is a issue |
This is entirely unintuitive behavior demoting the use of the (in ROS terms) relatively new |
@v4hn In fairness to the maintainers of this repo, I am in fact the author of the original |
I am in fact the author of the original `$(dirname)` patch,
Thanks! Without this bug, it would be an even more useful command, though it already helps with relative includes. 😎
We ended up reworking our launchfiles to not require this fixed, but I left the ticket up in case someone else was interested in tackling it.
Yeah, the usual lot of bugs that are relatively easy to work around...
They just never disappear unless some good soul has the interest and time to fix it.
|
Available since lunar. This simplifies the descriptions in moveit_resources quite a bit because their package name does not match the include path and we have to adapt the names everywhere after edits. Note that two candidates for this replacement still remain - they define the file path to the rviz config in an arg value. Due to [a bug](ros/ros_comm#1487) these two can not be replaced at this moment.
Available since lunar. This simplifies the descriptions in moveit_resources quite a bit because their package name does not match the include path and we have to adapt the names everywhere after edits. Note that two candidates for this replacement still remain - they define the file path to the rviz config in an arg value. Due to [a bug](ros/ros_comm#1487) these two can not be replaced at this moment.
... due to this bug: ros/ros_comm#1487 This partially reverts 442c320
The existing test is here, added as part of the overall feature in #1103:
https://github.com/ros/ros_comm/blob/e96c407c64e1c17b0dd2bb85b67f388380527097/tools/roslaunch/test/xml/test-dirname.xml
If the test is augmented to be:
And then the
included.xml
file is changed to:You'd expect the
baz
parameter to havetools/roslaunch/test/xml/baz
as its path, but instead it'stools/roslaunch/test/xml/test-dirname/baz
. That is, dirname is being lazily resolved at the point where the value is assigned to the parameter, rather than when the arg value is assigned. Historically this hasn't mattered, as no other substitutions have this kind of context sensitivity.I'm not sure how much effort this will be to fix, but I had an instance recently where it would have been nice to be able to pass a "back path" into an included file, and wasn't able to do so due to this problem.
The text was updated successfully, but these errors were encountered: