-
Notifications
You must be signed in to change notification settings - Fork 412
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
use regex for wildcard matching #1839
use regex for wildcard matching #1839
Conversation
b2a008a
to
5ae8d59
Compare
I use your test cases from |
@iuhilnehc-ynos is this PR for #1265 and ros2/rcl#954? could you add a description about what we are trying fix and related issue? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@iuhilnehc-ynos so you kinda have done rebase for #1280 with some changes, right? (new code for support wildcards and borrowing test cases from #1280)
Hi! Its been a little while for me, so need to re-familiarize myself with it.. |
Thank you, I'll add some for it. |
@alsora @SteveMacenski could you help us review on this? |
This would be really nice to have, any reason it's blocked? |
No, we are just waiting for another maintainer's review. |
Hi, looks good to me. |
Co-authored-by: Aaron Lipinski <aaron.lipinski@roboticsplus.co.nz> Signed-off-by: Chen Lihui <lihui.chen@sony.com>
Signed-off-by: Chen Lihui <lihui.chen@sony.com>
Signed-off-by: Chen Lihui <lihui.chen@sony.com>
Signed-off-by: Chen Lihui <lihui.chen@sony.com>
Signed-off-by: Chen Lihui <lihui.chen@sony.com>
Signed-off-by: Chen Lihui <lihui.chen@sony.com>
Signed-off-by: Chen Lihui <lihui.chen@sony.com>
64007f1
to
922179b
Compare
@iuhilnehc-ynos thanks for checking on this! all green, i will go ahead to merge this. |
Hi, Will this be pulled into Galactic or Humble? |
@iuhilnehc-ynos @fujitatomoya is there an equivalent PR for rclpy? |
No i dont think so, I am not sure if the same problem (ros2/rcl#954) can be observed in rclpy. I think this can be backported to Galactic and Humble since it extends the argument with default value. CC: @iuhilnehc-ynos |
Not yet. I will open a new PR for it.
I think so. |
@Mergifyio backport humble galactic |
* use regex for wildcard matching Co-authored-by: Aaron Lipinski <aaron.lipinski@roboticsplus.co.nz> Signed-off-by: Chen Lihui <lihui.chen@sony.com> * use map to process the content of parameter file by order Signed-off-by: Chen Lihui <lihui.chen@sony.com> * add more test cases Signed-off-by: Chen Lihui <lihui.chen@sony.com> * try to not decrease the performance and make the param win last Signed-off-by: Chen Lihui <lihui.chen@sony.com> * update node name Signed-off-by: Chen Lihui <lihui.chen@sony.com> * update document comment Signed-off-by: Chen Lihui <lihui.chen@sony.com> * add more test for parameter_map_from Signed-off-by: Chen Lihui <lihui.chen@sony.com> Co-authored-by: Aaron Lipinski <aaron.lipinski@roboticsplus.co.nz> (cherry picked from commit 6dd3a03)
* use regex for wildcard matching Co-authored-by: Aaron Lipinski <aaron.lipinski@roboticsplus.co.nz> Signed-off-by: Chen Lihui <lihui.chen@sony.com> * use map to process the content of parameter file by order Signed-off-by: Chen Lihui <lihui.chen@sony.com> * add more test cases Signed-off-by: Chen Lihui <lihui.chen@sony.com> * try to not decrease the performance and make the param win last Signed-off-by: Chen Lihui <lihui.chen@sony.com> * update node name Signed-off-by: Chen Lihui <lihui.chen@sony.com> * update document comment Signed-off-by: Chen Lihui <lihui.chen@sony.com> * add more test for parameter_map_from Signed-off-by: Chen Lihui <lihui.chen@sony.com> Co-authored-by: Aaron Lipinski <aaron.lipinski@roboticsplus.co.nz> (cherry picked from commit 6dd3a03)
✅ Backports have been created
|
@fujitatomoya @iuhilnehc-ynos have the new wildcard rules been documented somewhere? |
No i do not think so. can you tell us where it is supposed to be, if you have idea? |
* use regex for wildcard matching (#1839) * use regex for wildcard matching Co-authored-by: Aaron Lipinski <aaron.lipinski@roboticsplus.co.nz> Signed-off-by: Chen Lihui <lihui.chen@sony.com> * use map to process the content of parameter file by order Signed-off-by: Chen Lihui <lihui.chen@sony.com> * add more test cases Signed-off-by: Chen Lihui <lihui.chen@sony.com> * try to not decrease the performance and make the param win last Signed-off-by: Chen Lihui <lihui.chen@sony.com> * update node name Signed-off-by: Chen Lihui <lihui.chen@sony.com> * update document comment Signed-off-by: Chen Lihui <lihui.chen@sony.com> * add more test for parameter_map_from Signed-off-by: Chen Lihui <lihui.chen@sony.com> Co-authored-by: Aaron Lipinski <aaron.lipinski@roboticsplus.co.nz> (cherry picked from commit 6dd3a03) * not to break ABI Signed-off-by: Chen Lihui <lihui.chen@sony.com> Signed-off-by: Chen Lihui <lihui.chen@sony.com> Co-authored-by: Chen Lihui <lihui.chen@sony.com>
* use regex for wildcard matching (#1839) * use regex for wildcard matching Co-authored-by: Aaron Lipinski <aaron.lipinski@roboticsplus.co.nz> Signed-off-by: Chen Lihui <lihui.chen@sony.com> * use map to process the content of parameter file by order Signed-off-by: Chen Lihui <lihui.chen@sony.com> * add more test cases Signed-off-by: Chen Lihui <lihui.chen@sony.com> * try to not decrease the performance and make the param win last Signed-off-by: Chen Lihui <lihui.chen@sony.com> * update node name Signed-off-by: Chen Lihui <lihui.chen@sony.com> * update document comment Signed-off-by: Chen Lihui <lihui.chen@sony.com> * add more test for parameter_map_from Signed-off-by: Chen Lihui <lihui.chen@sony.com> Co-authored-by: Aaron Lipinski <aaron.lipinski@roboticsplus.co.nz> (cherry picked from commit 6dd3a03) * not to break ABI Signed-off-by: Chen Lihui <lihui.chen@sony.com> Signed-off-by: Chen Lihui <lihui.chen@sony.com> Co-authored-by: Chen Lihui <lihui.chen@sony.com>
to fix ros2/rcl#954
My intent is to use regex for supporting some complicated wildcard, such as
/**/a/b/*/c/d/*/node
.I think that the same param name in a node of param file parsed by order seems more reasonable than the order(
/**
,specific_node
). Because if there are more wildcards items, such/**/node
,/ns/**/node
, etc, I don't think users would like to memory these special rules.Note: I can also use a 'std::set<..,std::less>' to store the node keys(
*
</
<alpha/num
), and then move all the relative items iterator into{specific_node, {}}
Signed-off-by: Chen Lihui lihui.chen@sony.com