Allow concatenating each path component of PathJoinSubstitution#838
Merged
christophebedard merged 1 commit intorollingfrom Apr 15, 2025
Conversation
Signed-off-by: Christophe Bedard <bedard.christophe@gmail.com>
This was referenced Mar 16, 2025
Member
Author
|
There's a request to backport this to Humble (and Jazzy while we're at it): #835 (comment) |
baconbrot
added a commit
to baconbrot/launch
that referenced
this pull request
Mar 18, 2025
Signed-off-by: Christian Ruf <c.ruf99@gmail.com>
baconbrot
added a commit
to baconbrot/launch
that referenced
this pull request
Mar 18, 2025
Signed-off-by: Christian Ruf <c.ruf99@gmail.com> Support concatenation of substitutions as implemented in ros2#838 Signed-off-by: Christian Ruf <c.ruf99@gmail.com> Add docstrings Signed-off-by: Christian Ruf <c.ruf99@gmail.com> Updatre repr Signed-off-by: Christian Ruf <c.ruf99@gmail.com> Fix formatting Signed-off-by: Christian Ruf <c.ruf99@gmail.com>
This was referenced Mar 23, 2025
ahcorde
approved these changes
Apr 14, 2025
Member
Author
|
Pulls: #838 |
Member
Author
|
The test failures are unrelated ( |
This was referenced May 15, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #741
As mentioned in the above issue, users want to concatenate multiple substitutions into a single string, which, in this case, is a single path component. This is a very normal use of substitutions, but
PathJoinSubstitutiondoes not support it. It only supports joining individual substitutions into a path.This PR changes
PathJoinSubstitutionto accept anIterable[SomeSubstitutionsType]instead of being restricted toIterable[Union[Text, Substitution]]. This enables the use-case presented in the issue:If the
modellaunch configuration was set tomy_model, this would result in a path equal to:'robot_description/urdf/my_model.xacro'As the existing test shows, this is backward compatible, since
Iterable[SomeSubstitutionsType]is a superset ofIterable[Union[Text, Substitution]].I've added an example to the class documentation and expanded the test a bit.